using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
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.Configuration;
using BepInEx.Logging;
using FishNet;
using FishNet.Connection;
using FishNet.Managing.Server;
using FishNet.Object;
using FishNet.Serializing;
using FishNet.Transporting;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.SceneManagement;
[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("wah")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("darkblast_toskelemage")]
[assembly: AssemblyTitle("wah")]
[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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
[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.skelemager", "skelemager", "1.0.0")]
[BepInProcess("MageArena.exe")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class blood : BaseUnityPlugin
{
public static ManualLogSource Logger;
public static bool debug = false;
public const string guid = "murderminemurderer.skelemager";
public static string modsync = "host";
public static Func<IEnumerator, Coroutine> bloodcycle;
internal void Awake()
{
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
Logger = ((BaseUnityPlugin)this).Logger;
Logger.LogInfo((object)"darkblast_toskelemage loaded");
if (Chainloader.PluginInfos.ContainsKey("com.magearena.modsync") || Chainloader.PluginInfos.ContainsKey("murderminemurderer.castlespawn"))
{
configman.dotheconfig(((BaseUnityPlugin)this).Config);
new Harmony("murderminemurderer.skelemager").PatchAll();
bloodcycle = ((MonoBehaviour)this).StartCoroutine;
}
else
{
Logger.LogFatal((object)"retard!! u need modsync or castlespawn!!");
}
}
}
public static class configman
{
public static ConfigEntry<bool> manaball;
public static ConfigEntry<bool> portalgun;
public static ConfigEntry<bool> dogwalker;
public static ConfigEntry<bool> steroids;
public static void dotheconfig(ConfigFile config)
{
string text = "RealMagicalGirl_DoItAllRightByMyself_WhateverIWant_DivineIntellect_UnlikeYou_MonkeyNigger";
manaball = config.Bind<bool>(text, "manaball", true, "enable manaball spell prefix");
portalgun = config.Bind<bool>(text, "liveslowdie", true, "enable portalgun spell prefix");
dogwalker = config.Bind<bool>(text, "dogwalker", true, "enable dogwalker/arise spell prefix");
steroids = config.Bind<bool>(text, "steroids", true, "enable steroids (for wisp) spell prefix");
}
}
public class helptale
{
public static PlayerMovement? getplayerbynetwork(NetworkConnection con)
{
GameObject[] array = (GameObject[])(object)Object.FindObjectsByType(typeof(GameObject), (FindObjectsSortMode)1);
PlayerMovement val2 = default(PlayerMovement);
foreach (GameObject val in array)
{
if (((Object)val).name.Contains("Player") && val.TryGetComponent<PlayerMovement>(ref val2) && ((NetworkBehaviour)val2).Owner == con)
{
blood.Logger.LogInfo((object)("found killer " + val2.playername));
return val2;
}
}
return null;
}
public static Vector3 spread_dir(Vector3 fwdvect, float spread, bool ytoo = false)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
return fwdvect + new Vector3(Random.Range(0f - spread, spread), ytoo ? Random.Range(0f - spread, spread) : 0f, Random.Range(0f - spread, spread));
}
public static Vector3? kingmaker_finalsingularity(GameObject thepage, GameObject ownerobj, Vector3 fwdVector)
{
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: Unknown result type (might be due to invalid IL or missing references)
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_0117: Unknown result type (might be due to invalid IL or missing references)
//IL_0121: Unknown result type (might be due to invalid IL or missing references)
//IL_0126: Unknown result type (might be due to invalid IL or missing references)
//IL_012b: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_014a: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
Vector3? result = null;
try
{
RaycastHit val = default(RaycastHit);
RaycastHit val3 = default(RaycastHit);
if (Physics.Raycast(thepage.transform.position, fwdVector, ref val, 100f, 520))
{
RaycastHit val2 = default(RaycastHit);
if (Physics.Raycast(new Vector3(((RaycastHit)(ref val)).point.x, ((RaycastHit)(ref val)).point.y + 40f, ((RaycastHit)(ref val)).point.z), Vector3.down, ref val2, 200f, 520))
{
result = ((RaycastHit)(ref val2)).point;
return result;
}
if (Physics.Raycast(thepage.transform.position + ownerobj.transform.forward * 50f + Vector3.up * 40f, Vector3.down, ref val2, 200f, 520))
{
result = ((RaycastHit)(ref val2)).point;
return result;
}
}
else if (Physics.Raycast(thepage.transform.position + ownerobj.transform.forward * 50f + Vector3.up * 40f, Vector3.down, ref val3, 200f, 520))
{
result = ((RaycastHit)(ref val3)).point;
return result;
}
}
catch (Exception)
{
}
return result;
}
}
[HarmonyPatch]
public class tryingtomanipulateme
{
[CompilerGenerated]
private sealed class <spellpage_endlesscontempt_eventualcurse>d__23 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public GameObject ownerobj;
public Vector3 fwdVector;
public GameObject thepage;
public int level;
public PageController pagec;
private Vector3? <spawnpos>5__1;
private SkelemageController <necromancy>5__2;
private GameObject <theman>5__3;
private double <fbamount>5__4;
private int <i>5__5;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <spellpage_endlesscontempt_eventualcurse>d__23(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<necromancy>5__2 = null;
<theman>5__3 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
//IL_02da: Unknown result type (might be due to invalid IL or missing references)
//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
//IL_0198: Unknown result type (might be due to invalid IL or missing references)
//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<spawnpos>5__1 = helptale.kingmaker_finalsingularity(thepage, ownerobj, fwdVector);
<theman>5__3 = spawnat(skelemage, ownerobj.transform.position + ownerobj.transform.forward * 4f, scaleofadragon, ownerobj.transform.rotation);
((Object)<theman>5__3).name = "mausoluem ghost";
if (<theman>5__3.TryGetComponent<SkelemageController>(ref <necromancy>5__2) && <spawnpos>5__1.HasValue)
{
<fbamount>5__4 = ((Vector3.Distance(<spawnpos>5__1.Value, ownerobj.transform.position) > 17f) ? Math.Max(Math.Round((double)Math.Min(level / 4, 4)), 2.0) : Math.Max(Math.Round((double)Math.Min(level / 8, 3)), 1.0));
<necromancy>5__2.AiNodes = null;
((Behaviour)<necromancy>5__2.navAgent).enabled = false;
<necromancy>5__2.inited = false;
<theman>5__3.transform.position = ownerobj.transform.position + ownerobj.transform.forward * 4f;
monsterhp.SetValue(<necromancy>5__2, 99999999);
<>2__current = coronationday;
<>1__state = 1;
return true;
}
goto IL_0362;
case 1:
<>1__state = -1;
try
{
playskelesound.Invoke(<necromancy>5__2, new object[1] { 0 });
playskelesound.Invoke(<necromancy>5__2, new object[1] { 1 });
togglefireball.Invoke(<necromancy>5__2, Array.Empty<object>());
}
catch (Exception)
{
}
<i>5__5 = 1;
goto IL_0348;
case 2:
<>1__state = -1;
<i>5__5++;
goto IL_0348;
case 3:
{
<>1__state = -1;
try
{
servman.Despawn(<theman>5__3, (DespawnType?)(DespawnType)0);
}
catch (Exception)
{
}
return false;
}
IL_0348:
if ((double)<i>5__5 <= <fbamount>5__4)
{
try
{
togglecastani.Invoke(<necromancy>5__2, Array.Empty<object>());
skelemager.Invoke(<necromancy>5__2, new object[2]
{
(!<spawnpos>5__1.HasValue) ? new Vector3?(ownerobj.transform.position + new Vector3(0f, 0f, -5f)) : ((<i>5__5 == 1) ? <spawnpos>5__1 : new Vector3?(helptale.spread_dir(<spawnpos>5__1.Value, (float)<i>5__5 * 7.5f, ytoo: true))),
false
});
}
catch (Exception)
{
}
<>2__current = wannacry;
<>1__state = 2;
return true;
}
goto IL_0362;
IL_0362:
<>2__current = outofbounds;
<>1__state = 3;
return true;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <spellpage_steroids>d__41 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public GameObject ownerobj;
public Vector3 fwdVector;
public GameObject thepage;
public int level;
public PageController pagec;
private PlayerMovement <pm>5__1;
private int <i>5__2;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <spellpage_steroids>d__41(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<pm>5__1 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
//IL_0142: Unknown result type (might be due to invalid IL or missing references)
//IL_0147: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (ownerobj.TryGetComponent<PlayerMovement>(ref <pm>5__1))
{
try
{
PlayerMovement obj = <pm>5__1;
obj.ServerHealth += 50f;
<pm>5__1.ObsDrinkSoup(1);
if (ownerobj.transform.localScale.y >= 3.5f)
{
PlayerMovement obj2 = <pm>5__1;
obj2.ServerHealth += 50f;
<pm>5__1.ObsDrinkSoup(1);
}
<pm>5__1.ObsDrinkSoup(0);
<pm>5__1.ObsDrinkSoup(4);
}
catch (Exception)
{
}
}
((Object)thepage).name = "SpellWisp";
if ((Object)(object)thepage != (Object)null && (Object)(object)thepage != (Object)null)
{
InstanceFinder.ServerManager.Despawn(thepage, (DespawnType?)(DespawnType)0);
}
<i>5__2 = 0;
break;
case 1:
<>1__state = -1;
<i>5__2++;
break;
}
if (<i>5__2 < 300)
{
Transform transform = ownerobj.transform;
transform.localScale += new Vector3(0.00166667f, 0.00166667f, 0.00166667f);
<>2__current = growtime;
<>1__state = 1;
return true;
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <spellpage_thedog>d__39 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public GameObject ownerobj;
public Vector3 fwdVector;
public GameObject thepage;
public int level;
public PageController pagec;
private GameObject <dogholder>5__1;
private BoneDogController <canti>5__2;
private Transform <dog>5__3;
private Vector3 <thepos>5__4;
private Quaternion <therut>5__5;
private int <i>5__6;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <spellpage_thedog>d__39(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<dogholder>5__1 = null;
<canti>5__2 = null;
<dog>5__3 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
//IL_01f0: Expected O, but got Unknown
//IL_0136: Unknown result type (might be due to invalid IL or missing references)
//IL_0152: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<dogholder>5__1 = spawnat(thedog, dogwalk);
<canti>5__2 = <dogholder>5__1.GetComponent<BoneDogController>();
<dog>5__3 = <dogholder>5__1.transform.Find("BoneDog");
<thepos>5__4 = ownerobj.transform.position + ownerobj.transform.forward * 8.95f;
<therut>5__5 = ownerobj.transform.rotation;
if ((Object)(object)<dog>5__3 != (Object)null)
{
((Object)<dogholder>5__1).name = zogbotdogs;
fostershomefor.Add(<canti>5__2, ownerobj);
<i>5__6 = 0;
goto IL_01a3;
}
goto IL_01c9;
case 1:
<>1__state = -1;
<i>5__6++;
goto IL_01a3;
case 2:
{
<>1__state = -1;
if ((Object)(object)<dogholder>5__1 != (Object)null && (Object)(object)servman != (Object)null)
{
fostershomefor.Remove(<canti>5__2);
servman.Despawn(<dogholder>5__1, (DespawnType?)(DespawnType)0);
}
return false;
}
IL_01a3:
if (<i>5__6 < 10)
{
((Behaviour)<canti>5__2.DogAgent).enabled = false;
<canti>5__2.DogAgent.Warp(<thepos>5__4);
((Component)<canti>5__2.BoneDog).transform.position = <thepos>5__4;
((Component)<canti>5__2.BoneDog).transform.rotation = <therut>5__5;
<>2__current = null;
<>1__state = 1;
return true;
}
((Behaviour)<canti>5__2.DogAgent).enabled = true;
goto IL_01c9;
IL_01c9:
<>2__current = (object)new WaitForSeconds(Math.Clamp((float)level * 3.5f, 10f, 18.4f));
<>1__state = 2;
return true;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <spellpage_thinkingwithportals>d__43 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public GameObject ownerobj;
public Vector3 fwdVector;
public GameObject thepage;
public int level;
public PageController pagec;
private MageBookController <magebook>5__1;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <spellpage_thinkingwithportals>d__43(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<magebook>5__1 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
if (<>1__state != 0)
{
return false;
}
<>1__state = -1;
<magebook>5__1 = getmagebookfromowner(ownerobj, "portalgun");
if ((Object)(object)<magebook>5__1 != (Object)null)
{
GameObject obj = ownerobj;
((Object)obj).name = ((Object)obj).name + " spell_portalguninvoke";
omnicide.Invoke(<magebook>5__1, new object[3] { ownerobj, fwdVector, level });
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
private static Type duend = typeof(DuendeManager);
private static FieldInfo rabbithole = duend.GetField("plt", BindingFlags.Instance | BindingFlags.NonPublic);
private static MethodInfo setupitem2 = duend.GetMethod("SetupItem2", BindingFlags.Instance | BindingFlags.NonPublic);
private static GameObject skelemage;
private static MethodInfo skelemager = typeof(SkelemageController).GetMethod("ShootFireballServer", BindingFlags.Instance | BindingFlags.NonPublic);
private static ServerManager servman;
private static Vector3 scaleofadragon = new Vector3(1.24f, 1.24f, 1.24f);
private static MethodInfo playskelesound = typeof(SkelemageController).GetMethod("PlaySkeleSound", BindingFlags.Instance | BindingFlags.NonPublic);
private static FieldInfo monsterhp = typeof(SkelemageController).GetField("hp", BindingFlags.Instance | BindingFlags.NonPublic);
private static MethodInfo togglefireball = typeof(SkelemageController).GetMethod("ToggleFireballParticles", BindingFlags.Instance | BindingFlags.NonPublic);
private static MethodInfo togglecastani = typeof(SkelemageController).GetMethod("ToggleCastAni", BindingFlags.Instance | BindingFlags.NonPublic);
private static PlayerRespawnManager prs;
private static GameObject thedog;
private static WaitForSecondsRealtime wannacry = new WaitForSecondsRealtime(0.35f);
private static WaitForSecondsRealtime outofbounds = new WaitForSecondsRealtime(2f);
private static WaitForSecondsRealtime coronationday = new WaitForSecondsRealtime(0.12f);
private static Type theworldrevolving = typeof(MageBookController);
private static MethodInfo omnicide = theworldrevolving.GetMethod("ShootFrostboltOBs", BindingFlags.Instance | BindingFlags.NonPublic);
private static MethodInfo basedstoic = theworldrevolving.GetMethod("RpcWriter___Observers_ObsDestroyHole_1140765316", BindingFlags.Instance | BindingFlags.NonPublic);
private static FieldInfo omnicidal = theworldrevolving.GetField("hole", BindingFlags.Instance | BindingFlags.NonPublic);
private static FieldInfo herohasreturned = theworldrevolving.GetField("worm", BindingFlags.Instance | BindingFlags.NonPublic);
public static Vector3 dogwalk = new Vector3(71.75f, 580.9f, 356.49f);
public static string zogbotdogs = "its a dog eat dog world";
public static Dictionary<BoneDogController, GameObject> fostershomefor = new Dictionary<BoneDogController, GameObject>();
private static WaitForSeconds growtime = new WaitForSeconds(1f / 60f);
private static MethodInfo permafroststorm = theworldrevolving.GetMethod("WormOBs", BindingFlags.Instance | BindingFlags.NonPublic);
private static MethodInfo apathy = theworldrevolving.GetMethod("HoleOBs", BindingFlags.Instance | BindingFlags.NonPublic);
private static Type permafrost = typeof(FrostBoltController);
private static FieldInfo waaaahwaaaaah = permafrost.GetField("level", BindingFlags.Instance | BindingFlags.NonPublic);
public static MethodInfo[] the_end_of_the_world = typeof(tryingtomanipulateme).GetMethods();
private static GameObject spawnat(GameObject orig, Vector3 pos, Vector3 scale = default(Vector3), Quaternion rot = default(Quaternion))
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)servman == (Object)null)
{
servman = InstanceFinder.ServerManager;
}
GameObject val = Object.Instantiate<GameObject>(orig);
val.transform.position = pos;
val.transform.rotation = ((rot != default(Quaternion)) ? rot : Quaternion.identity);
if (scale != default(Vector3))
{
val.transform.localScale = scale;
}
servman.Spawn(val, (NetworkConnection)null, default(Scene));
return val;
}
private static void findmagic()
{
GameObject[] array = Resources.FindObjectsOfTypeAll<GameObject>();
GameObject[] array2 = array;
foreach (GameObject val in array2)
{
if (((Object)val).name.ToLower().Contains("skelemage") && !Object.op_Implicit((Object)(object)skelemage))
{
skelemage = val;
}
else if (((Object)val).name.ToLower().Contains("withdog") && !Object.op_Implicit((Object)(object)thedog))
{
thedog = val;
}
}
}
[HarmonyPatch(typeof(PlayerRespawnManager), "OnStartClient")]
[HarmonyPostfix]
private static void thiojoe_gayfemboymalwarevideo(PlayerRespawnManager __instance)
{
prs = __instance;
}
[HarmonyPatch(typeof(DuendeManager), "RpcLogic___ServerCreatePage_1692629761")]
[HarmonyPrefix]
private static bool i_despise_the_90percent(int DuendeID, int rand, DuendeManager __instance)
{
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_0145: Unknown result type (might be due to invalid IL or missing references)
//IL_015a: Unknown result type (might be due to invalid IL or missing references)
//IL_0160: Unknown result type (might be due to invalid IL or missing references)
//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
//IL_0207: Unknown result type (might be due to invalid IL or missing references)
//IL_020d: Unknown result type (might be due to invalid IL or missing references)
//IL_029f: Unknown result type (might be due to invalid IL or missing references)
//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
object? value = rabbithole.GetValue(__instance);
PageLootTable val = (PageLootTable)((value is PageLootTable) ? value : null);
bool result = true;
if (val.Pages.Length >= rand && (Object)(object)prs != (Object)null)
{
GameObject val2 = val.Pages[rand];
result = false;
try
{
string name = ((Object)val2).name;
string text = name;
if (text == null)
{
goto IL_02fe;
}
if (text.Contains("DarkBlast") && Random.RandomRangeInt(0, 4) != 3 && configman.manaball.Value)
{
GameObject val3 = Object.Instantiate<GameObject>(val2);
((Object)val3).name = "spellpage_endlesscontempt_eventualcurse";
val3.transform.localScale = scaleofadragon;
InstanceFinder.ServerManager.Spawn(val3, (NetworkConnection)null, default(Scene));
setupitem2.Invoke(__instance, new object[2] { val3, DuendeID });
prs.summonDeathMessage("<color=yellow>modifier!<size=11>(common)</size>[</color><color=blue>Lich</color><color=yellow>]</color>", "golem", "<color=purple><size=15>dark blast</size></color> <color=yellow>Trade notifier: a</color>");
}
else
{
string text2 = text;
if (text2.ToLower().Contains("blink") && Random.RandomRangeInt(1, 4) == 1 && configman.portalgun.Value)
{
GameObject val4 = Object.Instantiate<GameObject>(val2);
((Object)val4).name = "spellpage_thinkingwithportals";
val4.transform.localScale = scaleofadragon;
InstanceFinder.ServerManager.Spawn(val4, (NetworkConnection)null, default(Scene));
setupitem2.Invoke(__instance, new object[2] { val4, DuendeID });
prs.summonDeathMessage("<color=yellow>modifier!<size=11>(uncommon)</size>[</color><color=#cba135>Portal Gun</color><color=yellow>]</color>", "golem", "<color=#cba135><size=15>blink</size></color> <color=yellow>Trade notifier: a</color>");
}
else
{
string text3 = text;
if (text3.ToLower().Contains("rock") && Random.RandomRangeInt(1, 3) == 1 && configman.dogwalker.Value)
{
GameObject val5 = Object.Instantiate<GameObject>(val2);
((Object)val5).name = "spellpage_thedog";
val5.transform.localScale = scaleofadragon;
InstanceFinder.ServerManager.Spawn(val5, (NetworkConnection)null, default(Scene));
setupitem2.Invoke(__instance, new object[2] { val5, DuendeID });
prs.summonDeathMessage("<color=yellow>modifier!<size=11>(common)</size>[</color><color=#c9c0bb>Summon BoneDog</color><color=yellow>]</color>", "golem", "<color=#836953><size=16>rock</size></color> <color=yellow>Trade notifier: a</color>");
}
else
{
string text4 = text;
if (!text4.ToLower().Contains("wisp") || Random.RandomRangeInt(1, 4) != 1 || !configman.steroids.Value)
{
goto IL_02fe;
}
GameObject val6 = Object.Instantiate<GameObject>(val2);
((Object)val6).name = "spellpage_steroids";
val6.transform.localScale = scaleofadragon;
InstanceFinder.ServerManager.Spawn(val6, (NetworkConnection)null, default(Scene));
setupitem2.Invoke(__instance, new object[2] { val6, DuendeID });
prs.summonDeathMessage("<color=yellow>modifier!<size=11>(uncommon)</size>[</color><color=#c9c0bb>Steroids</color><color=yellow>]</color>", "golem", "<color=blue><size=16>wisp</size></color> <color=yellow>Trade notifier: a</color>");
}
}
}
goto end_IL_0040;
IL_02fe:
result = true;
end_IL_0040:;
}
catch (Exception)
{
}
}
return result;
}
[HarmonyPatch(typeof(SkelemageController), "OnStartClient")]
[HarmonyPrefix]
private static bool stopit(SkelemageController __instance)
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
if (((Component)__instance).transform.localScale == scaleofadragon || ((Object)((Component)__instance).gameObject).name == "mausoluem ghost")
{
((Behaviour)__instance.navAgent).enabled = false;
return false;
}
return true;
}
[HarmonyPatch(typeof(SkelemageController), "Update")]
[HarmonyPrefix]
private static bool gta_ufo_easteregg_theory(SkelemageController __instance)
{
if (((Object)((Component)__instance).gameObject).name == "mausoluem ghost")
{
return false;
}
return true;
}
public static GameObject? findthechild(GameObject fromGameObject, string withName, bool recursive = false, bool contains = false, GameObject? it = null)
{
string withName2 = withName;
Transform[] componentsInChildren = fromGameObject.GetComponentsInChildren<Transform>();
Transform val = ((IEnumerable<Transform>)componentsInChildren).FirstOrDefault((Func<Transform, bool>)((Transform k) => (contains && ((Object)((Component)k).gameObject).name.Contains(withName2)) || ((Object)((Component)k).gameObject).name == withName2));
GameObject val2 = null;
if ((Object)(object)val == (Object)null && recursive && (Object)(object)fromGameObject != (Object)(object)it)
{
Transform[] array = componentsInChildren;
foreach (Transform val3 in array)
{
val2 = findthechild(((Component)val3).gameObject, withName2, recursive, contains, fromGameObject);
if ((Object)(object)val2 != (Object)null)
{
val = val2.transform;
break;
}
}
}
return ((Object)(object)val != (Object)null) ? ((Component)val).gameObject : null;
}
[IteratorStateMachine(typeof(<spellpage_endlesscontempt_eventualcurse>d__23))]
public static IEnumerator spellpage_endlesscontempt_eventualcurse(GameObject ownerobj, Vector3 fwdVector, GameObject thepage, int level, PageController pagec)
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <spellpage_endlesscontempt_eventualcurse>d__23(0)
{
ownerobj = ownerobj,
fwdVector = fwdVector,
thepage = thepage,
level = level,
pagec = pagec
};
}
private static MageBookController? getmagebookfromowner(GameObject ownerobj, string fallbackerrorname = "sadsatan")
{
GameObject val = findthechild(ownerobj, "MageBook", recursive: true, contains: true);
MageBookController result = default(MageBookController);
if ((Object)(object)val == (Object)null)
{
prs.summonDeathMessage("", "dog", "<color=red>error</color> " + fallbackerrorname + " cannot be used w/o a spellbook");
}
else if (val.TryGetComponent<MageBookController>(ref result))
{
return result;
}
return null;
}
[HarmonyPatch(typeof(PlayerMovement), "NonRpcDamagePlayer")]
[HarmonyPrefix]
private static bool whydoesthedogkickme_whatagooddog(float dmg, GameObject sauce, string type, PlayerMovement __instance)
{
try
{
if (dmg > 0f)
{
PlayerMovement lastPersonToHitMe = default(PlayerMovement);
if ((Object)(object)sauce != (Object)null && sauce.TryGetComponent<PlayerMovement>(ref lastPersonToHitMe))
{
__instance.LastPersonToHitMe = lastPersonToHitMe;
}
if (__instance.ServerHealth > 0f)
{
__instance.ServerHealth -= dmg;
if (__instance.ServerHealth <= 0f && type != "dog")
{
GameObject.FindGameObjectWithTag("NetItemManager").GetComponent<Serverchecksiguess>().KillPlayerServer(((Component)__instance).gameObject);
}
}
if (((NetworkBehaviour)__instance).IsOwner && __instance.playerHealth > 0f)
{
__instance.causeofdeath = type;
__instance.playerHealth -= dmg;
if (!__instance.isDead)
{
__instance.hurtyOverlayVal += dmg / 100f;
}
Mathf.Clamp(__instance.hurtyOverlayVal, 0f, 0.5f);
}
}
}
catch (Exception)
{
}
return false;
}
[HarmonyPatch(typeof(PlayerRespawnManager), "RpcReader___Server_summondm_852232071")]
[HarmonyPrefix]
private static bool sadsatanagainidontknow(PooledReader PooledReader0, Channel channel, NetworkConnection conn, PlayerRespawnManager __instance)
{
int position = ((Reader)PooledReader0).Position;
string text = ((Reader)PooledReader0).ReadString();
string text2 = ((Reader)PooledReader0).ReadString();
string text3 = ((Reader)PooledReader0).ReadString();
PlayerMovement val = helptale.getplayerbynetwork(conn);
if ((Object)(object)val != (Object)null && Object.op_Implicit((Object)(object)val.LastPersonToHitMe) && val.LastPersonToHitMe.playername != text3 && !text3.ToLower().Contains("trade notifier:") && !text3.ToLower().Contains("</color>") && !text.ToLower().Contains("modifier"))
{
text3 = val.LastPersonToHitMe.playername;
val.LastPersonToHitMe.AddKill();
__instance.RpcWriter___Server_summondm_852232071(text, text2, text3);
return false;
}
((Reader)PooledReader0).Position = position;
return true;
}
[HarmonyPatch(typeof(PlayerMovement), "StartGame")]
[HarmonyPrefix]
private static void humaninstrumentalityproject()
{
fostershomefor.Clear();
}
[HarmonyPatch(typeof(BoneDogController), "Update")]
[HarmonyPrefix]
private static bool dogeatdog(BoneDogController __instance)
{
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0325: Unknown result type (might be due to invalid IL or missing references)
//IL_0330: Unknown result type (might be due to invalid IL or missing references)
//IL_0192: Unknown result type (might be due to invalid IL or missing references)
//IL_019d: Unknown result type (might be due to invalid IL or missing references)
//IL_03b7: Unknown result type (might be due to invalid IL or missing references)
//IL_03bc: Unknown result type (might be due to invalid IL or missing references)
//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0219: Unknown result type (might be due to invalid IL or missing references)
//IL_0225: Unknown result type (might be due to invalid IL or missing references)
if (((Object)((Component)__instance).gameObject).name == zogbotdogs)
{
float magnitude = __instance.magnitude;
Vector3 val = (((Component)__instance.BoneDog).transform.position - __instance.prevFramPos) / Time.deltaTime;
__instance.magnitude = Mathf.Lerp(magnitude, ((Vector3)(ref val)).magnitude, Time.deltaTime * 2f);
if (__instance.state == 0 || __instance.state == 1)
{
if (__instance.magnitude < 1f)
{
__instance.BoneDogAni.SetBool("idle", true);
}
else
{
__instance.BoneDogAni.SetBool("idle", false);
}
}
__instance.footstepTimer += Time.deltaTime;
if (__instance.magnitude > 3f && __instance.footstepTimer > __instance.runStepInterval)
{
if (__instance.FourstepIndex >= 8 || __instance.FourstepIndex <= 4)
{
__instance.FourstepIndex = 5;
}
else
{
__instance.FourstepIndex++;
}
__instance.footstepTimer = 0f;
__instance.FootStepSource.pitch = Random.Range(0.6f, 0.8f);
__instance.FootStepSource.PlayOneShot(__instance.BoneDogClips[__instance.FourstepIndex]);
__instance.FootStepSource.volume = Random.Range(0.9f, 1f);
Collider[] array = Physics.OverlapSphere(__instance.BoneDog.position, 30f, LayerMask.op_Implicit(__instance.PlayerLayer));
PlayerMovement val3 = default(PlayerMovement);
foreach (Collider val2 in array)
{
if (((Component)val2).CompareTag("Player") && ((Component)val2).gameObject.TryGetComponent<PlayerMovement>(ref val3))
{
val3.ShakeCam((30f - Vector3.Distance(__instance.BoneDog.position, ((Component)val2).transform.position)) / 15f, (30f - Vector3.Distance(__instance.BoneDog.position, ((Component)val2).transform.position)) / 15f);
}
}
}
else if (__instance.magnitude > 0.3f && __instance.footstepTimer > __instance.walkStepInterval)
{
if (__instance.FourstepIndex >= 8 || __instance.FourstepIndex <= 4)
{
__instance.FourstepIndex = 5;
}
else
{
__instance.FourstepIndex++;
}
__instance.footstepTimer = 0f;
__instance.FootStepSource.pitch = Random.Range(0.8f, 1f);
__instance.FootStepSource.PlayOneShot(__instance.BoneDogClips[__instance.FourstepIndex]);
__instance.FootStepSource.volume = Random.Range(0.5f, 0.6f);
}
PlayerMovement val4 = default(PlayerMovement);
if ((Object)(object)__instance.CurrentTarget != (Object)null && Vector3.Distance(__instance.VisualObject.position, __instance.CurrentTarget.position) < 2.6f && ((Component)__instance.CurrentTarget).TryGetComponent<PlayerMovement>(ref val4))
{
val4.NonRpcDamagePlayer(70f * Time.deltaTime, fostershomefor.ContainsKey(__instance) ? fostershomefor[__instance] : null, "dog");
}
if (((NetworkBehaviour)__instance).HasAuthority && __instance.inited)
{
__instance.AIBehavior();
}
__instance.prevFramPos = ((Component)__instance.BoneDog).transform.position;
return false;
}
return true;
}
[HarmonyPatch(typeof(BoneDogController), "adjustedLOSRayCast")]
[HarmonyPrefix]
private static bool whythiserror(BoneDogController __instance, ref bool __result, Transform target, bool towardsTarget, out Vector3 direction)
{
//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
//IL_01de: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_0132: Unknown result type (might be due to invalid IL or missing references)
//IL_0148: Unknown result type (might be due to invalid IL or missing references)
//IL_015e: Unknown result type (might be due to invalid IL or missing references)
//IL_0170: Unknown result type (might be due to invalid IL or missing references)
//IL_017b: Unknown result type (might be due to invalid IL or missing references)
//IL_018c: Unknown result type (might be due to invalid IL or missing references)
//IL_019d: Unknown result type (might be due to invalid IL or missing references)
//IL_019e: Unknown result type (might be due to invalid IL or missing references)
//IL_019f: Unknown result type (might be due to invalid IL or missing references)
//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00df: Unknown result type (might be due to invalid IL or missing references)
//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
try
{
PlayerMovement val = default(PlayerMovement);
GetPlayerGameobject val2 = default(GetPlayerGameobject);
if ((((Component)target).TryGetComponent<PlayerMovement>(ref val) && val.isDead) || (((Component)target).TryGetComponent<GetPlayerGameobject>(ref val2) && val2.player.GetComponent<PlayerMovement>().isDead))
{
direction = new Vector3(0f, 0f, 0f);
__result = false;
return false;
}
if (towardsTarget)
{
Vector3 val3 = default(Vector3);
((Vector3)(ref val3))..ctor(__instance.BoneDog.position.x + 1f, __instance.BoneDog.position.y + 1.5f, __instance.BoneDog.position.z);
Vector3 val4 = default(Vector3);
((Vector3)(ref val4))..ctor(target.position.x, target.position.y + 2f, target.position.z);
direction = val4 - val3;
__result = !Physics.Raycast(val3, direction, ((Vector3)(ref direction)).magnitude, LayerMask.op_Implicit(__instance.GroundLayer)) && ((Vector3)(ref direction)).magnitude < 70f;
return false;
}
Vector3 val5 = default(Vector3);
((Vector3)(ref val5))..ctor(__instance.BoneDog.position.x + 1f, __instance.BoneDog.position.y + 1.5f, __instance.BoneDog.position.z);
Vector3 val6 = default(Vector3);
((Vector3)(ref val6))..ctor(target.position.x, target.position.y + 2f, target.position.z);
direction = val5 - val6;
__result = !Physics.Raycast(val6, direction, ((Vector3)(ref direction)).magnitude, LayerMask.op_Implicit(__instance.GroundLayer));
return false;
}
catch (Exception)
{
}
direction = Vector3.forward;
return false;
}
[HarmonyPatch(typeof(BoneDogController), "LOSCheck")]
[HarmonyPrefix]
private static bool whythiserror(BoneDogController __instance)
{
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
try
{
Vector3 val = default(Vector3);
foreach (Transform potentialTarget in __instance.PotentialTargets)
{
bool flag = false;
if ((Object)(object)prs != (Object)null && prs.DeadPlayers.Contains(((Component)potentialTarget).gameObject))
{
flag = true;
}
if (Vector3.Distance(((Component)__instance.VisualObject).transform.position, potentialTarget.position) < 9f && !flag)
{
__instance.PlaySound(0);
__instance.PlaySound(1);
__instance.currentNode = -1;
__instance.GiveUpChaseTimer = 0f;
__instance.state = 1;
__instance.CurrentTarget = potentialTarget;
__instance.ToggleLookAtTarget(true, __instance.CurrentTarget);
__instance.SoundTimer = 0f;
__instance.SoundTimer2 = 0f;
__instance.ServerRunAniToggle(true);
break;
}
if (__instance.adjustedLOSRayCast(potentialTarget, true, ref val) && Vector3.Angle(val, __instance.BoneDog.forward) < 45f && !flag)
{
__instance.PlaySound(0);
__instance.PlaySound(1);
__instance.currentNode = -1;
__instance.GiveUpChaseTimer = 0f;
__instance.state = 1;
__instance.CurrentTarget = potentialTarget;
__instance.ToggleLookAtTarget(true, __instance.CurrentTarget);
__instance.SoundTimer = 0f;
__instance.SoundTimer2 = 0f;
__instance.ServerRunAniToggle(true);
break;
}
}
}
catch (Exception)
{
}
return false;
}
[IteratorStateMachine(typeof(<spellpage_thedog>d__39))]
public static IEnumerator spellpage_thedog(GameObject ownerobj, Vector3 fwdVector, GameObject thepage, int level, PageController pagec)
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <spellpage_thedog>d__39(0)
{
ownerobj = ownerobj,
fwdVector = fwdVector,
thepage = thepage,
level = level,
pagec = pagec
};
}
[IteratorStateMachine(typeof(<spellpage_steroids>d__41))]
public static IEnumerator spellpage_steroids(GameObject ownerobj, Vector3 fwdVector, GameObject thepage, int level, PageController pagec)
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <spellpage_steroids>d__41(0)
{
ownerobj = ownerobj,
fwdVector = fwdVector,
thepage = thepage,
level = level,
pagec = pagec
};
}
[HarmonyPatch(typeof(BoneDogController), "AIBehavior")]
[HarmonyPostfix]
private static void slowdownplz(BoneDogController __instance)
{
if ((Object)(object)((Component)__instance).gameObject != (Object)null && ((Object)((Component)__instance).gameObject).name == zogbotdogs)
{
PlayerMovement val = default(PlayerMovement);
if ((Object)(object)__instance.CurrentTarget != (Object)null && (Object)(object)((Component)__instance.CurrentTarget).gameObject != (Object)null && ((Component)__instance.CurrentTarget).gameObject.TryGetComponent<PlayerMovement>(ref val) && val.isFrozen)
{
__instance.DogAgent.speed = 2f;
}
else
{
__instance.DogAgent.speed = 6.9f;
}
}
}
[IteratorStateMachine(typeof(<spellpage_thinkingwithportals>d__43))]
public static IEnumerator spellpage_thinkingwithportals(GameObject ownerobj, Vector3 fwdVector, GameObject thepage, int level, PageController pagec)
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <spellpage_thinkingwithportals>d__43(0)
{
ownerobj = ownerobj,
fwdVector = fwdVector,
thepage = thepage,
level = level,
pagec = pagec
};
}
[HarmonyPatch(typeof(FrostBoltController), "PlayerSetup")]
[HarmonyPrefix]
private static void HATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHATEHAT(GameObject ownerobj, Vector3 fwdVector, int Level, FrostBoltController __instance)
{
if (((Object)ownerobj).name.Contains(" spell_portalguninvoke"))
{
((Object)ownerobj).name = ((Object)ownerobj).name.Replace(" spell_portalguninvoke", "");
((Object)((Component)__instance).gameObject).name = "portalgun";
}
}
[HarmonyPatch(typeof(FrostBoltController), "DestroyuGameobject")]
[HarmonyPrefix]
private static void fruitoftheash(FrostBoltController __instance)
{
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Expected O, but got Unknown
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Expected O, but got Unknown
//IL_013f: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
if (!(((Object)((Component)__instance).gameObject).name == "portalgun") || !((Object)(object)__instance.playerOwner != (Object)null))
{
return;
}
MageBookController val = getmagebookfromowner(__instance.playerOwner, "portalgun");
if ((Object)(object)val != (Object)null)
{
int num = (int)waaaahwaaaaah.GetValue(__instance);
WormholeTele val2 = (WormholeTele)herohasreturned.GetValue(val);
WormholeTele val3 = (WormholeTele)omnicidal.GetValue(val);
if ((Object)(object)val3 != (Object)null && (Object)(object)val2 != (Object)null)
{
basedstoic.Invoke(val, new object[1] { false });
basedstoic.Invoke(val, new object[1] { true });
}
if ((Object)(object)val2 == (Object)null)
{
permafroststorm.Invoke(val, new object[2]
{
num,
((Component)__instance).gameObject.transform.position
});
}
else
{
apathy.Invoke(val, new object[2]
{
num,
((Component)__instance).gameObject.transform.position
});
}
}
}
[HarmonyPatch(typeof(PageController), "CastSpellObs")]
[HarmonyPrefix]
private static bool dearboss(GameObject ownerobj, Vector3 fwdVector, Vector3 spawnpos, int level, PageController __instance)
{
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
if (!Object.op_Implicit((Object)(object)skelemage))
{
findmagic();
}
GameObject thepage = ((Component)__instance).gameObject;
MethodInfo methodInfo = the_end_of_the_world.FirstOrDefault((MethodInfo loser) => loser.Name.Contains("spellpage") && loser.Name == ((Object)thepage).name);
if (methodInfo != null && (Object)(object)prs != (Object)null)
{
try
{
blood.bloodcycle((IEnumerator)methodInfo.Invoke(null, new object[5] { ownerobj, fwdVector, thepage, level, __instance }));
}
catch (Exception)
{
}
return false;
}
return true;
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "darkblast_toskelemage";
public const string PLUGIN_NAME = "darkblast_toskelemage";
public const string PLUGIN_VERSION = "1.0.0";
}
}