using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using CursedScraps; using CursedScraps.Managers; using CursedScraps.Patches; using CursedScraps.Registries; using GameNetcodeStuff; using LegaFusionCore; using LegaFusionCore.Behaviours; using LegaFusionCore.Managers; using LegaFusionCore.Managers.NetworkManagers; using LegaFusionCore.ModsCompat; using LegaFusionCore.Utilities; using LethalLib.Modules; using Microsoft.CodeAnalysis; using TrickOrTreat.Behaviours; using TrickOrTreat.Managers; using TrickOrTreat.NetcodePatcher; using Unity.Netcode; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("TrickOrTreat")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("TrickOrTreat")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("aa332fd3-7a30-4c63-9e45-c5d6f0cb377a")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("com.olegknyazev.softmask")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("DunGen")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.ASPP")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.UnityNav")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.XR.CoreUtils")] [assembly: IgnoresAccessChecksTo("Unity.XR.Management")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.ConformanceAutomation")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MetaQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MockRuntime")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.OculusQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.RuntimeDebugger")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.SpatialTracking")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: IgnoresAccessChecksTo("UnityEngine.XR.LegacyInputHelpers")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] 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 TrickOrTreat { internal class Constants { public const string INFORMATION = "Information"; public const string MESSAGE_TRICK_OR_TREAT = "Trick or treat?"; public const string MESSAGE_INFO_NO_CANDY = "You don't have any candy"; public const string HOLLOW_GIRL = "Hollow Girl"; public const string CURSED_CANDY = "Cursed Candy"; } [BepInPlugin("Lega.TrickOrTreat", "Trick Or Treat", "2.0.4")] public class TrickOrTreat : BaseUnityPlugin { internal const string modGUID = "Lega.TrickOrTreat"; internal const string modName = "Trick Or Treat"; internal const string modVersion = "2.0.4"; private static readonly AssetBundle bundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "trickortreat")); internal static ManualLogSource mls; public static ConfigFile configFile; public static GameObject cursedBallObj; public static GameObject cursedExplosionParticle; public static Item cursedCandy; public void Awake() { mls = Logger.CreateLogSource("TrickOrTreat"); configFile = ((BaseUnityPlugin)this).Config; ConfigManager.Load(); NetcodePatcher(); LoadItems(); LoadEnemies(); LoadNetworkPrefabs(); } private static void NetcodePatcher() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } public static void LoadItems() { cursedCandy = bundle.LoadAsset("Assets/CursedCandy/CursedCandyItem.asset"); LFCObjectsManager.RegisterObject(typeof(CursedCandy), cursedCandy); } public static void LoadEnemies() { EnemyType val = bundle.LoadAsset("Assets/HollowGirl/HollowGirlEnemy.asset"); NetworkPrefabs.RegisterNetworkPrefab(val.enemyPrefab); Enemies.RegisterEnemy(val, ConfigManager.hollowGirlRarity.Value, (LevelTypes)(-1), (TerminalNode)null, (TerminalKeyword)null); SellBodiesFixedSoftCompat.RegisterBody(val.enemyName, bundle.LoadAsset("Assets/HollowGirl/HollowGirlHeadItem.asset"), ConfigManager.minHeadValue.Value, ConfigManager.maxHeadValue.Value, true); } public static void LoadNetworkPrefabs() { HashSet hashSet = new HashSet { cursedBallObj = bundle.LoadAsset("Assets/CursedBall/CursedBall.prefab"), cursedExplosionParticle = bundle.LoadAsset("Assets/CursedBall/CursedExplosionParticle.prefab") }; foreach (GameObject item in hashSet) { NetworkPrefabs.RegisterNetworkPrefab(item); Utilities.FixMixerGroups(item); } } } public static class MyPluginInfo { public const string PLUGIN_GUID = "TrickOrTreat"; public const string PLUGIN_NAME = "TrickOrTreat"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace TrickOrTreat.Managers { internal class ConfigManager { public static ConfigEntry hollowGirlRarity; public static ConfigEntry waitingDuration; public static ConfigEntry damage; public static ConfigEntry minHeadValue; public static ConfigEntry maxHeadValue; public static ConfigEntry cursedCandyRarity; public static ConfigEntry minCursedCandy; public static ConfigEntry maxCursedCandy; internal static void Load() { hollowGirlRarity = TrickOrTreat.configFile.Bind("Hollow Girl", "Rarity", 20, "Hollow Girl base rarity."); waitingDuration = TrickOrTreat.configFile.Bind("Hollow Girl", "Waiting duration", 5, "Time window during which a player can give a candy."); damage = TrickOrTreat.configFile.Bind("Hollow Girl", "Damage", 40, "Hollow Girl damage"); minHeadValue = TrickOrTreat.configFile.Bind("Hollow Girl", "Min head value", 70, "Hollow Girl min head value (SellBodiesFixed must be installed)."); maxHeadValue = TrickOrTreat.configFile.Bind("Hollow Girl", "Max head value", 110, "Hollow Girl max head value (SellBodiesFixed must be installed)."); cursedCandyRarity = TrickOrTreat.configFile.Bind("Cursed Candy", "Rarity", 25, "Cursed Candy spawn rarity."); minCursedCandy = TrickOrTreat.configFile.Bind("Cursed Candy", "Min spawn", 0, "Min Cursed Candy to spawn"); maxCursedCandy = TrickOrTreat.configFile.Bind("Cursed Candy", "Max spawn", 2, "Max Cursed Candy to spawn"); } } } namespace TrickOrTreat.Behaviours { public class CursedBall : LFCBouncyAoEProjectile { protected override void PlayExplosionFx(Vector3 position, Quaternion rotation) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(TrickOrTreat.cursedExplosionParticle, position, rotation); ParticleSystem component = val.GetComponent(); float num; if (!((Object)(object)component != (Object)null)) { num = 2f; } else { MainModule main = component.main; num = ((MainModule)(ref main)).duration; } Object.Destroy((Object)(object)val, num); } protected override void PlayExplosionSfx(Vector3 position) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) LFCGlobalManager.PlayAudio("Lega Fusion Core" + ((Object)LegaFusionCore.poisonExplosionAudio).name, position, true); } protected override void OnAffectPlayerServer(PlayerControllerB player) { List eligibleCurses = RoundManagerPatch.GetEligibleCurses(StartOfRound.Instance.currentLevel.PlanetName); if (eligibleCurses != null && eligibleCurses.Count > 0) { CurseEffectType val = eligibleCurses[Random.Range(0, eligibleCurses.Count)]; CursedScrapsNetworkManager.Instance.ApplyPlayerCurseEveryoneRpc((int)player.playerClientId, val.Name, val.Duration); } } protected override void OnAffectEnemyServer(EnemyAI enemy) { if (enemy is HollowGirl hollowGirl && !hollowGirl.isCursed) { hollowGirl.ApplyCurseEveryoneRpc(); } } protected override void __initializeVariables() { ((LFCBouncyAoEProjectile)this).__initializeVariables(); } protected override void __initializeRpcs() { ((LFCBouncyAoEProjectile)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "CursedBall"; } } public class CursedCandy : PhysicsProp { public HollowGirl aimedEnemy; public override void Update() { ((GrabbableObject)this).Update(); if (((GrabbableObject)this).isHeld && !((GrabbableObject)this).isPocketed && (Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null && LFCUtilities.ShouldBeLocalPlayer(((GrabbableObject)this).playerHeldBy)) { ShowAuraAimedEnemy(((GrabbableObject)this).playerHeldBy); } } public void ShowAuraAimedEnemy(PlayerControllerB player) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) RaycastHit val = default(RaycastHit); EnemyAICollisionDetect val2 = default(EnemyAICollisionDetect); if (Physics.Raycast(((Component)player.gameplayCamera).transform.position, ((Component)player.gameplayCamera).transform.forward, ref val, 5f, 524288, (QueryTriggerInteraction)2) && ((Component)((RaycastHit)(ref val)).collider).TryGetComponent(ref val2) && val2.mainScript is HollowGirl hollowGirl && hollowGirl.isWaiting) { if ((Object)(object)aimedEnemy != (Object)(object)hollowGirl) { RemoveAuraFromEnemy(); aimedEnemy = hollowGirl; LFCCustomPassManager.SetupAuraForObjects((GameObject[])(object)new GameObject[1] { ((Component)hollowGirl).gameObject }, LegaFusionCore.transparentShader, "Trick Or Treat" + ((Object)((Component)this).gameObject).name, Color.red); } } else { RemoveAuraFromEnemy(); } } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown && (Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null && (Object)(object)aimedEnemy != (Object)null && aimedEnemy.isWaiting) { aimedEnemy.ApplyCurseEveryoneRpc(); LFCNetworkManager.Instance.DestroyObjectEveryoneRpc(NetworkObjectReference.op_Implicit(((Component)this).GetComponent())); } } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); RemoveAuraFromEnemy(); } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); RemoveAuraFromEnemy(); } public void RemoveAuraFromEnemy() { if ((Object)(object)aimedEnemy != (Object)null) { LFCCustomPassManager.RemoveAuraFromObjects((GameObject[])(object)new GameObject[1] { ((Component)aimedEnemy).gameObject }, "Trick Or Treat" + ((Object)((Component)this).gameObject).name); aimedEnemy = null; } } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "CursedCandy"; } } public class HollowGirl : EnemyAI { public enum State { WANDERING, CHASING, THROWING, INTERACTING } [CompilerGenerated] private sealed class d__31 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public HollowGirl <>4__this; private int 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_0049: Expected O, but got Unknown int num = <>1__state; HollowGirl hollowGirl = <>4__this; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; 5__2++; if (hollowGirl.isCursed) { goto IL_00aa; } } else { <>1__state = -1; hollowGirl.StartInteractingEveryoneRpc((int)((EnemyAI)hollowGirl).targetPlayer.playerClientId); 5__2 = 0; } if (5__2 < ConfigManager.waitingDuration.Value && Vector3.Distance(((Component)hollowGirl).transform.position, ((Component)((EnemyAI)hollowGirl).targetPlayer).transform.position) <= 20f) { <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; } goto IL_00aa; IL_00aa: hollowGirl.CancelInteractingCoroutine(); 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 d__22 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public HollowGirl <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__22(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { int num = <>1__state; HollowGirl hollowGirl = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; hollowGirl.CancelThrowCoroutine(); hollowGirl.CancelInteractingCoroutine(); hollowGirl.CancelSwingCoroutine(); ((EnemyAI)hollowGirl).agent.speed = 0f; hollowGirl.DoAnimationEveryoneRpc("startStun"); <>2__current = LFCEnemyManager.WaitForFullAnimation((EnemyAI)(object)hollowGirl, "stun", 10f, 0); <>1__state = 1; return true; case 1: <>1__state = -1; goto IL_009a; case 2: <>1__state = -1; goto IL_009a; case 3: { <>1__state = -1; break; } IL_009a: if (((EnemyAI)hollowGirl).stunNormalizedTimer > 0f) { <>2__current = null; <>1__state = 2; return true; } break; } if (((EnemyAI)hollowGirl).postStunInvincibilityTimer > 0f) { <>2__current = null; <>1__state = 3; return true; } hollowGirl.DoAnimationEveryoneRpc("startRun"); if (((EnemyAI)hollowGirl).currentBehaviourStateIndex != 1 && (Object)(object)((EnemyAI)hollowGirl).stunnedByPlayer != (Object)null) { ((EnemyAI)hollowGirl).targetPlayer = ((EnemyAI)hollowGirl).stunnedByPlayer; ((EnemyAI)hollowGirl).StopSearch(((EnemyAI)hollowGirl).currentSearch, true); ((EnemyAI)hollowGirl).SwitchToBehaviourClientRpc(1); } hollowGirl.stunCoroutine = null; 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 d__38 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public HollowGirl <>4__this; public PlayerControllerB player; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__38(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; HollowGirl hollowGirl = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; ((EnemyAI)hollowGirl).agent.speed = 0f; ((EnemyAI)hollowGirl).creatureAnimator.SetTrigger("startSwing"); ((EnemyAI)hollowGirl).creatureSFX.PlayOneShot(hollowGirl.SwingSound); player.DamagePlayer(ConfigManager.damage.Value, true, true, (CauseOfDeath)8, 0, false, default(Vector3)); <>2__current = LFCEnemyManager.WaitForFullAnimation((EnemyAI)(object)hollowGirl, "swing", 10f, 0); <>1__state = 1; return true; case 1: <>1__state = -1; ((EnemyAI)hollowGirl).creatureAnimator.SetTrigger("startRun"); ((EnemyAI)hollowGirl).agent.speed = 6f; hollowGirl.swingCoroutine = null; 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 d__27 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public HollowGirl <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__27(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: 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_00f3: 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_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_011c: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; HollowGirl hollowGirl = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; ((EnemyAI)hollowGirl).agent.speed = 0f; hollowGirl.DoAnimationEveryoneRpc("startIdle"); <>2__current = LFCEnemyManager.WaitForFullAnimation((EnemyAI)(object)hollowGirl, "idle", 10f, 0); <>1__state = 1; return true; case 1: <>1__state = -1; hollowGirl.DoAnimationEveryoneRpc("startThrow"); <>2__current = (object)new WaitForSeconds(0.13f); <>1__state = 2; return true; case 2: { <>1__state = -1; hollowGirl.PlayThrowEveryoneRpc(); GameObject val = Object.Instantiate(TrickOrTreat.cursedBallObj, ((Component)hollowGirl.ThrowPoint).transform.position, Quaternion.identity); val.GetComponent().Spawn(false); ((LFCBouncyAoEProjectile)val.GetComponent()).ThrowFromPositionEveryoneRpc(((NetworkBehaviour)hollowGirl).NetworkObjectId, ((Component)hollowGirl.ThrowPoint).transform.position, ((Component)((EnemyAI)hollowGirl).targetPlayer).transform.position + Vector3.up * 1.5f - ((Component)hollowGirl.ThrowPoint).transform.position, ((EnemyAI)hollowGirl).isOutside); <>2__current = LFCEnemyManager.WaitForFullAnimation((EnemyAI)(object)hollowGirl, "throw", 10f, 0); <>1__state = 3; return true; } case 3: <>1__state = -1; hollowGirl.DoAnimationEveryoneRpc("startRun"); hollowGirl.throwCoroutine = null; 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(); } } public Transform TurnCompass; public AudioClip[] FootstepSounds = Array.Empty(); public AudioClip SwingSound; public Transform ThrowPoint; public float footstepTimer; public float throwTimer; public float angerTimer; public float throwCooldown = 5f; public float angerCooldown = 30f; public bool canThrow; public bool isAngry; public bool isWaiting; public bool isCursed; public Coroutine stunCoroutine; public Coroutine throwCoroutine; public Coroutine interactingCoroutine; public Coroutine swingCoroutine; public override void Start() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); base.currentBehaviourStateIndex = 0; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); if (!LFCUtilities.IsServer) { return; } for (int i = 0; i < ConfigManager.maxCursedCandy.Value; i++) { if (i < ConfigManager.minCursedCandy.Value || Random.Range(1, 101) <= ConfigManager.cursedCandyRarity.Value) { LFCObjectsManager.SpawnNewObject(RoundManager.Instance, TrickOrTreat.cursedCandy, 0, 0); } } } public override void Update() { //IL_0043: 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_0069: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); PlayFootstepSound(); int currentBehaviourStateIndex = base.currentBehaviourStateIndex; if ((Object)(object)base.targetPlayer != (Object)null && (currentBehaviourStateIndex == 1 || currentBehaviourStateIndex == 3 || currentBehaviourStateIndex == 2)) { TurnCompass.LookAt(((Component)base.targetPlayer.gameplayCamera).transform.position); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(new Vector3(0f, TurnCompass.eulerAngles.y, 0f)), 4f * Time.deltaTime); } LFCUtilities.UpdateTimer(ref angerTimer, angerCooldown, isAngry, (Action)delegate { isAngry = false; }); LFCUtilities.UpdateTimer(ref throwTimer, throwCooldown, !canThrow, (Action)delegate { canThrow = true; }); } public void PlayFootstepSound() { AnimatorClipInfo[] currentAnimatorClipInfo = base.creatureAnimator.GetCurrentAnimatorClipInfo(0); if (currentAnimatorClipInfo.Length != 0 && (((Object)((AnimatorClipInfo)(ref currentAnimatorClipInfo[0])).clip).name.Contains("walk") || ((Object)((AnimatorClipInfo)(ref currentAnimatorClipInfo[0])).clip).name.Contains("run"))) { footstepTimer -= Time.deltaTime; if (FootstepSounds.Length != 0 && footstepTimer <= 0f) { base.creatureSFX.PlayOneShot(FootstepSounds[Random.Range(0, FootstepSounds.Length)]); footstepTimer = (((Object)((AnimatorClipInfo)(ref currentAnimatorClipInfo[0])).clip).name.Contains("walk") ? 0.6f : 0.4f); } } } public override void SetEnemyStunned(bool setToStunned, float setToStunTime = 1.917f, PlayerControllerB setStunnedByPlayer = null) { if (LFCUtilities.IsServer && setToStunned && stunCoroutine == null) { ((EnemyAI)this).SetEnemyStunned(setToStunned, setToStunTime, setStunnedByPlayer); stunCoroutine = ((MonoBehaviour)this).StartCoroutine(StunCoroutine()); } } [IteratorStateMachine(typeof(d__22))] public IEnumerator StunCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__22(0) { <>4__this = this }; } public override void DoAIInterval() { ((EnemyAI)this).DoAIInterval(); if (!base.isEnemyDead && !StartOfRound.Instance.allPlayersDead) { switch (base.currentBehaviourStateIndex) { case 0: DoWandering(); break; case 1: DoChasing(); break; case 2: DoThrowing(); break; case 3: DoInteracting(); break; } } } public void DoWandering() { base.agent.speed = 3f; if (LFCEnemyManager.FoundClosestPlayerInRange((EnemyAI)(object)this, 25, 10, 60f, false)) { ((EnemyAI)this).StopSearch(base.currentSearch, true); DoAnimationEveryoneRpc("startRun"); ((EnemyAI)this).SwitchToBehaviourClientRpc(1); } } public void DoChasing() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) if (swingCoroutine != null) { return; } base.agent.speed = 6f; if (LFCEnemyManager.TargetOutsideChasedPlayer((EnemyAI)(object)this)) { return; } float num = default(float); if (!LFCEnemyManager.TargetClosestPlayerInAnyCase((EnemyAI)(object)this, ref num, false) || (num > 30f && !((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer).transform.position, 45f, 60, -1f, (Transform)null))) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); DoAnimationEveryoneRpc("startWalk"); ((EnemyAI)this).SwitchToBehaviourClientRpc(0); return; } if (HoldingCursedCandy(base.targetPlayer)) { if (num <= 5f) { base.agent.speed = 0f; DoAnimationEveryoneRpc("startIdle"); ((EnemyAI)this).SwitchToBehaviourClientRpc(3); return; } } else if (!CanHitPlayer(base.targetPlayer) && num <= 15f && (num <= 2f || ((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer).transform.position, 45f, 60, -1f, (Transform)null))) { ((EnemyAI)this).SwitchToBehaviourClientRpc(2); return; } ((EnemyAI)this).SetMovingTowardsTargetPlayer(base.targetPlayer); } public void DoThrowing() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) if (throwCoroutine != null) { return; } base.agent.speed = 6f; float num = Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position); if (HoldingCursedCandy(base.targetPlayer)) { if (num <= 5f) { DoAnimationEveryoneRpc("startIdle"); ((EnemyAI)this).SwitchToBehaviourClientRpc(3); } else { ((EnemyAI)this).SwitchToBehaviourClientRpc(1); } } else if (CanHitPlayer(base.targetPlayer) || num > 20f || (num > 2f && !((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer).transform.position, 45f, 60, -1f, (Transform)null))) { ((EnemyAI)this).SwitchToBehaviourClientRpc(1); } else if (canThrow) { canThrow = false; throwCoroutine = ((MonoBehaviour)this).StartCoroutine(ThrowCoroutine()); } else { ((EnemyAI)this).SetMovingTowardsTargetPlayer(base.targetPlayer); } } [IteratorStateMachine(typeof(d__27))] public IEnumerator ThrowCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__27(0) { <>4__this = this }; } public void CancelThrowCoroutine() { if (throwCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(throwCoroutine); throwCoroutine = null; } } [Rpc(/*Could not decode attribute arguments.*/)] public void PlayThrowEveryoneRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_0085: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(24814623u, val2, val, (SendTo)6, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 24814623u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureVoice.Play(); } } } public void DoInteracting() { base.agent.speed = 0f; if (interactingCoroutine == null) { interactingCoroutine = ((MonoBehaviour)this).StartCoroutine(InteractingCoroutine()); } } [IteratorStateMachine(typeof(d__31))] public IEnumerator InteractingCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__31(0) { <>4__this = this }; } [Rpc(/*Could not decode attribute arguments.*/)] public void StartInteractingEveryoneRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1570185894u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1570185894u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; isWaiting = true; base.enemyType.canBeStunned = false; if (LFCUtilities.ShouldBeLocalPlayer(StartOfRound.Instance.allPlayerObjects[playerId].GetComponent())) { HUDManager.Instance.AddChatMessage("Trick or treat?", "Hollow Girl", -1, false); } } } public void CancelInteractingCoroutine() { if (interactingCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(interactingCoroutine); interactingCoroutine = null; EndInteractingEveryoneRpc(); } } [Rpc(/*Could not decode attribute arguments.*/)] public void EndInteractingEveryoneRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_0085: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(45174539u, val2, val, (SendTo)6, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 45174539u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetTrigger("startRun"); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); isAngry = true; isWaiting = false; base.enemyType.canBeStunned = true; } } } [Rpc(/*Could not decode attribute arguments.*/)] public void ApplyCurseEveryoneRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_0085: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2638001245u, val2, val, (SendTo)6, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2638001245u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; isCursed = true; LFCCustomPassManager.SetupAuraForObjects((GameObject[])(object)new GameObject[1] { ((Component)this).gameObject }, CursedScraps.cursedShader, "Trick Or Treat" + ((Object)CursedScraps.cursedShader).name, default(Color)); } } } public override void OnCollideWithPlayer(Collider other) { ((EnemyAI)this).OnCollideWithPlayer(other); if (base.currentBehaviourStateIndex == 1 && swingCoroutine == null) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if (LFCUtilities.ShouldBeLocalPlayer(val) && CanHitPlayer(val)) { SwingEveryoneRpc((int)val.playerClientId); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SwingEveryoneRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3131240733u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3131240733u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (swingCoroutine == null) { swingCoroutine = ((MonoBehaviour)this).StartCoroutine(SwingCoroutine(StartOfRound.Instance.allPlayerObjects[playerId].GetComponent())); } } } [IteratorStateMachine(typeof(d__38))] public IEnumerator SwingCoroutine(PlayerControllerB player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__38(0) { <>4__this = this, player = player }; } public void CancelSwingCoroutine() { if (swingCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(swingCoroutine); swingCoroutine = null; } } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { if (!base.isEnemyDead && CanHitPlayer(playerWhoHit)) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); base.enemyHP -= force; if (base.enemyHP <= 0 && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } } public bool CanHitPlayer(PlayerControllerB player) { if (!isCursed) { if ((Object)(object)player != (Object)null) { return CSCurseRegistry.HasCurse(((Component)player).gameObject); } return false; } return true; } public bool HoldingCursedCandy(PlayerControllerB player) { if (!isCursed && !isAngry && (Object)(object)player.currentlyHeldObjectServer != (Object)null) { return player.currentlyHeldObjectServer is CursedCandy; } return false; } [Rpc(/*Could not decode attribute arguments.*/)] public void DoAnimationEveryoneRpc(string animationState) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_00c3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1319403598u, val2, val, (SendTo)6, (RpcDelivery)0); bool flag = animationState != null; ((FastBufferWriter)(ref val3)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val3)).WriteValueSafe(animationState, false); } ((NetworkBehaviour)this).__endSendRpc(ref val3, 1319403598u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetTrigger(animationState); } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(24814623u, new RpcReceiveHandler(__rpc_handler_24814623), "PlayThrowEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(1570185894u, new RpcReceiveHandler(__rpc_handler_1570185894), "StartInteractingEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(45174539u, new RpcReceiveHandler(__rpc_handler_45174539), "EndInteractingEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(2638001245u, new RpcReceiveHandler(__rpc_handler_2638001245), "ApplyCurseEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(3131240733u, new RpcReceiveHandler(__rpc_handler_3131240733), "SwingEveryoneRpc"); ((NetworkBehaviour)this).__registerRpc(1319403598u, new RpcReceiveHandler(__rpc_handler_1319403598), "DoAnimationEveryoneRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_24814623(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((HollowGirl)(object)target).PlayThrowEveryoneRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1570185894(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((HollowGirl)(object)target).StartInteractingEveryoneRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_45174539(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((HollowGirl)(object)target).EndInteractingEveryoneRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2638001245(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((HollowGirl)(object)target).ApplyCurseEveryoneRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3131240733(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((HollowGirl)(object)target).SwingEveryoneRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1319403598(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string animationState = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationState, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((HollowGirl)(object)target).DoAnimationEveryoneRpc(animationState); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "HollowGirl"; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace TrickOrTreat.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }