using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Logging;
using FishNet;
using FishNet.Serializing;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("murderminemurder, murderminer")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("gnoems only server pages")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("gnoemsonlyserverpages")]
[assembly: AssemblyTitle("the other mod is retarded")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace retardcrusher
{
[BepInPlugin("murderminemurderer.gnoemsonlyserverpages", "gnoemsonlyserverpages", "1.0.0")]
[BepInProcess("MageArena.exe")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class euthanizetheretarded : BaseUnityPlugin
{
public static ManualLogSource Logger;
public static bool debug = false;
public const string guid = "murderminemurderer.gnoemsonlyserverpages";
public static string modsync = "host";
internal void Awake()
{
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
Logger = ((BaseUnityPlugin)this).Logger;
Logger.LogInfo((object)"gnoemsonlyserverpages loaded");
if (Chainloader.PluginInfos.ContainsKey("com.magearena.modsync") || Chainloader.PluginInfos.ContainsKey("murderminemurderer.castlespawn"))
{
new Harmony("murderminemurderer.gnoemsonlyserverpages").PatchAll();
}
}
}
[HarmonyPatch]
public class tryingtomanipulateme
{
private static Type duend = typeof(DuendeManager);
private static FieldInfo rabbithole = duend.GetField("plt", BindingFlags.Instance | BindingFlags.NonPublic);
private static MethodInfo madhatter = duend.GetMethod("ServerCreatePage", BindingFlags.Instance | BindingFlags.NonPublic);
[HarmonyPatch(typeof(DuendeManager), "RpcReader___Server_ServerCreateItem_1692629761")]
[HarmonyPrefix]
private static bool i_despise_the_90percent(PooledReader PooledReader0, DuendeManager __instance)
{
if (InstanceFinder.IsServerStarted)
{
object? value = rabbithole.GetValue(__instance);
PageLootTable val = (PageLootTable)((value is PageLootTable) ? value : null);
int num = ((Reader)PooledReader0).ReadInt32();
((Reader)PooledReader0).ReadInt32();
try
{
madhatter.Invoke(__instance, new object[2]
{
num,
Random.Range(0, val.Pages.Length)
});
}
catch
{
}
return false;
}
return true;
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "gnoemsonlyserverpages";
public const string PLUGIN_NAME = "gnoemsonlyserverpages";
public const string PLUGIN_VERSION = "1.0.0";
}
}