using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using JetBrains.Annotations; using LCTarrotCard.Cards; using LCTarrotCard.Config; using LCTarrotCard.Event; using LCTarrotCard.Items; using LCTarrotCard.NetcodePatcher; using LCTarrotCard.Patches; using LCTarrotCard.Ressource; using LCTarrotCard.Util; using Unity.Netcode; using UnityEngine; using UnityEngine.Events; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("LCTarrotCard")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LCTarrotCard")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("9457633A-7E87-4BDB-8892-B9C127F9C677")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.3.0")] [module: NetcodePatchedAssembly] namespace LCTarrotCard { [HarmonyPatch] public class Networker : NetworkBehaviour { [CompilerGenerated] private sealed class <>c__DisplayClass39_0 { public DressGirlAI dressGirl; internal bool b__0() { return (Object)(object)((EnemyAI)dressGirl).agent != (Object)null; } } [CompilerGenerated] private sealed class <>c__DisplayClass44_0 { public FlowermanAI bracken; internal bool b__0() { return (Object)(object)((EnemyAI)bracken).agent != (Object)null; } } [CompilerGenerated] private sealed class <>c__DisplayClass47_0 { public MouthDogAI dog; internal bool b__0() { return (Object)(object)((EnemyAI)dog).agent != (Object)null; } } [CompilerGenerated] private sealed class <>c__DisplayClass57_0 { public EnemyAI enemy; internal bool b__0() { return (Object)(object)enemy.agent != (Object)null; } } [CompilerGenerated] private sealed class d__39 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public int playerId; public DressGirlAI dressGirl; public Networker <>4__this; private <>c__DisplayClass39_0 <>8__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__39(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass39_0(); <>8__1.dressGirl = dressGirl; <>2__current = (object)new WaitUntil((Func)(() => (Object)(object)((EnemyAI)<>8__1.dressGirl).agent != (Object)null)); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.LittleGirlChaseClientRpc(playerId, ((NetworkBehaviour)<>8__1.dressGirl).NetworkObjectId); 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__15 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public float delay; private List.Enumerator <>s__1; private EnemyAI 5__2; private JesterAI 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = default(List.Enumerator); 5__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1; PluginLogger.Debug("Popping jesters"); <>s__1 = RoundManager.Instance.SpawnedEnemies.GetEnumerator(); try { while (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; ref JesterAI reference = ref 5__3; EnemyAI obj = 5__2; reference = (JesterAI)(object)((obj is JesterAI) ? obj : null); if (5__3 != null && !((EnemyAI)5__3).isEnemyDead) { ((EnemyAI)5__3).SwitchToBehaviourState(2); } 5__3 = null; 5__2 = null; } } finally { ((IDisposable)<>s__1).Dispose(); } <>s__1 = default(List.Enumerator); 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__44 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public FlowermanAI bracken; public int playerId; public Networker <>4__this; private <>c__DisplayClass44_0 <>8__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__44(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass44_0(); <>8__1.bracken = bracken; <>2__current = (object)new WaitUntil((Func)(() => (Object)(object)((EnemyAI)<>8__1.bracken).agent != (Object)null)); <>1__state = 1; return true; case 1: <>1__state = -1; ((EnemyAI)<>8__1.bracken).SwitchToBehaviourState(2); ((EnemyAI)<>8__1.bracken).targetPlayer = StartOfRound.Instance.allPlayerScripts[playerId]; <>8__1.bracken.angerMeter = 2.5f; 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__47 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public MouthDogAI dog; public PlayerControllerB player; public Networker <>4__this; private <>c__DisplayClass47_0 <>8__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__47(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass47_0(); <>8__1.dog = dog; <>2__current = (object)new WaitUntil((Func)(() => (Object)(object)((EnemyAI)<>8__1.dog).agent != (Object)null)); <>1__state = 1; return true; case 1: <>1__state = -1; <>8__1.dog.ReactToOtherDogHowl(((Component)player).transform.position); 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__41 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerControllerB player; public bool critical; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__41(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.3f); <>1__state = 1; return true; case 1: <>1__state = -1; HUDManager.Instance.HideHUD(false); HUDManager.Instance.UpdateHealthUI(player.health, false); player.MakeCriticallyInjured(critical); <>2__current = (object)new WaitForSeconds(3f); <>1__state = 2; return true; case 2: <>1__state = -1; HUDManager.Instance.HideHUD(false); HUDManager.Instance.UpdateHealthUI(player.health, false); player.MakeCriticallyInjured(critical); 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__57 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public EnemyAI enemy; public Vector3 position; public bool exitEnter; public bool outside; private <>c__DisplayClass57_0 <>8__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__57(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass57_0(); <>8__1.enemy = enemy; <>2__current = (object)new WaitUntil((Func)(() => (Object)(object)<>8__1.enemy.agent != (Object)null)); <>1__state = 1; return true; case 1: <>1__state = -1; TeleportEnemy(<>8__1.enemy, position, exitEnter, outside); 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__59 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public NetworkObjectReference[] items; public int[] values; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__59(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.4f); <>1__state = 1; return true; case 1: <>1__state = -1; Instance.SyncItemsValuesClientRpc(items, values); 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 static bool AllowExtraLife; private static GameObject _networkPrefab; private static readonly int Closed = Animator.StringToHash("Closed"); private static readonly int Damage = Animator.StringToHash("Damage"); private static readonly int Limp = Animator.StringToHash("Limp"); public static Networker Instance { get; private set; } [ServerRpc(RequireOwnership = false)] public void KillPlayerServerRpc(int playerId, Vector3 velocity, CauseOfDeath causeOfDeath) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3834687756u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref velocity); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref causeOfDeath, default(ForEnums)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3834687756u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; KillPlayerClientRpc(playerId, velocity, causeOfDeath); } } } [ClientRpc] public void KillPlayerClientRpc(int playerId, Vector3 velocity, CauseOfDeath causeOfDeath) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(458956284u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref velocity); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref causeOfDeath, default(ForEnums)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 458956284u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB obj = StartOfRound.Instance.allPlayerScripts[playerId]; if (obj != null) { obj.KillPlayer(velocity, true, causeOfDeath, 0, default(Vector3), false); } } } [ServerRpc(RequireOwnership = false)] public void SetShipDoorStateServerRpc(bool opened) { //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_005f: 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_006d: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2570383561u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref opened, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2570383561u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetShipDoorStateClientRpc(opened); } } } [ClientRpc] public void SetShipDoorStateClientRpc(bool opened) { //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_005f: 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_006d: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3853642043u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref opened, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3853642043u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; HangarShipDoor[] array = Object.FindObjectsOfType(); foreach (HangarShipDoor val3 in array) { if (opened) { val3.SetDoorOpen(); val3.doorPower = 0f; } else { val3.SetDoorClosed(); val3.doorPower = 100f; } val3.shipDoorsAnimator.SetBool(Closed, !opened); } } [ServerRpc(RequireOwnership = false)] public void OpenOrCloseRandomDoorServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3893186342u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3893186342u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; OpenOrCloseRandomDoorClientRpc(playerId, new Random().Next()); } } } [ClientRpc] public void OpenOrCloseRandomDoorClientRpc(int playerId, int rngSeed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4244542400u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); BytePacker.WriteValueBitPacked(val2, rngSeed); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4244542400u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; Random random = new Random(rngSeed); DoorLock[] array = Object.FindObjectsOfType(); foreach (DoorLock val3 in array) { if (random.Next(0, 2) == 0) { val3.OpenOrCloseDoor(StartOfRound.Instance.allPlayerScripts[playerId]); } } } [ServerRpc(RequireOwnership = false)] public void BreakerOffServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(964378104u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 964378104u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; BreakerOffClientRpc(); } } } [ClientRpc] public void BreakerOffClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3070260538u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3070260538u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.SwitchPower(false); BreakerBox[] array = Object.FindObjectsOfType(); BreakerBox[] array2 = array; foreach (BreakerBox val3 in array2) { val3.SetSwitchesOff(); } } } [ServerRpc(RequireOwnership = false)] public void AgroCoilheadOrSpawnServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3486020106u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3486020106u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; SpringManAI[] array = Object.FindObjectsOfType(); int num = 0; SpringManAI[] array2 = array; foreach (SpringManAI val3 in array2) { if (!((EnemyAI)val3).isEnemyDead && ((NetworkBehaviour)val3).IsSpawned) { num++; ((EnemyAI)val3).SwitchToBehaviourState(1); if (!SpringManAIPatch.ChasingSprings.Contains(((NetworkBehaviour)val3).NetworkObjectId)) { SpringManAIPatch.ChasingSprings.Add(((NetworkBehaviour)val3).NetworkObjectId); } } if (num >= 2) { return; } } SpawnCoilheadServerRpc(); } [ServerRpc(RequireOwnership = false)] public void SpawnCoilheadServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00f1: 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_00fd: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(866308243u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 866308243u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; Transform randomSpawnLocation = Helper.GetRandomSpawnLocation(); if ((Object)(object)randomSpawnLocation == (Object)null) { PluginLogger.Error("No spawn location found"); return; } Vector3 position = randomSpawnLocation.position; GameObject val3 = Object.Instantiate(Helper.Enemies.SpringMan.enemyPrefab, position, Quaternion.identity); val3.GetComponentInChildren().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val3.GetComponent()); ((EnemyAI)val3.GetComponent()).SetEnemyOutside(false); ((EnemyAI)val3.GetComponent()).SwitchToBehaviourState(1); if (!SpringManAIPatch.ChasingSprings.Contains(((NetworkBehaviour)val3.GetComponent()).NetworkObjectId)) { SpringManAIPatch.ChasingSprings.Add(((NetworkBehaviour)val3.GetComponent()).NetworkObjectId); } } [ServerRpc(RequireOwnership = false)] public void PopOrSpawnJesterServerRpc(float popDelay) { //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_005f: 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_006d: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(900698346u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref popDelay, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 900698346u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; bool flag = false; foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { JesterAI val3 = (JesterAI)(object)((spawnedEnemy is JesterAI) ? spawnedEnemy : null); if (val3 != null && !((EnemyAI)val3).isEnemyDead) { if (((EnemyAI)val3).currentBehaviourStateIndex == 2) { return; } flag = true; } } if (!flag) { Transform randomSpawnLocation = Helper.GetRandomSpawnLocation(); if ((Object)(object)randomSpawnLocation == (Object)null) { PluginLogger.Error("No spawn location found"); return; } Vector3 position = randomSpawnLocation.position; GameObject val4 = Object.Instantiate(Helper.Enemies.Jester.enemyPrefab, position, Quaternion.identity); val4.GetComponentInChildren().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val4.GetComponent()); ((EnemyAI)val4.GetComponent()).SetEnemyOutside(false); ((EnemyAI)val4.GetComponent()).SwitchToBehaviourState(1); } ((MonoBehaviour)this).StartCoroutine(PopDelay(popDelay)); } [IteratorStateMachine(typeof(d__15))] private static IEnumerator PopDelay(float delay) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__15(0) { delay = delay }; } [ServerRpc(RequireOwnership = false)] public void SpawnGiantOrDogServerRpc(int amount) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_017a: 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_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(6427069u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, amount); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 6427069u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; for (int i = 0; i < amount; i++) { Transform randomSpawnLocation = Helper.GetRandomSpawnLocation(inside: false); if (!((Object)(object)randomSpawnLocation == (Object)null)) { Vector3 position = randomSpawnLocation.position; if (Random.Range(0, 2) == 0) { PluginLogger.Debug("Spawn giant"); GameObject val3 = Object.Instantiate(Helper.Enemies.ForestGiant.enemyPrefab, position, Quaternion.identity); val3.GetComponentInChildren().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val3.GetComponent()); ((EnemyAI)val3.GetComponent()).SetEnemyOutside(true); } else { PluginLogger.Debug("Spawn dog"); GameObject val4 = Object.Instantiate(Helper.Enemies.MouthDog.enemyPrefab, position, Quaternion.identity); val4.GetComponentInChildren().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val4.GetComponent()); ((EnemyAI)val4.GetComponent()).SetEnemyOutside(true); } } } } [ServerRpc(RequireOwnership = false)] public void TeleportRandomEntityServerRpc(Vector3 position, bool inside) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0188: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1980060841u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref inside, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1980060841u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; bool inside2 = inside; List spawnedEnemies = RoundManager.Instance.SpawnedEnemies; Helper.Shuffle(spawnedEnemies); using IEnumerator enumerator = spawnedEnemies.Where((EnemyAI enemy) => !enemy.isEnemyDead && enemy.isOutside == !inside2 && ((NetworkBehaviour)enemy).IsSpawned).GetEnumerator(); if (enumerator.MoveNext()) { EnemyAI current = enumerator.Current; PluginLogger.Debug("Enemy is outside ? " + current.isOutside + " player inside ? " + inside2); string enemyName = current.enemyType.enemyName; Vector3 val3 = position; PluginLogger.Debug("Tp " + enemyName + " to " + ((object)(Vector3)(ref val3)).ToString()); TeleportEnemy(current, position); } } [ServerRpc(RequireOwnership = false)] public void GhostBreatheServerRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_00d5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3054328150u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3054328150u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; GhostBreatheClientRpc(position); } } } [ClientRpc] public void GhostBreatheClientRpc(Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_00d9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1597565073u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1597565073u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AudioSource.PlayClipAtPoint(Assets.GhostBreathe, position, 4f); } } } [ServerRpc(RequireOwnership = false)] public void TeleportEnemyAwayServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_0101: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3427511879u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3427511879u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; List spawnedEnemies = RoundManager.Instance.SpawnedEnemies; foreach (EnemyAI item in spawnedEnemies) { Vector3 position = item.ChooseFarthestNodeFromPosition(((Component)item).transform.position, false, 0, false, 50, -1).position; TeleportEnemy(item, position); } } [ServerRpc(RequireOwnership = false)] public void TeleportPlayerServerRpc(int playerId, Vector3 position, bool inside = true, bool insideShip = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1409835055u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref inside, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref insideShip, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1409835055u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TeleportPlayerClientRpc(playerId, position, inside, insideShip); } } } [ClientRpc] public void TeleportPlayerClientRpc(int playerId, Vector3 position, bool inside = true, bool insideShip = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0184: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3340935527u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref inside, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref insideShip, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3340935527u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; val3.StopSinkingServerRpc(); if (Object.op_Implicit((Object)(object)val3.currentTriggerInAnimationWith)) { val3.currentTriggerInAnimationWith.CancelAnimationExternally(); } val3.inSpecialInteractAnimation = false; val3.isClimbingLadder = false; val3.isInElevator = insideShip; val3.isInHangarShipRoom = insideShip; val3.isInsideFactory = inside; val3.averageVelocity = 0f; val3.velocityLastFrame = Vector3.zero; val3.TeleportPlayer(position, false, 0f, false, true); val3.beamOutParticle.Play(); if (playerId == (int)GameNetworkManager.Instance.localPlayerController.playerClientId) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } if (Object.op_Implicit((Object)(object)Object.FindObjectOfType())) { if (val3.isInsideFactory) { Object.FindObjectOfType().audioPresets[2].ChangeAudioReverbForPlayer(val3); } else { Object.FindObjectOfType().audioPresets[3].ChangeAudioReverbForPlayer(val3); } } } [ServerRpc(RequireOwnership = false)] public void SetPlayerHealthServerRpc(int playerId, int health) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2066064276u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); BytePacker.WriteValueBitPacked(val2, health); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2066064276u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetPlayerHealthClientRpc(playerId, health); } } } [ClientRpc] public void SetPlayerHealthClientRpc(int playerId, int health) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3250666723u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); BytePacker.WriteValueBitPacked(val2, health); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3250666723u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (health <= 0) { health = 1; } PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; int health2 = val3.health; val3.health = health; if (((NetworkBehaviour)val3).IsOwner) { HUDManager.Instance.UpdateHealthUI(health, health2 > health); if (health <= 20 && !val3.criticallyInjured) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); val3.MakeCriticallyInjured(true); } else if (val3.criticallyInjured && health > 20) { val3.MakeCriticallyInjured(false); } } if (health2 > health) { return; } if (((NetworkBehaviour)val3).IsOwner) { ((MonoBehaviour)this).StartCoroutine(SetPlayerUI(val3, health <= 20)); ((UnityEvent)StartOfRound.Instance.LocalPlayerDamagedEvent).Invoke(); val3.takingFallDamage = false; if (val3.inSpecialInteractAnimation && !val3.twoHandedAnimation) { val3.playerBodyAnimator.SetTrigger(Damage); } val3.specialAnimationWeight = 1f; val3.PlayQuickSpecialAnimation(0.7f); } PlayerStats obj = val3.playersManager.gameStats.allPlayerStats[val3.playerClientId]; obj.damageTaken += health2 - health; val3.timeSinceTakingDamage = Time.realtimeSinceStartup; } [ServerRpc(RequireOwnership = false)] public void DamagePlayerServerRpc(int playerId, int damage, Vector3 velocity, CauseOfDeath causeOfDeath) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00be: 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_010c: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3843812035u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); BytePacker.WriteValueBitPacked(val2, damage); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref velocity); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref causeOfDeath, default(ForEnums)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3843812035u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; DamagePlayerClientRpc(playerId, damage, velocity, causeOfDeath); } } } [ClientRpc] public void DamagePlayerClientRpc(int playerId, int damage, Vector3 velocity, CauseOfDeath causeOfDeath) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00be: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2442547416u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); BytePacker.WriteValueBitPacked(val2, damage); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref velocity); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref causeOfDeath, default(ForEnums)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2442547416u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; val3.DamagePlayer(damage, true, true, causeOfDeath, 0, false, velocity); } } } [ServerRpc(RequireOwnership = false)] public void MultiplyInventoryValueServerRpc(int playerId, float multiplier) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2278377068u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref multiplier, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2278377068u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MultiplyInventoryValueClientRpc(playerId, multiplier); } } } [ClientRpc] public void MultiplyInventoryValueClientRpc(int playerId, float multiplier) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1897849939u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref multiplier, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1897849939u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (StartOfRound.Instance.allPlayerScripts.Length <= playerId || !StartOfRound.Instance.allPlayerScripts[playerId].isPlayerControlled) { return; } GrabbableObject[] itemSlots = StartOfRound.Instance.allPlayerScripts[playerId].ItemSlots; foreach (GrabbableObject val3 in itemSlots) { if ((Object)(object)val3 != (Object)null && ((Behaviour)val3).enabled && val3.itemProperties.isScrap && val3.scrapValue > 0) { val3.SetScrapValue((int)((float)val3.scrapValue * multiplier)); } } } [ServerRpc(RequireOwnership = false)] public void MultiplyRandomScrapValueServerRpc(float multiplier) { //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_005f: 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_006d: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2149202328u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref multiplier, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2149202328u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MultiplyRandomScrapValueClientRpc(multiplier, new Random().Next()); } } } [ClientRpc] public void MultiplyRandomScrapValueClientRpc(float multiplier, int randomSeed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: 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_0083: 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_00a4: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1951809462u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref multiplier, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, randomSeed); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1951809462u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; Random random = new Random(randomSeed); GrabbableObject[] array = Object.FindObjectsOfType(); GrabbableObject[] array2 = array; foreach (GrabbableObject val3 in array2) { if ((Object)(object)val3 != (Object)null && ((Behaviour)val3).enabled && val3.itemProperties.isScrap && val3.scrapValue > 0 && random.Next(0, 5) == 0) { val3.SetScrapValue((int)((float)val3.scrapValue * multiplier)); } } } [ServerRpc(RequireOwnership = false)] public void RevivePlayerServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2243418972u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2243418972u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RevivePlayerClientRpc(playerId); } } } [ClientRpc] public void RevivePlayerClientRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_050d: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_0517: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2685453368u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2685453368u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!val3.isPlayerDead && !val3.isPlayerControlled) { return; } val3.ResetPlayerBloodObjects(true); val3.isClimbingLadder = false; val3.clampLooking = false; val3.inVehicleAnimation = false; val3.disableMoveInput = false; val3.ResetZAndXRotation(); ((Collider)val3.thisController).enabled = true; val3.health = 100; val3.hasBeenCriticallyInjured = false; val3.disableLookInput = false; val3.disableInteract = false; if (val3.isPlayerDead) { val3.isPlayerDead = false; val3.isPlayerControlled = true; val3.isInElevator = true; val3.isInHangarShipRoom = true; val3.isInsideFactory = false; val3.parentedToElevatorLastFrame = false; val3.overrideGameOverSpectatePivot = null; StartOfRound.Instance.SetPlayerObjectExtrapolate(false); val3.TeleportPlayer(StartOfRound.Instance.playerSpawnPositions[0].position, false, 0f, false, true); val3.setPositionOfDeadPlayer = false; val3.DisablePlayerModel(StartOfRound.Instance.allPlayerObjects[playerId], true, true); ((Behaviour)val3.helmetLight).enabled = false; val3.Crouch(false); val3.criticallyInjured = false; if (Object.op_Implicit((Object)(object)val3.playerBodyAnimator)) { val3.playerBodyAnimator.SetBool(Limp, false); } val3.bleedingHeavily = false; val3.activatingItem = false; val3.twoHanded = false; val3.inShockingMinigame = false; val3.inSpecialInteractAnimation = false; val3.freeRotationInInteractAnimation = false; val3.disableSyncInAnimation = false; val3.inAnimationWithEnemy = null; val3.holdingWalkieTalkie = false; val3.speakingToWalkieTalkie = false; val3.isSinking = false; val3.isUnderwater = false; val3.sinkingValue = 0f; val3.statusEffectAudio.Stop(); val3.DisableJetpackControlsLocally(); val3.health = 100; val3.mapRadarDotAnimator.SetBool("dead", false); val3.externalForceAutoFade = Vector3.zero; if (((NetworkBehaviour)val3).IsOwner) { HUDManager.Instance.gasHelmetAnimator.SetBool("gasEmitting", false); val3.hasBegunSpectating = false; HUDManager.Instance.RemoveSpectateUI(); HUDManager.Instance.gameOverAnimator.SetTrigger("revive"); val3.hinderedMultiplier = 1f; val3.isMovementHindered = 0; val3.sourcesCausingSinking = 0; val3.reverbPreset = StartOfRound.Instance.shipReverb; } } if (((NetworkBehaviour)val3).IsOwner) { SoundManager.Instance.earsRingingTimer = 0f; val3.bleedingHeavily = false; val3.criticallyInjured = false; val3.playerBodyAnimator.SetBool(Limp, false); val3.health = 100; HUDManager.Instance.UpdateHealthUI(100, false); val3.spectatedPlayerScript = null; ((Behaviour)HUDManager.Instance.audioListenerLowPass).enabled = false; StartOfRound.Instance.SetSpectateCameraToGameOverMode(false, val3); ((MonoBehaviour)this).StartCoroutine(SetPlayerUI(val3)); } val3.voiceMuffledByEnemy = false; SoundManager.Instance.playerVoicePitchTargets[playerId] = 1f; SoundManager.Instance.SetPlayerPitch(1f, playerId); if (Object.op_Implicit((Object)(object)val3.currentVoiceChatIngameSettings)) { if (!Object.op_Implicit((Object)(object)val3.currentVoiceChatIngameSettings.voiceAudio)) { val3.currentVoiceChatIngameSettings.InitializeComponents(); } if (!Object.op_Implicit((Object)(object)val3.currentVoiceChatIngameSettings.voiceAudio)) { return; } ((Component)val3.currentVoiceChatIngameSettings.voiceAudio).GetComponent().overridingLowPass = false; } RagdollGrabbableObject[] array = Object.FindObjectsOfType(); RagdollGrabbableObject[] array2 = array; foreach (RagdollGrabbableObject val4 in array2) { if (val4.ragdoll.playerObjectId != playerId) { continue; } if (!((GrabbableObject)val4).isHeld) { if (((NetworkBehaviour)this).IsServer) { if (((NetworkBehaviour)val4).NetworkObject.IsSpawned) { ((NetworkBehaviour)val4).NetworkObject.Despawn(true); } else { Object.Destroy((Object)(object)((Component)val4).gameObject); } } } else if (Object.op_Implicit((Object)(object)((GrabbableObject)val4).playerHeldBy)) { ((GrabbableObject)val4).playerHeldBy.DropAllHeldItems(true, false, false, false, default(Vector3), default(Vector3), default(Vector3), default(Vector3), default(Vector3)); } } DeadBodyInfo[] array3 = Object.FindObjectsOfType(); DeadBodyInfo[] array4 = array3; foreach (DeadBodyInfo val5 in array4) { if (val5.playerObjectId == playerId) { Object.Destroy((Object)(object)((Component)val5).gameObject); } } StartOfRound instance = StartOfRound.Instance; instance.livingPlayers++; StartOfRound.Instance.allPlayersDead = false; StartOfRound.Instance.UpdatePlayerVoiceEffects(); } [ServerRpc(RequireOwnership = false)] public void AllowExtraLifeServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1979062494u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1979062494u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AllowExtraLifeClientRpc(allow: true); } } } [ClientRpc] public void AllowExtraLifeClientRpc(bool allow) { //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_005f: 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_006d: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1996833951u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref allow, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1996833951u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AllowExtraLife = allow; } } } [ServerRpc(RequireOwnership = false)] public void ExtraLifeServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_0119: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2363699914u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2363699914u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (AllowExtraLife) { PluginLogger.Debug("extra life " + StartOfRound.Instance.allPlayerScripts[playerId].playerUsername); AllowExtraLifeClientRpc(allow: false); TeleportPlayerServerRpc(playerId, StartOfRound.Instance.playerSpawnPositions[0].position, inside: false, insideShip: true); ExtraLifeClientRpc(playerId); } } } [ClientRpc] public void ExtraLifeClientRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3667127957u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3667127957u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; val3.health = 100; val3.isPlayerDead = false; val3.MakeCriticallyInjured(false); if (((NetworkBehaviour)val3).IsOwner) { ((MonoBehaviour)this).StartCoroutine(SetPlayerUI(val3)); HUDManager.Instance.UpdateHealthUI(100, false); } if (((NetworkBehaviour)StartOfRound.Instance.allPlayerScripts[playerId]).IsOwner) { HUDManager.Instance.DisplayTip("Extra life", "Thanks to the high priestess card, you are given an extra chance to live", false, false, "LC_Tip1"); } } } [ServerRpc(RequireOwnership = false)] public void LittleGirlChaseServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2042389035u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2042389035u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; DressGirlAI val3 = null; foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { DressGirlAI val4 = (DressGirlAI)(object)((spawnedEnemy is DressGirlAI) ? spawnedEnemy : null); if (val4 == null || ((EnemyAI)val4).isEnemyDead || !((NetworkBehaviour)val4).IsSpawned) { continue; } val3 = val4; break; } if ((Object)(object)val3 == (Object)null) { Transform randomSpawnLocation = Helper.GetRandomSpawnLocation(); if ((Object)(object)randomSpawnLocation == (Object)null) { PluginLogger.Error("No spawn location found"); return; } Vector3 position = randomSpawnLocation.position; GameObject val5 = Object.Instantiate(Helper.Enemies.DressGirl.enemyPrefab, position, Quaternion.identity); val5.GetComponentInChildren().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val5.GetComponent()); ((EnemyAI)val5.GetComponent()).SetEnemyOutside(false); val3 = val5.GetComponent(); } val3.hauntingPlayer = StartOfRound.Instance.allPlayerScripts[playerId]; ((MonoBehaviour)this).StartCoroutine(DelaySetGirlProperties(playerId, val3)); } [IteratorStateMachine(typeof(d__39))] private IEnumerator DelaySetGirlProperties(int playerId, DressGirlAI dressGirl) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__39(0) { <>4__this = this, playerId = playerId, dressGirl = dressGirl }; } [ClientRpc] public void LittleGirlChaseClientRpc(int playerId, ulong networkId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2969223326u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); BytePacker.WriteValueBitPacked(val2, networkId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2969223326u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; ulong networkId2 = networkId; if (playerId != (int)GameNetworkManager.Instance.localPlayerController.playerClientId) { return; } EnemyAI? obj = ((IEnumerable)RoundManager.Instance.SpawnedEnemies).FirstOrDefault((Func)((EnemyAI enemy) => ((NetworkBehaviour)enemy).NetworkObjectId == networkId2)); DressGirlAI val3 = (DressGirlAI)(object)((obj is DressGirlAI) ? obj : null); if ((Object)(object)val3 == (Object)null) { return; } PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId == playerId) { Vector3 position = ((Component)val4).transform.position + ((Component)val4).transform.forward * 5f; if (((NetworkBehaviour)val3).OwnerClientId != GameNetworkManager.Instance.localPlayerController.actualClientId) { ((EnemyAI)val3).ChangeOwnershipOfEnemy(GameNetworkManager.Instance.localPlayerController.actualClientId); } TeleportEnemy((EnemyAI)(object)val3, position); ((EnemyAI)val3).EnableEnemyMesh(true, true, false); ((EnemyAI)val3).SwitchToBehaviourStateOnLocalClient(1); val3.staringInHaunt = false; val3.disappearingFromStare = false; ((EnemyAI)val3).agent.speed = 5.25f; ((EnemyAI)val3).creatureAnimator.SetBool("Walk", true); val3.timer = 0f; ((EnemyAI)val3).SetMovingTowardsTargetPlayer(val4); ((EnemyAI)val3).moveTowardsDestination = true; ((EnemyAI)val3).creatureVoice.volume = 1f; ((EnemyAI)val3).creatureVoice.clip = val3.breathingSFX; ((EnemyAI)val3).creatureVoice.Play(); val3.SFXVolumeLerpTo = 1f; ((EnemyAI)val3).creatureSFX.volume = 1f; if (!DressGirlAIPatch.ChaseTimes.ContainsKey(((NetworkBehaviour)val3).NetworkObjectId)) { DressGirlAIPatch.ChaseTimes.Add(((NetworkBehaviour)val3).NetworkObjectId, Time.time); } } val3.hauntingPlayer = val4; if (!DressGirlAIPatch.ChasingGirls.ContainsKey(((NetworkBehaviour)val3).NetworkObjectId)) { DressGirlAIPatch.ChasingGirls.Add(((NetworkBehaviour)val3).NetworkObjectId, playerId); } } [IteratorStateMachine(typeof(d__41))] private static IEnumerator SetPlayerUI(PlayerControllerB player, bool critical = false) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__41(0) { player = player, critical = critical }; } [ServerRpc(RequireOwnership = false)] public void AgroBrackenOrSpawnServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(587640117u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 587640117u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (!StartOfRound.Instance.allPlayerScripts[playerId].isPlayerControlled) { return; } FlowermanAI val3 = null; foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { FlowermanAI val4 = (FlowermanAI)(object)((spawnedEnemy is FlowermanAI) ? spawnedEnemy : null); if (val4 == null || ((EnemyAI)val4).isEnemyDead || !((NetworkBehaviour)val4).IsSpawned) { continue; } val3 = val4; break; } if ((Object)(object)val3 == (Object)null) { Transform randomSpawnLocation = Helper.GetRandomSpawnLocation(); if ((Object)(object)randomSpawnLocation == (Object)null) { PluginLogger.Error("No spawn location found"); return; } Vector3 position = randomSpawnLocation.position; GameObject val5 = Object.Instantiate(Helper.Enemies.FlowerMan.enemyPrefab, position, Quaternion.identity); val5.GetComponentInChildren().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val5.GetComponent()); ((EnemyAI)val5.GetComponent()).SetEnemyOutside(false); val3 = val5.GetComponent(); ((EnemyAI)val3).SyncPositionToClients(); } SyncBrackenPropertiesClientRpc(playerId, ((NetworkBehaviour)val3).NetworkObjectId); } [ClientRpc] public void SyncBrackenPropertiesClientRpc(int playerId, ulong networkId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(997310661u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); BytePacker.WriteValueBitPacked(val2, networkId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 997310661u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; ulong networkId2 = networkId; EnemyAI? obj = ((IEnumerable)RoundManager.Instance.SpawnedEnemies).FirstOrDefault((Func)((EnemyAI enemy) => ((NetworkBehaviour)enemy).NetworkObjectId == networkId2)); FlowermanAI val3 = (FlowermanAI)(object)((obj is FlowermanAI) ? obj : null); if (!((Object)(object)val3 == (Object)null)) { if (!FlowermanAIPatch.AngryBrackens.ContainsKey(((NetworkBehaviour)val3).NetworkObjectId)) { FlowermanAIPatch.AngryBrackens.Add(((NetworkBehaviour)val3).NetworkObjectId, new KeyValuePair(playerId, Time.time)); } ((MonoBehaviour)this).StartCoroutine(SetBrackenProperties(val3, playerId)); } } [IteratorStateMachine(typeof(d__44))] private IEnumerator SetBrackenProperties(FlowermanAI bracken, int playerId) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__44(0) { <>4__this = this, bracken = bracken, playerId = playerId }; } [ServerRpc(RequireOwnership = false)] public void DogChaseOrSpawnServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(619641325u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 619641325u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (!StartOfRound.Instance.allPlayerScripts[playerId].isPlayerControlled) { return; } MouthDogAI val3 = null; foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { MouthDogAI val4 = (MouthDogAI)(object)((spawnedEnemy is MouthDogAI) ? spawnedEnemy : null); if (val4 == null || ((EnemyAI)val4).isEnemyDead || !((NetworkBehaviour)val4).IsSpawned) { continue; } val3 = val4; break; } if ((Object)(object)val3 == (Object)null) { Transform randomSpawnLocation = Helper.GetRandomSpawnLocation(inside: false); if ((Object)(object)randomSpawnLocation == (Object)null) { PluginLogger.Error("No spawn location found"); return; } Vector3 position = randomSpawnLocation.position; GameObject val5 = Object.Instantiate(Helper.Enemies.MouthDog.enemyPrefab, position, Quaternion.identity); val5.GetComponentInChildren().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val5.GetComponent()); ((EnemyAI)val5.GetComponent()).SetEnemyOutside(false); val3 = val5.GetComponent(); ((EnemyAI)val3).SyncPositionToClients(); } SyncDogPropertiesClientRpc(playerId, ((NetworkBehaviour)val3).NetworkObjectId); } [ClientRpc] public void SyncDogPropertiesClientRpc(int playerId, ulong networkId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1416483757u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); BytePacker.WriteValueBitPacked(val2, networkId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1416483757u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; ulong networkId2 = networkId; EnemyAI? obj = ((IEnumerable)RoundManager.Instance.SpawnedEnemies).FirstOrDefault((Func)((EnemyAI enemy) => ((NetworkBehaviour)enemy).NetworkObjectId == networkId2)); MouthDogAI val3 = (MouthDogAI)(object)((obj is MouthDogAI) ? obj : null); if (!((Object)(object)val3 == (Object)null)) { if (!MouthDogAIPatch.ChasingDogs.ContainsKey(((NetworkBehaviour)val3).NetworkObjectId)) { MouthDogAIPatch.ChasingDogs.Add(((NetworkBehaviour)val3).NetworkObjectId, playerId); } ((MonoBehaviour)this).StartCoroutine(SetDogProperties(val3, StartOfRound.Instance.allPlayerScripts[playerId])); } } [IteratorStateMachine(typeof(d__47))] private IEnumerator SetDogProperties(MouthDogAI dog, PlayerControllerB player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__47(0) { <>4__this = this, dog = dog, player = player }; } [ServerRpc(RequireOwnership = false)] public void SetDogPathServerRpc(ulong dogId, int targetedPlayer) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(153040076u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, dogId); BytePacker.WriteValueBitPacked(val2, targetedPlayer); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 153040076u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetDogPathClientRpc(dogId, targetedPlayer); } } } [ClientRpc] public void SetDogPathClientRpc(ulong dogId, int targetedPlayer) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3082485029u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, dogId); BytePacker.WriteValueBitPacked(val2, targetedPlayer); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3082485029u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; ulong dogId2 = dogId; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[targetedPlayer]; if (val3.isPlayerControlled) { EnemyAI? obj = ((IEnumerable)RoundManager.Instance.SpawnedEnemies).FirstOrDefault((Func)((EnemyAI enemy) => ((NetworkBehaviour)enemy).NetworkObjectId == dogId2)); MouthDogAI val4 = (MouthDogAI)(object)((obj is MouthDogAI) ? obj : null); if (!((Object)(object)val4 == (Object)null)) { val4.ReactToOtherDogHowl(((Component)val3).transform.position); val4.suspicionLevel = 12; } } } [ServerRpc(RequireOwnership = false)] public void ShipLeaveEarlyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(625178223u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 625178223u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ShipLeaveEarlyClientRpc(); } } } [ClientRpc] public void ShipLeaveEarlyClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(955694953u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 955694953u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TimeOfDay.Instance.votesForShipToLeaveEarly = StartOfRound.Instance.connectedPlayersAmount + 1 - StartOfRound.Instance.livingPlayers; TimeOfDay.Instance.SetShipLeaveEarlyServerRpc(); } } } [ServerRpc(RequireOwnership = false)] public void GiantChasePlayerOrSpawnServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(395535226u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 395535226u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!val3.isPlayerControlled) { return; } ForestGiantAI val4 = null; foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { ForestGiantAI val5 = (ForestGiantAI)(object)((spawnedEnemy is ForestGiantAI) ? spawnedEnemy : null); if (val5 == null || ((EnemyAI)val5).isEnemyDead || !((NetworkBehaviour)val5).IsSpawned) { continue; } val4 = val5; break; } if ((Object)(object)val4 == (Object)null) { Transform randomSpawnLocation = Helper.GetRandomSpawnLocation(inside: false); if ((Object)(object)randomSpawnLocation == (Object)null) { PluginLogger.Error("No spawn location found"); return; } Vector3 position = randomSpawnLocation.position; GameObject val6 = Object.Instantiate(Helper.Enemies.ForestGiant.enemyPrefab, position, Quaternion.identity); val6.GetComponentInChildren().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val6.GetComponent()); ((EnemyAI)val6.GetComponent()).SetEnemyOutside(false); val4 = val6.GetComponent(); ((EnemyAI)val4).SyncPositionToClients(); } GiantSetPropertiesClientRpc(playerId, ((NetworkBehaviour)val4).NetworkObjectId); } [ClientRpc] public void GiantSetPropertiesClientRpc(int playerId, ulong networkId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(968152725u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); BytePacker.WriteValueBitPacked(val2, networkId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 968152725u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; ulong networkId2 = networkId; EnemyAI? obj = ((IEnumerable)RoundManager.Instance.SpawnedEnemies).FirstOrDefault((Func)((EnemyAI enemy) => ((NetworkBehaviour)enemy).NetworkObjectId == networkId2)); ForestGiantAI val3 = (ForestGiantAI)(object)((obj is ForestGiantAI) ? obj : null); if (!((Object)(object)val3 == (Object)null)) { PluginLogger.Debug("Adding giant to chasing list"); if (!ForestGiantAIPatch.ChasingGiants.ContainsKey(((NetworkBehaviour)val3).NetworkObjectId)) { ForestGiantAIPatch.ChasingGiants.Add(((NetworkBehaviour)val3).NetworkObjectId, playerId); } } } [ServerRpc(RequireOwnership = false)] public void BirdChaseOrSpawnServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3885904354u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3885904354u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!val3.isPlayerControlled) { return; } RadMechAI val4 = null; foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { RadMechAI val5 = (RadMechAI)(object)((spawnedEnemy is RadMechAI) ? spawnedEnemy : null); if (val5 == null || ((EnemyAI)val5).isEnemyDead || !((NetworkBehaviour)val5).IsSpawned) { continue; } val4 = val5; break; } if ((Object)(object)val4 == (Object)null) { Transform randomSpawnLocation = Helper.GetRandomSpawnLocation(inside: false); if ((Object)(object)randomSpawnLocation == (Object)null) { PluginLogger.Error("No spawn location found"); return; } Vector3 position = randomSpawnLocation.position; GameObject val6 = Object.Instantiate(Helper.Enemies.RadMech.enemyPrefab, position, Quaternion.identity); val6.GetComponentInChildren().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val6.GetComponent()); ((EnemyAI)val6.GetComponent()).SetEnemyOutside(false); val4 = val6.GetComponent(); ((EnemyAI)val4).SyncPositionToClients(); } BirdSetPropertiesClientRpc(playerId, ((NetworkBehaviour)val4).NetworkObjectId); } [ClientRpc] public void BirdSetPropertiesClientRpc(int playerId, ulong networkId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3496348290u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); BytePacker.WriteValueBitPacked(val2, networkId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3496348290u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; ulong networkId2 = networkId; EnemyAI? obj = ((IEnumerable)RoundManager.Instance.SpawnedEnemies).FirstOrDefault((Func)((EnemyAI enemy) => ((NetworkBehaviour)enemy).NetworkObjectId == networkId2)); RadMechAI val3 = (RadMechAI)(object)((obj is RadMechAI) ? obj : null); if (!((Object)(object)val3 == (Object)null)) { PluginLogger.Debug("Adding bird to chasing list"); if (!RadMechAIPatch.ChasingBirds.ContainsKey(((NetworkBehaviour)val3).NetworkObjectId)) { RadMechAIPatch.ChasingBirds.Add(((NetworkBehaviour)val3).NetworkObjectId, playerId); } } } [ServerRpc(RequireOwnership = false)] public void TeleportOrSpawnWormServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(539903600u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 539903600u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!val3.isPlayerControlled) { return; } SandWormAI val4 = null; foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { SandWormAI val5 = (SandWormAI)(object)((spawnedEnemy is SandWormAI) ? spawnedEnemy : null); if (val5 == null || ((EnemyAI)val5).isEnemyDead || !((NetworkBehaviour)val5).IsSpawned) { continue; } val4 = val5; break; } if ((Object)(object)val4 == (Object)null) { Transform randomSpawnLocation = Helper.GetRandomSpawnLocation(inside: false); if ((Object)(object)randomSpawnLocation == (Object)null) { PluginLogger.Error("No spawn location found"); return; } Vector3 position = randomSpawnLocation.position; GameObject val6 = Object.Instantiate(Helper.Enemies.SandWorm.enemyPrefab, position, Quaternion.identity); val6.GetComponentInChildren().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val6.GetComponent()); ((EnemyAI)val6.GetComponent()).SetEnemyOutside(false); val4 = val6.GetComponent(); ((EnemyAI)val4).SyncPositionToClients(); } ((MonoBehaviour)this).StartCoroutine(TeleportEnemyWhenReady((EnemyAI)(object)val4, ((Component)val3).transform.position, exitEnter: false, outside: true)); } [IteratorStateMachine(typeof(d__57))] public static IEnumerator TeleportEnemyWhenReady(EnemyAI enemy, Vector3 position, bool exitEnter = false, bool outside = false) { //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 d__57(0) { enemy = enemy, position = position, exitEnter = exitEnter, outside = outside }; } public static void TeleportEnemy(EnemyAI enemy, Vector3 position, bool exitEnter = false, bool outside = false) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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) if (exitEnter) { enemy.SetEnemyOutside(outside); } Vector3 position2 = enemy.ChooseClosestNodeToPosition(position, false, 0).position; enemy.serverPosition = position2; ((Component)enemy).transform.position = enemy.serverPosition; enemy.agent.Warp(enemy.serverPosition); enemy.SyncPositionToClients(); } [IteratorStateMachine(typeof(d__59))] public static IEnumerator WaitAndSyncItemsValues(NetworkObjectReference[] items, int[] values) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__59(0) { items = items, values = values }; } [ClientRpc] public void SyncItemsValuesClientRpc(NetworkObjectReference[] items, int[] values) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: 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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4053388924u, val, (RpcDelivery)0); bool flag = items != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(items, default(ForNetworkSerializable)); } bool flag2 = values != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val2)).WriteValueSafe(values, default(ForPrimitives)); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4053388924u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (items.Length != values.Length) { PluginLogger.Error("Items and values length mismatch"); return; } NetworkObject val3 = default(NetworkObject); for (int i = 0; i < items.Length; i++) { ((NetworkObjectReference)(ref items[i])).TryGet(ref val3, NetworkManager.Singleton); if (Object.op_Implicit((Object)(object)val3)) { GrabbableObject component = ((Component)val3).GetComponent(); if ((Object)(object)component != (Object)null) { component.SetScrapValue(values[i]); } } } } [ServerRpc] public void TestEventServerRpc(ulong player) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2819494745u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, player); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2819494745u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)this).IsOwner) { string text = new EnemyComeToMeEvent().ExecuteEvent(StartOfRound.Instance.allPlayerScripts[(uint)player]); HUDManager.Instance.DisplayTip("Le mésaj", text, false, false, "LC_Tip1"); } } } public override void OnNetworkSpawn() { Instance = this; ((NetworkBehaviour)this).OnNetworkSpawn(); } public override void OnNetworkDespawn() { if ((Object)(object)Instance == (Object)(object)this) { Instance = null; } ((NetworkBehaviour)this).OnNetworkDespawn(); } [HarmonyPatch(typeof(StartOfRound), "Awake")] [HarmonyPostfix] private static void SpawnNetHandler() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) if (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer) { GameObject val = Object.Instantiate(_networkPrefab, Vector3.zero, Quaternion.identity); val.GetComponent().Spawn(false); } } [HarmonyPatch(typeof(GameNetworkManager), "Start")] [HarmonyPostfix] private static void Init() { if (!((Object)(object)_networkPrefab != (Object)null)) { _networkPrefab = Assets.Bundle.LoadAsset("Assets/Tarrot/Networker.prefab"); _networkPrefab.AddComponent(); NetworkManager.Singleton.AddNetworkPrefab(_networkPrefab); } } protected override void __initializeVariables() { ((NetworkBehaviour)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 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Expected O, but got Unknown //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Expected O, but got Unknown //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Expected O, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Expected O, but got Unknown //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Expected O, but got Unknown //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Expected O, but got Unknown //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Expected O, but got Unknown //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Expected O, but got Unknown //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Expected O, but got Unknown //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Expected O, but got Unknown //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Expected O, but got Unknown //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Expected O, but got Unknown //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Expected O, but got Unknown //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Expected O, but got Unknown //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Expected O, but got Unknown //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Expected O, but got Unknown //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Expected O, but got Unknown //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Expected O, but got Unknown //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Expected O, but got Unknown //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Expected O, but got Unknown //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Expected O, but got Unknown //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3834687756u, new RpcReceiveHandler(__rpc_handler_3834687756), "KillPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(458956284u, new RpcReceiveHandler(__rpc_handler_458956284), "KillPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2570383561u, new RpcReceiveHandler(__rpc_handler_2570383561), "SetShipDoorStateServerRpc"); ((NetworkBehaviour)this).__registerRpc(3853642043u, new RpcReceiveHandler(__rpc_handler_3853642043), "SetShipDoorStateClientRpc"); ((NetworkBehaviour)this).__registerRpc(3893186342u, new RpcReceiveHandler(__rpc_handler_3893186342), "OpenOrCloseRandomDoorServerRpc"); ((NetworkBehaviour)this).__registerRpc(4244542400u, new RpcReceiveHandler(__rpc_handler_4244542400), "OpenOrCloseRandomDoorClientRpc"); ((NetworkBehaviour)this).__registerRpc(964378104u, new RpcReceiveHandler(__rpc_handler_964378104), "BreakerOffServerRpc"); ((NetworkBehaviour)this).__registerRpc(3070260538u, new RpcReceiveHandler(__rpc_handler_3070260538), "BreakerOffClientRpc"); ((NetworkBehaviour)this).__registerRpc(3486020106u, new RpcReceiveHandler(__rpc_handler_3486020106), "AgroCoilheadOrSpawnServerRpc"); ((NetworkBehaviour)this).__registerRpc(866308243u, new RpcReceiveHandler(__rpc_handler_866308243), "SpawnCoilheadServerRpc"); ((NetworkBehaviour)this).__registerRpc(900698346u, new RpcReceiveHandler(__rpc_handler_900698346), "PopOrSpawnJesterServerRpc"); ((NetworkBehaviour)this).__registerRpc(6427069u, new RpcReceiveHandler(__rpc_handler_6427069), "SpawnGiantOrDogServerRpc"); ((NetworkBehaviour)this).__registerRpc(1980060841u, new RpcReceiveHandler(__rpc_handler_1980060841), "TeleportRandomEntityServerRpc"); ((NetworkBehaviour)this).__registerRpc(3054328150u, new RpcReceiveHandler(__rpc_handler_3054328150), "GhostBreatheServerRpc"); ((NetworkBehaviour)this).__registerRpc(1597565073u, new RpcReceiveHandler(__rpc_handler_1597565073), "GhostBreatheClientRpc"); ((NetworkBehaviour)this).__registerRpc(3427511879u, new RpcReceiveHandler(__rpc_handler_3427511879), "TeleportEnemyAwayServerRpc"); ((NetworkBehaviour)this).__registerRpc(1409835055u, new RpcReceiveHandler(__rpc_handler_1409835055), "TeleportPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(3340935527u, new RpcReceiveHandler(__rpc_handler_3340935527), "TeleportPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2066064276u, new RpcReceiveHandler(__rpc_handler_2066064276), "SetPlayerHealthServerRpc"); ((NetworkBehaviour)this).__registerRpc(3250666723u, new RpcReceiveHandler(__rpc_handler_3250666723), "SetPlayerHealthClientRpc"); ((NetworkBehaviour)this).__registerRpc(3843812035u, new RpcReceiveHandler(__rpc_handler_3843812035), "DamagePlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(2442547416u, new RpcReceiveHandler(__rpc_handler_2442547416), "DamagePlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2278377068u, new RpcReceiveHandler(__rpc_handler_2278377068), "MultiplyInventoryValueServerRpc"); ((NetworkBehaviour)this).__registerRpc(1897849939u, new RpcReceiveHandler(__rpc_handler_1897849939), "MultiplyInventoryValueClientRpc"); ((NetworkBehaviour)this).__registerRpc(2149202328u, new RpcReceiveHandler(__rpc_handler_2149202328), "MultiplyRandomScrapValueServerRpc"); ((NetworkBehaviour)this).__registerRpc(1951809462u, new RpcReceiveHandler(__rpc_handler_1951809462), "MultiplyRandomScrapValueClientRpc"); ((NetworkBehaviour)this).__registerRpc(2243418972u, new RpcReceiveHandler(__rpc_handler_2243418972), "RevivePlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(2685453368u, new RpcReceiveHandler(__rpc_handler_2685453368), "RevivePlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(1979062494u, new RpcReceiveHandler(__rpc_handler_1979062494), "AllowExtraLifeServerRpc"); ((NetworkBehaviour)this).__registerRpc(1996833951u, new RpcReceiveHandler(__rpc_handler_1996833951), "AllowExtraLifeClientRpc"); ((NetworkBehaviour)this).__registerRpc(2363699914u, new RpcReceiveHandler(__rpc_handler_2363699914), "ExtraLifeServerRpc"); ((NetworkBehaviour)this).__registerRpc(3667127957u, new RpcReceiveHandler(__rpc_handler_3667127957), "ExtraLifeClientRpc"); ((NetworkBehaviour)this).__registerRpc(2042389035u, new RpcReceiveHandler(__rpc_handler_2042389035), "LittleGirlChaseServerRpc"); ((NetworkBehaviour)this).__registerRpc(2969223326u, new RpcReceiveHandler(__rpc_handler_2969223326), "LittleGirlChaseClientRpc"); ((NetworkBehaviour)this).__registerRpc(587640117u, new RpcReceiveHandler(__rpc_handler_587640117), "AgroBrackenOrSpawnServerRpc"); ((NetworkBehaviour)this).__registerRpc(997310661u, new RpcReceiveHandler(__rpc_handler_997310661), "SyncBrackenPropertiesClientRpc"); ((NetworkBehaviour)this).__registerRpc(619641325u, new RpcReceiveHandler(__rpc_handler_619641325), "DogChaseOrSpawnServerRpc"); ((NetworkBehaviour)this).__registerRpc(1416483757u, new RpcReceiveHandler(__rpc_handler_1416483757), "SyncDogPropertiesClientRpc"); ((NetworkBehaviour)this).__registerRpc(153040076u, new RpcReceiveHandler(__rpc_handler_153040076), "SetDogPathServerRpc"); ((NetworkBehaviour)this).__registerRpc(3082485029u, new RpcReceiveHandler(__rpc_handler_3082485029), "SetDogPathClientRpc"); ((NetworkBehaviour)this).__registerRpc(625178223u, new RpcReceiveHandler(__rpc_handler_625178223), "ShipLeaveEarlyServerRpc"); ((NetworkBehaviour)this).__registerRpc(955694953u, new RpcReceiveHandler(__rpc_handler_955694953), "ShipLeaveEarlyClientRpc"); ((NetworkBehaviour)this).__registerRpc(395535226u, new RpcReceiveHandler(__rpc_handler_395535226), "GiantChasePlayerOrSpawnServerRpc"); ((NetworkBehaviour)this).__registerRpc(968152725u, new RpcReceiveHandler(__rpc_handler_968152725), "GiantSetPropertiesClientRpc"); ((NetworkBehaviour)this).__registerRpc(3885904354u, new RpcReceiveHandler(__rpc_handler_3885904354), "BirdChaseOrSpawnServerRpc"); ((NetworkBehaviour)this).__registerRpc(3496348290u, new RpcReceiveHandler(__rpc_handler_3496348290), "BirdSetPropertiesClientRpc"); ((NetworkBehaviour)this).__registerRpc(539903600u, new RpcReceiveHandler(__rpc_handler_539903600), "TeleportOrSpawnWormServerRpc"); ((NetworkBehaviour)this).__registerRpc(4053388924u, new RpcReceiveHandler(__rpc_handler_4053388924), "SyncItemsValuesClientRpc"); ((NetworkBehaviour)this).__registerRpc(2819494745u, new RpcReceiveHandler(__rpc_handler_2819494745), "TestEventServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3834687756(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_005e: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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); Vector3 velocity = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref velocity); CauseOfDeath causeOfDeath = default(CauseOfDeath); ((FastBufferReader)(ref reader)).ReadValueSafe(ref causeOfDeath, default(ForEnums)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).KillPlayerServerRpc(playerId, velocity, causeOfDeath); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_458956284(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_005e: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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); Vector3 velocity = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref velocity); CauseOfDeath causeOfDeath = default(CauseOfDeath); ((FastBufferReader)(ref reader)).ReadValueSafe(ref causeOfDeath, default(ForEnums)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).KillPlayerClientRpc(playerId, velocity, causeOfDeath); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2570383561(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_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool shipDoorStateServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shipDoorStateServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SetShipDoorStateServerRpc(shipDoorStateServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3853642043(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_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool shipDoorStateClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shipDoorStateClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SetShipDoorStateClientRpc(shipDoorStateClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3893186342(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; ((Networker)(object)target).OpenOrCloseRandomDoorServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4244542400(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int rngSeed = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref rngSeed); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).OpenOrCloseRandomDoorClientRpc(playerId, rngSeed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_964378104(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; ((Networker)(object)target).BreakerOffServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3070260538(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; ((Networker)(object)target).BreakerOffClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3486020106(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; ((Networker)(object)target).AgroCoilheadOrSpawnServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_866308243(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; ((Networker)(object)target).SpawnCoilheadServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_900698346(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_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float popDelay = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref popDelay, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).PopOrSpawnJesterServerRpc(popDelay); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_6427069(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 amount = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref amount); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SpawnGiantOrDogServerRpc(amount); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1980060841(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); bool inside = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref inside, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).TeleportRandomEntityServerRpc(position, inside); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3054328150(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).GhostBreatheServerRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1597565073(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).GhostBreatheClientRpc(position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3427511879(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; ((Networker)(object)target).TeleportEnemyAwayServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1409835055(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); bool inside = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref inside, default(ForPrimitives)); bool insideShip = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref insideShip, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).TeleportPlayerServerRpc(playerId, position, inside, insideShip); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3340935527(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); bool inside = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref inside, default(ForPrimitives)); bool insideShip = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref insideShip, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).TeleportPlayerClientRpc(playerId, position, inside, insideShip); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2066064276(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int health = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref health); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SetPlayerHealthServerRpc(playerId, health); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3250666723(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int health = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref health); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SetPlayerHealthClientRpc(playerId, health); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3843812035(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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_0091: 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); int damage = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref damage); Vector3 velocity = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref velocity); CauseOfDeath causeOfDeath = default(CauseOfDeath); ((FastBufferReader)(ref reader)).ReadValueSafe(ref causeOfDeath, default(ForEnums)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).DamagePlayerServerRpc(playerId, damage, velocity, causeOfDeath); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2442547416(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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_0091: 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); int damage = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref damage); Vector3 velocity = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref velocity); CauseOfDeath causeOfDeath = default(CauseOfDeath); ((FastBufferReader)(ref reader)).ReadValueSafe(ref causeOfDeath, default(ForEnums)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).DamagePlayerClientRpc(playerId, damage, velocity, causeOfDeath); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2278377068(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_006f: 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); float multiplier = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref multiplier, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).MultiplyInventoryValueServerRpc(playerId, multiplier); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1897849939(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_006f: 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); float multiplier = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref multiplier, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).MultiplyInventoryValueClientRpc(playerId, multiplier); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2149202328(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_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float multiplier = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref multiplier, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).MultiplyRandomScrapValueServerRpc(multiplier); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1951809462(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_003e: 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_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float multiplier = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref multiplier, default(ForPrimitives)); int randomSeed = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref randomSeed); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).MultiplyRandomScrapValueClientRpc(multiplier, randomSeed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2243418972(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; ((Networker)(object)target).RevivePlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2685453368(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; ((Networker)(object)target).RevivePlayerClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1979062494(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; ((Networker)(object)target).AllowExtraLifeServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1996833951(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_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool allow = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref allow, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).AllowExtraLifeClientRpc(allow); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2363699914(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; ((Networker)(object)target).ExtraLifeServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3667127957(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; ((Networker)(object)target).ExtraLifeClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2042389035(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; ((Networker)(object)target).LittleGirlChaseServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2969223326(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); ulong networkId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref networkId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).LittleGirlChaseClientRpc(playerId, networkId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_587640117(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; ((Networker)(object)target).AgroBrackenOrSpawnServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_997310661(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); ulong networkId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref networkId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SyncBrackenPropertiesClientRpc(playerId, networkId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_619641325(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; ((Networker)(object)target).DogChaseOrSpawnServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1416483757(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); ulong networkId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref networkId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SyncDogPropertiesClientRpc(playerId, networkId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_153040076(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong dogId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref dogId); int targetedPlayer = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref targetedPlayer); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SetDogPathServerRpc(dogId, targetedPlayer); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3082485029(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong dogId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref dogId); int targetedPlayer = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref targetedPlayer); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SetDogPathClientRpc(dogId, targetedPlayer); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_625178223(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; ((Networker)(object)target).ShipLeaveEarlyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_955694953(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; ((Networker)(object)target).ShipLeaveEarlyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_395535226(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; ((Networker)(object)target).GiantChasePlayerOrSpawnServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_968152725(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); ulong networkId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref networkId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).GiantSetPropertiesClientRpc(playerId, networkId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3885904354(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; ((Networker)(object)target).BirdChaseOrSpawnServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3496348290(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); ulong networkId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref networkId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).BirdSetPropertiesClientRpc(playerId, networkId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_539903600(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; ((Networker)(object)target).TeleportOrSpawnWormServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4053388924(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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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)); NetworkObjectReference[] items = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref items, default(ForNetworkSerializable)); } bool flag2 = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag2, default(ForPrimitives)); int[] values = null; if (flag2) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref values, default(ForPrimitives)); } target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SyncItemsValuesClientRpc(items, values); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2819494745(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { ulong player = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref player); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).TestEventServerRpc(player); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Networker"; } } [BepInPlugin("LCTarotCard", "Phasmophobia Tarot Card", "1.1.4")] public class Plugin : BaseUnityPlugin { public static Plugin Instance; private Harmony harmony; public ManualLogSource logger; internal static KeyboardShortcut DebugBtn = new KeyboardShortcut((KeyCode)96, Array.Empty()); private void Awake() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown if (!((Object)(object)Instance != (Object)null)) { Instance = this; logger = Logger.CreateLogSource("LCTarotCard"); harmony = new Harmony("LCTarotCard"); ConfigManager.Init(((BaseUnityPlugin)this).Config); Assets.Load(); AllCards.Init(); harmony.PatchAll(); NetcodePatcher(); logger.LogInfo((object)"LCTarotCard loaded successfully"); } } 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); } } } } } [HarmonyPatch(typeof(PlayerControllerB))] internal class Test { [HarmonyPatch("Update")] [HarmonyPostfix] private static void TestPatch(PlayerControllerB __instance) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_00c0: Unknown result type (might be due to invalid IL or missing references) if (ConfigManager.DebugModeSetting.Value && ((NetworkBehaviour)__instance).IsOwner && !((Object)(object)__instance != (Object)(object)GameNetworkManager.Instance.localPlayerController) && ((KeyboardShortcut)(ref Plugin.DebugBtn)).IsDown()) { PluginLogger.Debug("Spawning item"); GameObject val = Object.Instantiate(Assets.TarotItem.spawnPrefab, ((Component)__instance).transform.position, ((Component)__instance).transform.rotation); GrabbableObject component = val.GetComponent(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; component.scrapValue = 1; NetworkObject component2 = val.GetComponent(); component2.Spawn(false); component.FallToGround(false, true, default(Vector3)); } } } public static class PluginLogger { public static void Debug(object o) { if (ConfigManager.DebugModeSetting.Value) { Plugin.Instance.logger.LogDebug((object)("[DEBUG] " + o)); } } public static void Info(object o) { Plugin.Instance.logger.LogInfo(o); } public static void Error(object o) { Plugin.Instance.logger.LogError((object)("[ERROR] " + o)); } public static void Warning(object o) { Plugin.Instance.logger.LogWarning((object)("[WARNING] " + o)); } } public static class PluginConstants { public const string PLUGIN_GUID = "LCTarotCard"; public const string PLUGIN_NAME = "Phasmophobia Tarot Card"; public const string PLUGIN_VERSION = "1.1.4"; } } namespace LCTarrotCard.Util { [HarmonyPatch] public class Helper { public static class Enemies { public static EnemyType Baboon; public static EnemyType Slime; public static EnemyType BushWolf; public static EnemyType Butler; public static EnemyType ButlerBees; public static EnemyType Centipede; public static EnemyType ClaySurgeon; public static EnemyType Crawler; public static EnemyType DocileLocust; public static EnemyType Manticoil; public static EnemyType DressGirl; public static EnemyType FlowerMan; public static EnemyType FlowerSnake; public static EnemyType ForestGiant; public static EnemyType HoarderBug; public static EnemyType Jester; public static EnemyType LassoMan; public static EnemyType Masked; public static EnemyType MouthDog; public static EnemyType Nutcracker; public static EnemyType Puffer; public static EnemyType RadMech; public static EnemyType RedLocust; public static EnemyType RedPill; public static EnemyType Spider; public static EnemyType SandWorm; public static EnemyType SpringMan; public static readonly List AllEnemies = new List(); public static readonly List SpawnableEnemies = new List(); [CanBeNull] public static EnemyType GetByName(string name) { return ((IEnumerable)AllEnemies).FirstOrDefault((Func)((EnemyType enemy) => enemy.enemyName == name)); } } private static readonly Random Rng = new Random(); public static void InitEnemies() { PluginLogger.Debug("InitEnemies"); EnemyType[] array = Resources.FindObjectsOfTypeAll().Concat(Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)1)).ToArray(); PluginLogger.Debug("Found " + array.Length + " enemies"); EnemyType[] array2 = array; foreach (EnemyType val in array2) { if (!Enemies.AllEnemies.Contains(val)) { Enemies.AllEnemies.Add(val); if (val.enemyName != "Lasso" || val.enemyName != "Red pill") { Enemies.SpawnableEnemies.Add(val); } } switch (val.enemyName) { case "Baboon hawk": Enemies.Baboon = val; break; case "Blob": Enemies.Slime = val; break; case "Bush Wolf": Enemies.BushWolf = val; break; case "Butler": Enemies.Butler = val; break; case "Butler Bees": Enemies.ButlerBees = val; break; case "Centipede": Enemies.Centipede = val; break; case "Clay Surgeon": Enemies.ClaySurgeon = val; break; case "Crawler": Enemies.Crawler = val; break; case "Docile Locust Bees": Enemies.DocileLocust = val; break; case "Manticoil": Enemies.Manticoil = val; break; case "Girl": Enemies.DressGirl = val; break; case "Flowerman": Enemies.FlowerMan = val; break; case "Tulip Snake": Enemies.FlowerSnake = val; break; case "ForestGiant": Enemies.ForestGiant = val; break; case "Hoarding bug": Enemies.HoarderBug = val; break; case "Jester": Enemies.Jester = val; break; case "Lasso": Enemies.LassoMan = val; break; case "Masked": Enemies.Masked = val; break; case "MouthDog": Enemies.MouthDog = val; break; case "Nutcracker": Enemies.Nutcracker = val; break; case "Puffer": Enemies.Puffer = val; break; case "RadMech": Enemies.RadMech = val; break; case "Red Locust Bees": Enemies.RedLocust = val; break; case "Red pill": Enemies.RedPill = val; break; case "Bunker Spider": Enemies.Spider = val; break; case "Earth Leviathan": Enemies.SandWorm = val; break; case "Spring": Enemies.SpringMan = val; break; default: PluginLogger.Info("Unhandled enemy : " + val.enemyName); break; } } } public static void Shuffle(IList list) { int num = list.Count; while (num > 1) { num--; int num2 = Rng.Next(num + 1); int index = num2; int index2 = num; T value = list[num]; T value2 = list[num2]; list[index] = value; list[index2] = value2; } } public static GameObject[] GetAllInsideAINodes() { return GameObject.FindGameObjectsWithTag("AINode"); } public static GameObject[] GetAllOutsideAINodes() { return GameObject.FindGameObjectsWithTag("OutsideAINode"); } public static Vector3 GetRandomAINodePosition(bool inside = true) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) GameObject[] array = (inside ? GetAllInsideAINodes() : GetAllOutsideAINodes()); if (array.Length == 0) { return Vector3.zero; } return array[Random.Range(0, array.Length)].transform.position; } public static EnemyVent[] GetAllEnemyVents() { return Object.FindObjectsOfType(); } [CanBeNull] public static Transform GetRandomSpawnLocation(bool inside = true, bool useVentsInstead = true) { if (inside) { EnemyVent[] allEnemyVents = GetAllEnemyVents(); if (allEnemyVents.Length != 0 && useVentsInstead) { return ((Component)allEnemyVents[Rng.Next(allEnemyVents.Length)]).transform; } GameObject[] allInsideAINodes = GetAllInsideAINodes(); if (allInsideAINodes.Length == 0) { return null; } return allInsideAINodes[Rng.Next(allInsideAINodes.Length)].transform; } GameObject[] allOutsideAINodes = GetAllOutsideAINodes(); if (allOutsideAINodes.Length == 0) { return null; } return allOutsideAINodes[Rng.Next(allOutsideAINodes.Length)].transform; } public static GameObject ClosestAINode(Vector3 position, bool inside) { //IL_0039: 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) GameObject[] array = (inside ? GameObject.FindGameObjectsWithTag("AINode") : GameObject.FindGameObjectsWithTag("OutsideAINode")); GameObject result = null; float num = float.MaxValue; GameObject[] array2 = array; foreach (GameObject val in array2) { float num2 = Vector3.Distance(val.transform.position, position); if (num2 < num) { num = num2; result = val; } } return result; } [HarmonyPatch(typeof(StartOfRound), "Start")] [HarmonyPostfix] private static void InitEnemiesPatch() { InitEnemies(); } } public enum Planet { Experimentation, Assurance, Vow, Gordion, March, Adamance, Rend, Dine, Offense, Titan, Artifice, Liquidation, Embrion } public class SpawnRarity { private readonly Dictionary rarities = new Dictionary(); private readonly Item item; private int defaultValue; public SpawnRarity(int baseValue, Item itemIn) { item = itemIn; defaultValue = baseValue; foreach (Planet value in Enum.GetValues(typeof(Planet))) { rarities.Add(value, baseValue); } } public int GetRarityFor(Planet planet) { return rarities[planet]; } public void MultiplyAllRarities(float multiplier) { foreach (Planet value in Enum.GetValues(typeof(Planet))) { rarities[value] = (int)((float)rarities[value] * multiplier); } } public void SetValues(int experimentation = -1, int assurance = -1, int vow = -1, int march = -1, int offense = -1, int adamance = -1, int rend = -1, int dine = -1, int titan = -1, int artifice = -1, int embrion = -1) { rarities[Planet.Experimentation] = experimentation; rarities[Planet.Assurance] = assurance; rarities[Planet.Vow] = vow; rarities[Planet.March] = march; rarities[Planet.Offense] = offense; rarities[Planet.Adamance] = adamance; rarities[Planet.Rend] = rend; rarities[Planet.Dine] = dine; rarities[Planet.Titan] = titan; rarities[Planet.Artifice] = artifice; rarities[Planet.Embrion] = embrion; } public void CopyRaritiesFrom(SpawnRarity other) { rarities[Planet.Experimentation] = other.rarities[Planet.Experimentation]; rarities[Planet.Assurance] = other.rarities[Planet.Assurance]; rarities[Planet.Vow] = other.rarities[Planet.Vow]; rarities[Planet.March] = other.rarities[Planet.March]; rarities[Planet.Offense] = other.rarities[Planet.Offense]; rarities[Planet.Adamance] = other.rarities[Planet.Adamance]; rarities[Planet.Rend] = other.rarities[Planet.Rend]; rarities[Planet.Dine] = other.rarities[Planet.Dine]; rarities[Planet.Titan] = other.rarities[Planet.Titan]; rarities[Planet.Artifice] = other.rarities[Planet.Artifice]; rarities[Planet.Embrion] = other.rarities[Planet.Embrion]; } public SpawnableItemWithRarity GetSpawnableItemForPlanet(Planet planet) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown return new SpawnableItemWithRarity(item, AccessRaritySafe((int)planet)); } public SpawnableItemWithRarity GetSpawnableItemForPlanet(int planet) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown return new SpawnableItemWithRarity(item, AccessRaritySafe(planet)); } private int AccessRaritySafe(int planet) { try { return rarities.Values.ToList()[planet]; } catch (Exception) { } return defaultValue; } public void ApplySpawnRarity(SelectableLevel level) { level.spawnableScrap.Add(GetSpawnableItemForPlanet(level.levelID)); } } public class ProbabilityRangedList { private class RangedItem { public TK Item; public float MinRange; public float MaxRange; public float Weight; public RangedItem(TK item, float minRange, float maxRange, float weight) { Item = item; MinRange = minRange; MaxRange = maxRange; Weight = weight; } public bool IsInRange(float value) { return value >= MinRange && value <= MaxRange; } public float GetWeightAt(float value) { if (!IsInRange(value)) { return 0f; } return Weight / Distance(value); } public float Distance(float value) { float num = (MinRange + MaxRange) / 2f; return Mathf.Abs(num - value) + 1f; } } private readonly List> rangedItems = new List>(); public void Add(T item, float range, float weight, float value) { float num = value - range / 2f; float maxRange = value + range / 2f; if (rangedItems.Count > 0) { RangedItem rangedItem = rangedItems[rangedItems.Count - 1]; if (num < rangedItem.MaxRange) { num = rangedItem.MaxRange; maxRange = num + range; } } rangedItems.Add(new RangedItem(item, num, maxRange, weight)); CheckRanges(); } public T GetRandom(float value, float softMaxTemperature = 1f) { Dictionary dictionary = new Dictionary(); foreach (RangedItem rangedItem in rangedItems) { float weightAt = rangedItem.GetWeightAt(value); if (!(weightAt <= float.Epsilon)) { dictionary.Add(rangedItems.IndexOf(rangedItem), weightAt); } } if (dictionary.Count == 0) { return default(T); } List values = dictionary.Values.ToList(); List list = SoftMax(values, softMaxTemperature); float num = Random.Range(0f, 1f); float num2 = 0f; for (int i = 0; i < list.Count; i++) { num2 += list[i]; if (num <= num2) { return rangedItems[dictionary.Keys.ToList()[i]].Item; } } throw new ArithmeticException("No item found, report this bug"); } private static List SoftMax(List values, float temperature = 1f) { if (temperature <= float.Epsilon) { int num = -1; float num2 = float.NegativeInfinity; for (int i = 0; i < values.Count; i++) { if (values[i] > num2) { num2 = values[i]; num = i; } } List list = new List(new float[values.Count]); if (num != -1) { list[num] = 1f; } return list; } List source = values.Select((float v) => Mathf.Exp(v / temperature)).ToList(); float sumExp = source.Sum(); return source.Select((float v) => v / sumExp).ToList(); } private void CheckRanges() { float num = -1f; float num2 = -1f; bool flag = false; foreach (RangedItem rangedItem in rangedItems) { if (rangedItem.MinRange < num) { flag = true; } if (rangedItem.MinRange > num2 && !Mathf.Approximately(num, -1f)) { flag = true; } num = rangedItem.MinRange; num2 = rangedItem.MaxRange; } if (!flag) { return; } List> list = new List>(); while (rangedItems.Count > 0) { RangedItem minItem = rangedItems[0]; foreach (RangedItem item in rangedItems.Where((RangedItem item) => item.MinRange < minItem.MinRange)) { minItem = item; } list.Add(minItem); rangedItems.Remove(minItem); } rangedItems.AddRange(list); } } } namespace LCTarrotCard.Ressource { public static class Assets { public static class Materials { public static Material CardDeathMat; public static Material CardHangedMat; public static Material CardPriestessMat; public static Material CardDevilMat; public static Material CardFoolMat; public static Material CardHermitMat; public static Material CardMoonMat; public static Material CardSunMat; public static Material CardTowerMat; public static Material CardWheelMat; public static Material BurnAqua; public static Material BurnBlue; public static Material BurnGreen; public static Material BurnPurple; public static Material BurnRed; public static Material BurnWhite; public static Material BurnYellow; } internal static AssetBundle Bundle; public static Item TarotItem; public static GameObject SingleTarotCard; public static readonly List PullCardClips = new List(); public static AudioClip FoolCardSound; public static AudioClip GhostBreathe; public static SpawnRarity TarotRarity; public static void Load() { if (LoadBundle()) { LoadAssets(); InitSpawns(); } } private static bool LoadBundle() { Stream manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("LCTarrotCard.Ressource.tarrotbundle"); if (manifestResourceStream == null) { PluginLogger.Error("Cannot load the asset bundle"); return false; } Bundle = AssetBundle.LoadFromStream(manifestResourceStream); if ((Object)(object)Bundle != (Object)null) { return true; } PluginLogger.Error("Cannot load the asset bundle"); return false; } private static void LoadAssets() { TarotItem = LoadAsset("TarrotCard.asset"); TarotBehaviour tarotBehaviour = TarotItem.spawnPrefab.AddComponent(); ((GrabbableObject)tarotBehaviour).grabbable = true; ((GrabbableObject)tarotBehaviour).grabbableToEnemies = true; ((GrabbableObject)tarotBehaviour).itemProperties = TarotItem; SingleTarotCard = LoadAsset("single_card_prefab.prefab"); PullCardClips.Add(LoadAsset("Sound/tarot_draw1.ogg")); PullCardClips.Add(LoadAsset("Sound/tarot_draw2.ogg")); PullCardClips.Add(LoadAsset("Sound/tarot_draw3.ogg")); FoolCardSound = LoadAsset("Sound/fool.ogg"); GhostBreathe = LoadAsset("Sound/breathe.ogg"); LoadMaterials(); } private static void LoadMaterials() { Materials.CardDeathMat = LoadAsset("Cards/DeathMat.mat"); Materials.CardHangedMat = LoadAsset("Cards/HangedManMat.mat"); Materials.CardPriestessMat = LoadAsset("Cards/HighPreistessMat.mat"); Materials.CardDevilMat = LoadAsset("Cards/TheDevilMat.mat"); Materials.CardFoolMat = LoadAsset("Cards/TheFoolMat.mat"); Materials.CardHermitMat = LoadAsset("Cards/TheHermitMat.mat"); Materials.CardMoonMat = LoadAsset("Cards/TheMoonMat.mat"); Materials.CardSunMat = LoadAsset("Cards/TheSunMat.mat"); Materials.CardTowerMat = LoadAsset("Cards/TowerMat.mat"); Materials.CardWheelMat = LoadAsset("Cards/WheelMat.mat"); Materials.BurnAqua = LoadAsset("Burn/AquaBurn.mat"); Materials.BurnBlue = LoadAsset("Burn/BlueBurn.mat"); Materials.BurnGreen = LoadAsset("Burn/GreenBurn.mat"); Materials.BurnPurple = LoadAsset("Burn/PurpleBurn.mat"); Materials.BurnRed = LoadAsset("Burn/RedBurn.mat"); Materials.BurnWhite = LoadAsset("Burn/WhiteBurn.mat"); Materials.BurnYellow = LoadAsset("Burn/YellowBurn.mat"); } private static void InitSpawns() { TarotRarity = new SpawnRarity(17, TarotItem); TarotRarity.SetValues(12, -1, 19, 21, -1, 22, 22, 23, 30, 25, 20); TarotRarity.MultiplyAllRarities(ConfigManager.DeckMultiplySpawnChance.Value); } private static T LoadAsset(string assetPath) where T : Object { return Bundle.LoadAsset("Assets/Tarrot/" + assetPath); } } [HarmonyPatch(typeof(GameNetworkManager))] internal class NetworkPatcher { [HarmonyPatch("Start")] [HarmonyPostfix] private static void RegisterNetworkPrefab() { NetworkManager component = ((Component)GameNetworkManager.Instance).GetComponent(); component.AddNetworkPrefab(Assets.TarotItem.spawnPrefab); component.AddNetworkPrefab(Assets.SingleTarotCard); } } [HarmonyPatch(typeof(StartOfRound))] internal class StartOfRoundPatcher { [HarmonyPatch("Awake")] [HarmonyPostfix] private static void RegisterItemsPatch(StartOfRound __instance) { SelectableLevel[] levels = __instance.levels; SelectableLevel[] array = levels; foreach (SelectableLevel level in array) { Assets.TarotRarity.ApplySpawnRarity(level); } RegisterItem(Assets.TarotItem, __instance); } private static void RegisterItem(Item item, StartOfRound manager) { if (!manager.allItemsList.itemsList.Contains(item)) { manager.allItemsList.itemsList.Add(item); } } } } namespace LCTarrotCard.Patches { [HarmonyPatch(typeof(DressGirlAI))] public class DressGirlAIPatch { public static readonly Dictionary ChasingGirls = new Dictionary(); public static readonly Dictionary ChaseTimes = new Dictionary(); [HarmonyPatch("Start")] [HarmonyPostfix] public static void ChosePlayerPatch(DressGirlAI __instance) { if (ChasingGirls.ContainsKey(((NetworkBehaviour)__instance).NetworkObjectId)) { __instance.hauntingPlayer = StartOfRound.Instance.allPlayerScripts[ChasingGirls[((NetworkBehaviour)__instance).NetworkObjectId]]; if (__instance.hauntingPlayer.playerClientId == GameNetworkManager.Instance.localPlayerController.playerClientId) { ((EnemyAI)__instance).SwitchToBehaviourStateOnLocalClient(1); } } } [HarmonyPatch("StopChasing")] [HarmonyPrefix] public static bool StopChasingPatch(DressGirlAI __instance) { //IL_0031: 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_00a0: 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) if (ChaseTimes.TryGetValue(((NetworkBehaviour)__instance).NetworkObjectId, out var value)) { float num = Time.time - value; if (num > 20f || Vector3.Distance(((Component)__instance).transform.position, ((Component)__instance.hauntingPlayer).transform.position) > 50f || (Object)(object)__instance.hauntingPlayer == (Object)null || __instance.hauntingPlayer.playerClientId != GameNetworkManager.Instance.localPlayerController.playerClientId) { PluginLogger.Debug("Chase time expired, stopping chase"); PluginLogger.Debug("Distance: " + Vector3.Distance(((Component)__instance).transform.position, ((Component)__instance.hauntingPlayer).transform.position)); PluginLogger.Debug("Time: " + num); PluginLogger.Debug("Haunting player: " + (((Object)(object)__instance.hauntingPlayer == (Object)null) ? "null" : __instance.hauntingPlayer.playerUsername)); PluginLogger.Debug("Is local ? " + (__instance.hauntingPlayer.playerClientId == GameNetworkManager.Instance.localPlayerController.playerClientId)); ChasingGirls.Remove(((NetworkBehaviour)__instance).NetworkObjectId); ChaseTimes.Remove(((NetworkBehaviour)__instance).NetworkObjectId); return true; } ((EnemyAI)__instance).EnableEnemyMesh(true, true, false); return false; } if (ChasingGirls.ContainsKey(((NetworkBehaviour)__instance).NetworkObjectId)) { ChasingGirls.Remove(((NetworkBehaviour)__instance).NetworkObjectId); } return true; } [HarmonyPatch("Update")] [HarmonyPrefix] internal static void UpdatePatch(DressGirlAI __instance) { if (!ChasingGirls.ContainsKey(((NetworkBehaviour)__instance).NetworkObjectId)) { if (ChaseTimes.ContainsKey(((NetworkBehaviour)__instance).NetworkObjectId)) { ChaseTimes.Remove(((NetworkBehaviour)__instance).NetworkObjectId); } return; } if (!ChaseTimes.ContainsKey(((NetworkBehaviour)__instance).NetworkObjectId)) { ChaseTimes.Add(((NetworkBehaviour)__instance).NetworkObjectId, Time.time); } if ((Object)(object)__instance.hauntingPlayer != (Object)null && __instance.hauntingPlayer.playerClientId == GameNetworkManager.Instance.localPlayerController.playerClientId && ((EnemyAI)__instance).currentBehaviourStateIndex != 1) { ((EnemyAI)__instance).SwitchToBehaviourStateOnLocalClient(1); } } [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPostfix] public static void OnCollideWithPlayerPatch(DressGirlAI __instance) { if (ChasingGirls.ContainsKey(((NetworkBehaviour)__instance).NetworkObjectId)) { ChasingGirls.Remove(((NetworkBehaviour)__instance).NetworkObjectId); } } } [HarmonyPatch(typeof(FlowermanAI))] public class FlowermanAIPatch { [CompilerGenerated] private sealed class <_ContinueBrackenKillPatch>d__4 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public FlowermanAI bracken; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <_ContinueBrackenKillPatch>d__4(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; ((EnemyAI)bracken).creatureAnimator.SetBool("killing", false); ((EnemyAI)bracken).creatureAnimator.SetBool("carryingBody", true); <>2__current = (object)new WaitForSeconds(0.65f); <>1__state = 2; return true; case 2: <>1__state = -1; if ((Object)(object)((EnemyAI)bracken).inSpecialAnimationWithPlayer == (Object)null) { return false; } ((EnemyAI)bracken).inSpecialAnimationWithPlayer.KillPlayer(Vector3.zero, true, (CauseOfDeath)4, 0, default(Vector3), false); bracken.FinishKillAnimation(false); 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 static Dictionary> AngryBrackens = new Dictionary>(); [HarmonyPatch("DoAIInterval")] [HarmonyPrefix] internal static bool DoAIIntervalPatch(FlowermanAI __instance) { if (AngryBrackens.ContainsKey(((NetworkBehaviour)__instance).NetworkObjectId)) { KeyValuePair keyValuePair = AngryBrackens[((NetworkBehaviour)__instance).NetworkObjectId]; PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[keyValuePair.Key]; if (((EnemyAI)__instance).isOutside == val.isInsideFactory || Time.time - keyValuePair.Value > 15f || !val.isPlayerControlled) { AngryBrackens.Remove(((NetworkBehaviour)__instance).NetworkObjectId); return true; } ((EnemyAI)__instance).targetPlayer = val; __instance.angerMeter = 2.5f; if (((EnemyAI)__instance).currentBehaviourStateIndex != 2) { ((EnemyAI)__instance).SwitchToBehaviourState(2); return true; } ((EnemyAI)__instance).SetMovingTowardsTargetPlayer(val); if (!__instance.inKillAnimation && (Object)(object)((EnemyAI)__instance).targetPlayer != (Object)(object)GameNetworkManager.Instance.localPlayerController) { ((EnemyAI)__instance).ChangeOwnershipOfEnemy(((EnemyAI)__instance).targetPlayer.actualClientId); } _DoAIInterval(__instance); return false; } return true; } [HarmonyPatch("KillPlayerAnimationClientRpc")] [HarmonyPostfix] internal static void StopChasingWhenKilling(FlowermanAI __instance) { if (AngryBrackens.ContainsKey(((NetworkBehaviour)__instance).NetworkObjectId)) { AngryBrackens.Remove(((NetworkBehaviour)__instance).NetworkObjectId); } } [HarmonyPatch("killAnimation")] [HarmonyPrefix] internal static bool PreventCrash(FlowermanAI __instance, ref IEnumerator __result) { if (Networker.AllowExtraLife) { WalkieTalkie.TransmitOneShotAudio(__instance.crackNeckAudio, __instance.crackNeckSFX, 1f); __instance.crackNeckAudio.PlayOneShot(__instance.crackNeckSFX); __result = _ContinueBrackenKillPatch(__instance); return false; } return true; } [IteratorStateMachine(typeof(<_ContinueBrackenKillPatch>d__4))] private static IEnumerator _ContinueBrackenKillPatch(FlowermanAI bracken) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <_ContinueBrackenKillPatch>d__4(0) { bracken = bracken }; } private static void _DoAIInterval(FlowermanAI flowerman) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) if (((EnemyAI)flowerman).moveTowardsDestination) { ((EnemyAI)flowerman).agent.SetDestination(((EnemyAI)flowerman).destination); } ((EnemyAI)flowerman).SyncPositionToClients(); } } [HarmonyPatch(typeof(ForestGiantAI))] public class ForestGiantAIPatch { public static readonly Dictionary ChasingGiants = new Dictionary(); [HarmonyPatch("Update")] [HarmonyPostfix] internal static void MakeGiantChasePlayerPatch(ForestGiantAI __instance, ref float ___noticePlayerTimer, ref bool ___lostPlayerInChase) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) if (!ChasingGiants.ContainsKey(((NetworkBehaviour)__instance).NetworkObjectId)) { return; } PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[ChasingGiants[((NetworkBehaviour)__instance).NetworkObjectId]]; if (!val.isPlayerControlled || val.isInsideFactory || val.isInHangarShipRoom || Vector3.Distance(((Component)val).transform.position, ((Component)__instance).transform.position) < 10f) { PluginLogger.Debug("Removing giant from chasing list : player doesn't meet requirements"); ChasingGiants.Remove(((NetworkBehaviour)__instance).NetworkObjectId); return; } if (((EnemyAI)__instance).currentBehaviourStateIndex != 1) { ((EnemyAI)__instance).SwitchToBehaviourState(1); } ___noticePlayerTimer = 0f; __instance.chasingPlayer = val; ___lostPlayerInChase = false; } [HarmonyPatch("ReachForPlayerIfClose")] [HarmonyPrefix] internal static void ReachForPlayerIfClosePatch(ForestGiantAI __instance) { if (ChasingGiants.ContainsKey(((NetworkBehaviour)__instance).NetworkObjectId)) { __instance.chasingPlayer = StartOfRound.Instance.allPlayerScripts[ChasingGiants[((NetworkBehaviour)__instance).NetworkObjectId]]; } } } [HarmonyPatch(typeof(MouthDogAI))] public class MouthDogAIPatch { public static Dictionary ChasingDogs = new Dictionary(); [HarmonyPatch("SearchForPreviouslyHeardSound")] [HarmonyPrefix] internal static bool MakeDogChasePlayer(MouthDogAI __instance) { //IL_0041: 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) if (!ChasingDogs.TryGetValue(((NetworkBehaviour)__instance).NetworkObjectId, out var value)) { return true; } PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[value]; if (!val.isPlayerControlled || val.isInsideFactory || Vector3.Distance(((Component)val).transform.position, ((Component)__instance).transform.position) > 5f) { ChasingDogs.Remove(((NetworkBehaviour)__instance).NetworkObjectId); return true; } Networker.Instance.SetDogPathServerRpc(((NetworkBehaviour)__instance).NetworkObjectId, (int)val.playerClientId); return false; } [HarmonyPatch("Update")] [HarmonyPrefix] internal static void UpdatePatch(MouthDogAI __instance) { if (ChasingDogs.ContainsKey(((NetworkBehaviour)__instance).NetworkObjectId)) { __instance.suspicionLevel = 12; } } } [HarmonyPatch(typeof(PlayerControllerB))] public class PlayerControllerBPatch { [HarmonyPatch("KillPlayer")] [HarmonyPrefix] private static bool AllowExtraLife(PlayerControllerB __instance, CauseOfDeath causeOfDeath) { if (!Networker.AllowExtraLife || !((NetworkBehaviour)__instance).IsOwner) { return true; } PluginLogger.Debug("Allowing extra life for player " + __instance.playerUsername); PluginLogger.Debug("Cause of death: " + ((object)(CauseOfDeath)(ref causeOfDeath)).ToString()); Networker.Instance.ExtraLifeServerRpc((int)__instance.playerClientId); __instance.deadBody = null; return false; } } [HarmonyPatch(typeof(RadMechAI))] public class RadMechAIPatch { [CompilerGenerated] private sealed class <>c__DisplayClass6_0 { public RadMechAI bird; public float startTime; internal bool b__0() { return ActiveBlowtorches.Contains(((NetworkBehaviour)bird).NetworkObjectId) || Time.realtimeSinceStartup - startTime > 6f; } } [CompilerGenerated] private sealed class d__6 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public RadMechAI bird; public float startTime; private <>c__DisplayClass6_0 <>8__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_00fd: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_01e6: 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_01f7: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass6_0(); <>8__1.bird = bird; <>8__1.startTime = startTime; <>2__current = (object)new WaitUntil((Func)(() => ActiveBlowtorches.Contains(((NetworkBehaviour)<>8__1.bird).NetworkObjectId) || Time.realtimeSinceStartup - <>8__1.startTime > 6f)); <>1__state = 1; return true; case 1: <>1__state = -1; PluginLogger.Debug("Start Damages"); <>8__1.startTime = Time.realtimeSinceStartup; break; case 2: <>1__state = -1; if ((Object)(object)((EnemyAI)<>8__1.bird).inSpecialAnimationWithPlayer != (Object)null) { ((EnemyAI)<>8__1.bird).inSpecialAnimationWithPlayer.DamagePlayer(20, true, true, (CauseOfDeath)13, 6, false, default(Vector3)); break; } ((MonoBehaviour)<>8__1.bird).StartCoroutine(FinishTorching(<>8__1.bird)); return false; } if (ActiveBlowtorches.Contains(((NetworkBehaviour)<>8__1.bird).NetworkObjectId) && Time.realtimeSinceStartup - <>8__1.startTime < 6f) { <>2__current = (object)new WaitForSeconds(0.25f); <>1__state = 2; return true; } if ((Object)(object)((EnemyAI)<>8__1.bird).inSpecialAnimationWithPlayer != (Object)null && (Object)(object)((EnemyAI)<>8__1.bird).inSpecialAnimationWithPlayer == (Object)(object)GameNetworkManager.Instance.localPlayerController && !((EnemyAI)<>8__1.bird).inSpecialAnimationWithPlayer.isPlayerDead) { PluginLogger.Debug("Killing player !"); ((EnemyAI)<>8__1.bird).inSpecialAnimationWithPlayer.KillPlayer(Vector3.zero, true, (CauseOfDeath)13, 6, default(Vector3), false); } ((MonoBehaviour)<>8__1.bird).StartCoroutine(FinishTorching(<>8__1.bird)); 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__7 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public RadMechAI bird; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; PluginLogger.Debug("Finishing torching player animation"); <>2__current = (object)new WaitForSeconds(1.5f); <>1__state = 1; return true; case 1: <>1__state = -1; bird.CancelTorchPlayerAnimation(); if (((NetworkBehaviour)bird).IsServer) { bird.inTorchPlayerAnimation = false; ((EnemyAI)bird).inSpecialAnimationWithPlayer = null; ((EnemyAI)bird).inSpecialAnimation = false; ((Behaviour)((EnemyAI)bird).agent).enabled = 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(); } } public static readonly Dictionary ChasingBirds = new Dictionary(); private static readonly List ActiveBlowtorches = new List(); [HarmonyPatch("DoAIInterval")] [HarmonyPrefix] internal static void MakeBirdChasePlayer(RadMechAI __instance, ref bool ___lostCreatureInChase, ref float ___losTimer) { //IL_004a: 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_00cb: Unknown result type (might be due to invalid IL or missing references) if (!ChasingBirds.TryGetValue(((NetworkBehaviour)__instance).NetworkObjectId, out var value)) { return; } PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[value]; if (!val.isPlayerControlled || val.isInsideFactory || val.isInHangarShipRoom || Vector3.Distance(((Component)val).transform.position, ((Component)__instance).transform.position) < 10f) { PluginLogger.Debug("Player is not valid anymore, stopping chase"); ChasingBirds.Remove(((NetworkBehaviour)__instance).NetworkObjectId); return; } if (!__instance.spotlight.activeSelf) { __instance.EnableSpotlight(); } if (((EnemyAI)__instance).currentBehaviourStateIndex != 1) { ((EnemyAI)__instance).SwitchToBehaviourState(1); } __instance.SetTargetedThreat((IVisibleThreat)(object)val, ((Component)val).transform.position, 0f); __instance.focusedThreatTransform = ((Component)val).transform; __instance.alertTimer = 2f; __instance.isAlerted = true; ___lostCreatureInChase = false; ___losTimer = 0f; } [HarmonyPatch("EnableBlowtorch")] [HarmonyPostfix] internal static void EnableBlowtorch(RadMechAI __instance) { if (!ActiveBlowtorches.Contains(((NetworkBehaviour)__instance).NetworkObjectId)) { ActiveBlowtorches.Add(((NetworkBehaviour)__instance).NetworkObjectId); } } [HarmonyPatch("DisableBlowtorch")] [HarmonyPostfix] internal static void DisableBlowtorch(RadMechAI __instance) { if (ActiveBlowtorches.Contains(((NetworkBehaviour)__instance).NetworkObjectId)) { ActiveBlowtorches.Remove(((NetworkBehaviour)__instance).NetworkObjectId); } } [HarmonyPatch("TorchPlayerAnimation")] [HarmonyPrefix] internal static bool TorchPlayerAnimPatch(RadMechAI __instance, ref IEnumerator __result) { ((EnemyAI)__instance).creatureAnimator.SetBool("AttemptingGrab", true); ((EnemyAI)__instance).creatureAnimator.SetBool("GrabSuccessful", true); ((EnemyAI)__instance).creatureAnimator.SetBool("GrabUnsuccessful", false); float realtimeSinceStartup = Time.realtimeSinceStartup; PluginLogger.Debug("Starting torching player animation pt2"); __result = ContinueTorchPlayerAnim(__instance, realtimeSinceStartup); return false; } [IteratorStateMachine(typeof(d__6))] private static IEnumerator ContinueTorchPlayerAnim(RadMechAI bird, float startTime) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__6(0) { bird = bird, startTime = startTime }; } [IteratorStateMachine(typeof(d__7))] private static IEnumerator FinishTorching(RadMechAI bird) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__7(0) { bird = bird }; } } [HarmonyPatch(typeof(SpringManAI))] public class SpringManAIPatch { public static readonly List ChasingSprings = new List(); [HarmonyPatch("Update")] [HarmonyPrefix] internal static void UpdatePatch(SpringManAI __instance, ref bool ___stoppingMovement, ref bool ___setOnCooldown) { if (!ChasingSprings.Contains(((NetworkBehaviour)__instance).NetworkObjectId)) { return; } if (___stoppingMovement) { ChasingSprings.Remove(((NetworkBehaviour)__instance).NetworkObjectId); return; } if (((EnemyAI)__instance).currentBehaviourStateIndex != 1) { ((EnemyAI)__instance).SwitchToBehaviourState(1); } __instance.timeSpentMoving = 0f; ___setOnCooldown = false; } } [HarmonyPatch(typeof(StartOfRound))] public class StartOfRoundPatch { [HarmonyPrefix] [HarmonyPatch("EndOfGame")] internal static void EndOfGamePatch() { TrapsPatch.fakeTraps.Clear(); } } public class TrapsPatch { [HarmonyPatch(typeof(SpikeRoofTrap))] internal class SpikeRoofTrapPatch { [HarmonyPrefix] [HarmonyPatch("ToggleSpikesEnabledLocalClient")] internal static bool ToggleSpikesPatch(SpikeRoofTrap __instance) { if (Object.op_Implicit((Object)(object)((Component)__instance).gameObject.GetComponentInParent()) && fakeTraps.Contains(((Component)__instance).gameObject.GetComponentInParent().NetworkObjectId)) { __instance.trapActive = false; return false; } return true; } } [HarmonyPatch(typeof(Turret))] internal class TurretPatch { [HarmonyPrefix] [HarmonyPatch("Update")] internal static void UpdatePatch(Turret __instance) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Invalid comparison between Unknown and I4 //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Invalid comparison between Unknown and I4 //IL_0049: 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) if (Object.op_Implicit((Object)(object)((Component)__instance).gameObject.GetComponentInParent()) && fakeTraps.Contains(((Component)__instance).gameObject.GetComponentInParent().NetworkObjectId)) { if ((int)__instance.turretMode == 2) { __instance.turretMode = (TurretMode)1; } else if ((int)__instance.turretMode == 3) { __instance.turretMode = (TurretMode)0; } } } } public static List fakeTraps = new List(); } } namespace LCTarrotCard.Items { public class TarotBehaviour : GrabbableObject { [CompilerGenerated] private sealed class d__14 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public TarotBehaviour <>4__this; private Vector3 5__1; private Vector3 5__2; private float 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Expected O, but got Unknown //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.drawingCoroutinePlaying = true; ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.currentCardProperties.CardPullingCoroutine()); <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = <>4__this.currentCard.transform.localPosition; 5__2 = <>4__this.currentCard.transform.localPosition + new Vector3(0.2f, 0f, 0f); 5__3 = 0f; goto IL_0152; case 2: <>1__state = -1; goto IL_0152; case 3: <>1__state = -1; if (((NetworkBehaviour)<>4__this).IsServer || ((NetworkBehaviour)<>4__this).IsHost) { <>4__this.ExecuteEffectServerRpc(); } <>2__current = (object)new WaitForSeconds(1f); <>1__state = 4; return true; case 4: { <>1__state = -1; <>4__this.drawingCoroutinePlaying = false; <>4__this.EndDrawingCard(); return false; } IL_0152: if (5__3 < 0.5f) { <>4__this.currentCard.transform.localPosition = Vector3.Lerp(5__1, 5__2, <>4__this.controlCurve.Evaluate(5__3 * 2f)); 5__3 += Time.deltaTime; <>2__current = null; <>1__state = 2; return true; } <>2__current = (object)new WaitForSeconds(1.1f); <>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(); } } private int cardLeft = 10; private AudioSource itemAudio; private PlayerControllerB playerWhoDrew; private bool isDrawingCard; private GameObject currentCard; private Card currentCardProperties; private bool drawingCoroutinePlaying; private readonly Vector3 originalCardScale = new Vector3(1f, 1f, 1f); private readonly AnimationCurve controlCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 0f, 0f, 0f, 0.5f, 0.5f), new Keyframe(1f, 1f, 0f, 0f, 0.5f, 0.5f) }); public override void Start() { ((GrabbableObject)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent(); if (ConfigManager.DeckSize.Value > 0 && ConfigManager.DeckSize.Value <= 100) { cardLeft = ConfigManager.DeckSize.Value; } if (((NetworkBehaviour)this).IsOwner) { SetNumberOfCardsServerRpc(cardLeft); } } public override void ItemActivate(bool used, bool buttonDown = true) { if (!base.deactivated && ((NetworkBehaviour)this).IsOwner && buttonDown && !isDrawingCard && base.isHeld && !((Object)(object)base.playerHeldBy == (Object)null) && cardLeft > 0) { isDrawingCard = true; DrawCardServerRpc(base.playerHeldBy.playerClientId); } } public bool CanDrawCard() { return StartOfRound.Instance.shipHasLanded && (Object)(object)base.playerHeldBy != (Object)null && StartOfRound.Instance.currentLevel.levelID != 3; } public override void SetControlTipsForItem() { if (!ConfigManager.DisplayCardLeft.Value) { ((GrabbableObject)this).SetControlTipsForItem(); return; } List list = new List(base.itemProperties.toolTips); if (cardLeft > 0) { list.Add(cardLeft + " card" + ((cardLeft == 1) ? "" : "s") + " left"); } HUDManager.Instance.ChangeControlTipMultiple(list.ToArray(), true, base.itemProperties); } public void StartDrawingCard(int pulledCard, int randomSeed) { //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)playerWhoDrew == (Object)null) { PluginLogger.Error("Trying to pull a card with a null player"); DestroyAfterDrawing(); } else if (pulledCard < 0 || pulledCard >= AllCards.GetAllCardsAsList().Count) { PluginLogger.Error("Trying to pull a card with an invalid index"); DestroyAfterDrawing(); } else if (!drawingCoroutinePlaying) { cardLeft--; PluginLogger.Debug("Card left : " + cardLeft); if (base.playerHeldBy.playerClientId == GameNetworkManager.Instance.localPlayerController.playerClientId) { ((GrabbableObject)this).SetControlTipsForItem(); } if (cardLeft > 0) { float num = (float)cardLeft * 0.1f; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(originalCardScale.x, originalCardScale.y * num, originalCardScale.z); ((Component)this).gameObject.transform.localScale = val; base.originalScale = val; } else { ((Component)((Component)this).gameObject.transform.GetChild(0)).gameObject.SetActive(false); } Type type = AllCards.GetAllCardsAsList()[pulledCard]; currentCard = Object.Instantiate(Assets.SingleTarotCard, ((Component)this).gameObject.transform); Transform transform = currentCard.transform; transform.localEulerAngles += new Vector3(180f, 0f, 0f); PluginLogger.Debug("Card with type " + type.Name); currentCardProperties = (Card)Activator.CreateInstance(type, currentCard, itemAudio); currentCardProperties.InitCard(new Random(randomSeed)); ((MonoBehaviour)this).StartCoroutine(DrawingCoroutine()); } } [IteratorStateMachine(typeof(d__14))] private IEnumerator DrawingCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__14(0) { <>4__this = this }; } public void EndDrawingCard() { if (!drawingCoroutinePlaying) { DestroyAfterDrawing(); } } private void DestroyAfterDrawing() { playerWhoDrew = null; if (Object.op_Implicit((Object)(object)currentCard)) { Object.Destroy((Object)(object)currentCard); } currentCardProperties = null; if (cardLeft <= 0) { DestroyServerRpc(); } isDrawingCard = false; } private void DestroyLocalClient() { itemAudio.volume = 0f; ((GrabbableObject)this).DestroyObjectInHand(base.playerHeldBy); base.deactivated = true; } [ServerRpc] public void DestroyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(208088460u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 208088460u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsHost) { DestroyLocalClient(); } DestroyClientRpc(); } } [ClientRpc] public void DestroyClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3929202946u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3929202946u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DestroyLocalClient(); } } } [ServerRpc] public void DrawCardServerRpc(ulong playerWhoPulled) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4032826831u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoPulled); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4032826831u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Type item = AllCards.PullRandomCard(); if (!CanDrawCard()) { item = typeof(FoolCard); } int pulledCard = AllCards.GetAllCardsAsList().IndexOf(item); DrawCardClientRpc(playerWhoPulled, pulledCard, new Random().Next()); } } [ClientRpc] public void DrawCardClientRpc(ulong playerWhoPulled, int pulledCard, int randomSeed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1861299721u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoPulled); BytePacker.WriteValueBitPacked(val2, pulledCard); BytePacker.WriteValueBitPacked(val2, randomSeed); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1861299721u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; isDrawingCard = true; playerWhoDrew = StartOfRound.Instance.allPlayerScripts[playerWhoPulled]; StartDrawingCard(pulledCard, randomSeed); } } } [ServerRpc] public void SetNumberOfCardsServerRpc(int number) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3480277555u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, number); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3480277555u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; cardLeft = number; SetNumberOfCardsClientRpc(number); } } [ClientRpc] public void SetNumberOfCardsClientRpc(int number) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0135: 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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(255951757u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, number); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 255951757u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; cardLeft = number; if (cardLeft > 0) { float num = (float)cardLeft * 0.1f; Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(originalCardScale.x, originalCardScale.y * num, originalCardScale.z); ((Component)this).gameObject.transform.localScale = val3; base.originalScale = val3; } else { PluginLogger.Debug("Warning : destroying cards"); ((Component)((Component)this).gameObject.transform.GetChild(0)).gameObject.SetActive(false); DestroyServerRpc(); } } } [ServerRpc(RequireOwnership = false)] public void ExecuteEffectServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4131510304u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4131510304u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) { string hint; try { hint = currentCardProperties.ExecuteEffect(playerWhoDrew); } catch (Exception ex) { PluginLogger.Error("Error while executing card effect : " + ex); ExecuteEffectClientRpc(string.Empty, error: true); return; } ExecuteEffectClientRpc(hint); } } [ClientRpc] public void ExecuteEffectClientRpc(string hint, bool error = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Invalid comparison between Unknown and I4 //IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(260156743u, val, (RpcDelivery)0); bool flag = hint != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(hint, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe(ref error, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 260156743u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { return; } if (error) { HUDManager.Instance.DisplayTip("Error", "An error occurred while executing the card effect, please report to the developer", false, false, "LC_Tip1"); } else if (ConfigManager.DisplayDrawnCard.Value) { if (ConfigManager.DisplayCardEffect.Value) { HUDManager.Instance.DisplayTip(currentCardProperties.GetCardName(), hint, false, false, "LC_Tip1"); } else { HUDManager.Instance.DisplayTip(currentCardProperties.GetCardName(), "You drew " + currentCardProperties.GetCardName(), false, false, "LC_Tip1"); } } } protected override void __initializeVariables() { ((GrabbableObject)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 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(208088460u, new RpcReceiveHandler(__rpc_handler_208088460), "DestroyServerRpc"); ((NetworkBehaviour)this).__registerRpc(3929202946u, new RpcReceiveHandler(__rpc_handler_3929202946), "DestroyClientRpc"); ((NetworkBehaviour)this).__registerRpc(4032826831u, new RpcReceiveHandler(__rpc_handler_4032826831), "DrawCardServerRpc"); ((NetworkBehaviour)this).__registerRpc(1861299721u, new RpcReceiveHandler(__rpc_handler_1861299721), "DrawCardClientRpc"); ((NetworkBehaviour)this).__registerRpc(3480277555u, new RpcReceiveHandler(__rpc_handler_3480277555), "SetNumberOfCardsServerRpc"); ((NetworkBehaviour)this).__registerRpc(255951757u, new RpcReceiveHandler(__rpc_handler_255951757), "SetNumberOfCardsClientRpc"); ((NetworkBehaviour)this).__registerRpc(4131510304u, new RpcReceiveHandler(__rpc_handler_4131510304), "ExecuteEffectServerRpc"); ((NetworkBehaviour)this).__registerRpc(260156743u, new RpcReceiveHandler(__rpc_handler_260156743), "ExecuteEffectClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_208088460(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0076: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((TarotBehaviour)(object)target).DestroyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3929202946(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; ((TarotBehaviour)(object)target).DestroyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4032826831(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { ulong playerWhoPulled = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoPulled); target.__rpc_exec_stage = (__RpcExecStage)1; ((TarotBehaviour)(object)target).DrawCardServerRpc(playerWhoPulled); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1861299721(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0050: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong playerWhoPulled = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoPulled); int pulledCard = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref pulledCard); int randomSeed = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref randomSeed); target.__rpc_exec_stage = (__RpcExecStage)1; ((TarotBehaviour)(object)target).DrawCardClientRpc(playerWhoPulled, pulledCard, randomSeed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3480277555(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { int numberOfCardsServerRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref numberOfCardsServerRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((TarotBehaviour)(object)target).SetNumberOfCardsServerRpc(numberOfCardsServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_255951757(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 numberOfCardsClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref numberOfCardsClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((TarotBehaviour)(object)target).SetNumberOfCardsClientRpc(numberOfCardsClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4131510304(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; ((TarotBehaviour)(object)target).ExecuteEffectServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_260156743(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_0067: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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 hint = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref hint, false); } bool error = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref error, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((TarotBehaviour)(object)target).ExecuteEffectClientRpc(hint, error); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "TarotBehaviour"; } } } namespace LCTarrotCard.Event { public class EnemyComeToMeEvent : IEvent { public string GetEventName() { return "Enemy Come To Me"; } public string ExecuteEvent(PlayerControllerB targetPlayer) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { if (Object.op_Implicit((Object)(object)spawnedEnemy) && !spawnedEnemy.isEnemyDead && spawnedEnemy.isOutside != targetPlayer.isInsideFactory) { spawnedEnemy.SetDestinationToPosition(((Component)targetPlayer).transform.position, false); } } return "Ding Dong !"; } public float GetEventDangerLevel() { return 0.8f; } public float GetEventWeight() { return 0.3f; } public float GetEventRange() { return 0.1f; } } public static class EventManager { private static ProbabilityRangedList eventList = new ProbabilityRangedList(); public static void RegisterEvent(IEvent eventToRegister) { if (eventToRegister.GetEventDangerLevel() < 0f || eventToRegister.GetEventDangerLevel() > 1f) { PluginLogger.Warning("Trying to register an event with an invalid danger level (level : " + eventToRegister.GetEventDangerLevel() + ")"); } else { eventList.Add(eventToRegister, eventToRegister.GetEventRange(), eventToRegister.GetEventWeight(), eventToRegister.GetEventDangerLevel()); } } public static void RegisterEvents(IEvent[] eventsToRegister) { foreach (IEvent eventToRegister in eventsToRegister) { RegisterEvent(eventToRegister); } } internal static void Init() { RegisterEvents(new IEvent[6] { new SpawnMonsterEvent(), new SpawnScrapEvent(), new EnemyComeToMeEvent(), new MoreTrapEvent(), new SpawnFakeTrapsEvent(), new OopsAllTwoHandedEvent() }); } [CanBeNull] public static IEvent GetRandomEvent(float dangerLevel, float softmaxTemp = 1f) { IEvent result = null; try { result = eventList.GetRandom(dangerLevel, softmaxTemp); } catch (Exception ex) { PluginLogger.Error("Error while getting a random event : " + ex.Message); } return result; } } public interface IEvent { string GetEventName(); string ExecuteEvent(PlayerControllerB targetPlayer); float GetEventDangerLevel(); float GetEventWeight(); float GetEventRange(); } public class MoreTrapEvent : IEvent { public string GetEventName() { return "More Trap"; } public string ExecuteEvent(PlayerControllerB targetPlayer) { //IL_0033: 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_0053: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < Random.Range(5, 10); i++) { GameObject val = Object.Instantiate(RoundManager.Instance.currentLevel.spawnableMapObjects[Random.Range(0, RoundManager.Instance.currentLevel.spawnableMapObjects.Length)].prefabToSpawn, Helper.GetRandomAINodePosition(), Quaternion.Euler(new Vector3(0f, (float)Random.Range(0, 360), 0f)), RoundManager.Instance.mapPropsContainer.transform); val.GetComponent().Spawn(true); } return "Watch your steps, and your head, and your everything"; } public float GetEventDangerLevel() { return 0.7f; } public float GetEventWeight() { return 0.6f; } public float GetEventRange() { return 0.2f; } } public class OopsAllTwoHandedEvent : IEvent { public string GetEventName() { return "Oops, All Two-Handed!"; } public string ExecuteEvent(PlayerControllerB targetPlayer) { //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) GrabbableObject[] array = Object.FindObjectsOfType(); List list = RoundManager.Instance.currentLevel.spawnableScrap.Where((SpawnableItemWithRarity rarity) => rarity.spawnableItem.twoHanded).ToList(); List list2 = new List(); List list3 = new List(); GrabbableObject[] array2 = array; foreach (GrabbableObject val in array2) { if (!((Object)(object)val.radarIcon == (Object)null) && !((Object)(object)((Component)val.radarIcon).gameObject == (Object)null) && ((Component)val.radarIcon).gameObject.activeSelf && !val.isHeld && !val.itemProperties.twoHanded) { Vector3 val2 = ((Component)val).transform.position + new Vector3(0f, 0.2f, 0f); int scrapValue = val.scrapValue; val.DestroyObjectInHand(val.playerHeldBy); GameObject val3 = Object.Instantiate(list[Random.Range(0, list.Count)].spawnableItem.spawnPrefab, val2, Quaternion.identity); GrabbableObject component = val3.GetComponent(); component.scrapValue = scrapValue; ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; NetworkObject component2 = val3.GetComponent(); component2.Spawn(false); list2.Add(NetworkObjectReference.op_Implicit(component2)); list3.Add(scrapValue); } } ((MonoBehaviour)targetPlayer).StartCoroutine(Networker.WaitAndSyncItemsValues(list2.ToArray(), list3.ToArray())); return "All one-handed items have been replaced with two-handed items!"; } public float GetEventDangerLevel() { return 0.9f; } public float GetEventWeight() { return 0.05f; } public float GetEventRange() { return 0.1f; } } public class SpawnFakeTrapsEvent : IEvent { public string GetEventName() { return "Spawn Fake Traps"; } public string ExecuteEvent(PlayerControllerB targetPlayer) { //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_0092: Unknown result type (might be due to invalid IL or missing references) List list = RoundManager.Instance.currentLevel.spawnableMapObjects.Where((SpawnableMapObject mapObject) => (Object)(object)mapObject.prefabToSpawn.GetComponentInChildren() != (Object)null || (Object)(object)mapObject.prefabToSpawn.GetComponentInChildren() != (Object)null || (Object)(object)mapObject.prefabToSpawn.GetComponentInChildren() != (Object)null).ToList(); if (list.Count == 0) { return "Nothing happened. (really)"; } for (int i = 0; i < Random.Range(7, 20); i++) { GameObject val = Object.Instantiate(list[Random.Range(0, list.Count)].prefabToSpawn, Helper.GetRandomAINodePosition(), Quaternion.Euler(new Vector3(0f, (float)Random.Range(0, 360), 0f)), RoundManager.Instance.mapPropsContainer.transform); val.GetComponent().Spawn(true); Landmine componentInChildren = val.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.hasExploded = true; } SpikeRoofTrap componentInChildren2 = val.GetComponentInChildren(); if ((Object)(object)componentInChildren2 != (Object)null) { componentInChildren2.trapActive = false; TrapsPatch.fakeTraps.Add(val.GetComponent().NetworkObjectId); } Turret componentInChildren3 = val.GetComponentInChildren(); if ((Object)(object)componentInChildren3 != (Object)null) { TrapsPatch.fakeTraps.Add(val.GetComponent().NetworkObjectId); } } return "Traps ?!"; } public float GetEventDangerLevel() { return 0.5f; } public float GetEventWeight() { return 0.4f; } public float GetEventRange() { return 0.2f; } } public class SpawnMonsterEvent : IEvent { public string GetEventName() { return "Monster Wave"; } public string ExecuteEvent(PlayerControllerB targetPlayer) { //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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) float num = 0f; float num2 = RoundManager.Instance.currentMaxInsidePower - RoundManager.Instance.currentEnemyPower; List list = new List(); int num3 = 0; foreach (SpawnableEnemyWithRarity enemy in RoundManager.Instance.currentLevel.Enemies) { list.Add(enemy.rarity); num3 += enemy.rarity; } while (num < num2) { int num4 = Random.Range(0, num3); EnemyType val = null; int num5 = 0; foreach (int item in list) { num5 += item; if (num4 >= num5) { continue; } val = RoundManager.Instance.currentLevel.Enemies[list.IndexOf(item)].enemyType; break; } if (!((Object)(object)val == (Object)null)) { num += val.PowerLevel; Vector3 position = ((Component)RoundManager.Instance.allEnemyVents[Random.Range(0, RoundManager.Instance.allEnemyVents.Length)]).transform.position; GameObject val2 = Object.Instantiate(val.enemyPrefab, position, Quaternion.identity); val2.GetComponentInChildren().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add(val2.GetComponent()); } } return "Meet your new friends!"; } public float GetEventDangerLevel() { return 0.7f; } public float GetEventWeight() { return 0.5f; } public float GetEventRange() { return 0.15f; } } public class SpawnScrapEvent : IEvent { public string GetEventName() { return "Spawn Scrap"; } public string ExecuteEvent(PlayerControllerB targetPlayer) { //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: 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_01e9: Unknown result type (might be due to invalid IL or missing references) List list = new List(); int num = 0; foreach (SpawnableItemWithRarity item in RoundManager.Instance.currentLevel.spawnableScrap) { if (!((Object)(object)item.spawnableItem == (Object)(object)Assets.TarotItem)) { list.Add(item.rarity); num += item.rarity; } } if (num == 0) { return "No scrap could be spawned."; } List list2 = new List(); List list3 = new List(); for (int i = 0; i < Random.Range(1, 5); i++) { int num2 = 0; int num3 = Random.Range(0, num); Item val = null; for (int j = 0; j < list.Count; j++) { num2 += list[j]; if (num3 < num2) { val = RoundManager.Instance.currentLevel.spawnableScrap[j].spawnableItem; break; } } if (!((Object)(object)val == (Object)null)) { GameObject val2 = Object.Instantiate(val.spawnPrefab, ((Component)targetPlayer).transform.position + new Vector3(Random.Range(-0.5f, 0.5f), 0f, Random.Range(-0.5f, 0.5f)), Quaternion.identity); GrabbableObject component = val2.GetComponent(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; component.scrapValue = Random.Range(component.itemProperties.minValue, component.itemProperties.maxValue); NetworkObject component2 = val2.GetComponent(); component2.Spawn(false); component.FallToGround(false, true, default(Vector3)); list2.Add(NetworkObjectReference.op_Implicit(component2)); list3.Add(component.scrapValue); } } ((MonoBehaviour)targetPlayer).StartCoroutine(Networker.WaitAndSyncItemsValues(list2.ToArray(), list3.ToArray())); return "Some scrap has spawned around you."; } public float GetEventDangerLevel() { return 0.25f; } public float GetEventWeight() { return 0.4f; } public float GetEventRange() { return 0.2f; } } } namespace LCTarrotCard.Config { public static class ConfigManager { public static ConfigEntry DeckMultiplySpawnChance; public static ConfigEntry DeckSize; public static ConfigEntry DisplayDrawnCard; public static ConfigEntry DisplayCardEffect; public static ConfigEntry DisplayCardLeft; public static ConfigEntry TowerCardChance; public static ConfigEntry WheelCardChance; public static ConfigEntry SunCardChance; public static ConfigEntry MoonCardChance; public static ConfigEntry DevilCardChance; public static ConfigEntry HermitCardChance; public static ConfigEntry HighPriestessCardChance; public static ConfigEntry DeathCardChance; public static ConfigEntry HangedManCardChance; public static ConfigEntry FoolCardChance; public static ConfigEntry TowerShipLeaveChance; public static ConfigEntry TowerSecurityDoorsChance; public static ConfigEntry TowerDoorsChance; public static ConfigEntry TowerShipDoorChance; public static ConfigEntry TowerBreakerChance; public static ConfigEntry WheelMultiplyValueChance; public static ConfigEntry WheelBadMultiplyRange; public static ConfigEntry WheelGoodMultiplyRange; public static ConfigEntry WheelHealOrDamageChance; public static ConfigEntry WheelHealOrDamageValue; public static ConfigEntry SunHealOrDamageChance; public static ConfigEntry SunMaxMultiplyRange; public static ConfigEntry SunMinMultiplyRange; public static ConfigEntry MoonMaxMultiplyRange; public static ConfigEntry MoonMinMultiplyRange; public static ConfigEntry DevilBlowChance; public static ConfigEntry HermitTpChance; public static ConfigEntry DeathEnableCoilhead; public static ConfigEntry DeathEnableJester; public static ConfigEntry DeathEnableGhostGirl; public static ConfigEntry DeathEnableBracken; public static ConfigEntry DeathEnableDog; public static ConfigEntry DeathEnableGiant; public static ConfigEntry DeathEnableOldBird; public static ConfigEntry DeathEnableWorm; internal static ConfigEntry DebugModeSetting; public static void Init(ConfigFile configFile) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown DeckMultiplySpawnChance = configFile.Bind("General", "DeckSpawnChance", 1f, new ConfigDescription("Multiplier of the chance for the deck to spawn (default : 1)", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 100f), Array.Empty())); DeckSize = configFile.Bind("General", "DeckSize", 10, new ConfigDescription("Size of the deck (default : 10 cards)", (AcceptableValueBase)(object)new AcceptableValueRange(1, 100), Array.Empty())); DisplayDrawnCard = configFile.Bind("General", "DisplayDrawnCard", false, new ConfigDescription("Display the drawn card (default : false)", (AcceptableValueBase)null, Array.Empty())); DisplayCardEffect = configFile.Bind("General", "DisplayCardEffect", false, new ConfigDescription("Display a hint about what the card did (default : false)", (AcceptableValueBase)null, Array.Empty())); DisplayCardLeft = configFile.Bind("General", "DisplayCardLeft", false, new ConfigDescription("Display the number of card left in the deck (default : false)", (AcceptableValueBase)null, Array.Empty())); InitCardConfig(configFile); DebugModeSetting = configFile.Bind("Debug", "DebugMode", false, new ConfigDescription("Enable debug mode (show debug logs in the console and make the Tarot spawn when hitting the backspace key, the one above the tab key) (default : false)", (AcceptableValueBase)null, Array.Empty())); } private static void InitCardConfig(ConfigFile configFile) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Expected O, but got Unknown //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Expected O, but got Unknown //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Expected O, but got Unknown //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Expected O, but got Unknown //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Expected O, but got Unknown //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Expected O, but got Unknown //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Expected O, but got Unknown //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Expected O, but got Unknown //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Expected O, but got Unknown //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Expected O, but got Unknown //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Expected O, but got Unknown //IL_03ff: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Expected O, but got Unknown //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Expected O, but got Unknown //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Expected O, but got Unknown //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Expected O, but got Unknown //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Expected O, but got Unknown //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_050d: Expected O, but got Unknown //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Expected O, but got Unknown //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Expected O, but got Unknown //IL_0575: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Expected O, but got Unknown //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Expected O, but got Unknown //IL_05c1: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: Expected O, but got Unknown //IL_05e7: Unknown result type (might be due to invalid IL or missing references) //IL_05f1: Expected O, but got Unknown //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_0617: Expected O, but got Unknown //IL_0633: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Expected O, but got Unknown TowerCardChance = configFile.Bind("Card", "TowerCardChance", 20, new ConfigDescription("Chance for the Tower card to be drawn (default : 20)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); WheelCardChance = configFile.Bind("Card", "WheelCardChance", 20, new ConfigDescription("Chance for the Wheel card to be drawn (default : 20)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); SunCardChance = configFile.Bind("Card", "SunCardChance", 5, new ConfigDescription("Chance for the Sun card to be drawn (default : 5)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); MoonCardChance = configFile.Bind("Card", "MoonCardChance", 5, new ConfigDescription("Chance for the Moon card to be drawn (default : 5)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); DevilCardChance = configFile.Bind("Card", "DevilCardChance", 10, new ConfigDescription("Chance for the Devil card to be drawn (default : 10)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); HermitCardChance = configFile.Bind("Card", "HermitCardChance", 10, new ConfigDescription("Chance for the Hermit card to be drawn (default : 10)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); HighPriestessCardChance = configFile.Bind("Card", "HighPriestessCardChance", 2, new ConfigDescription("Chance for the High Priestess card to be drawn (default : 2)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); DeathCardChance = configFile.Bind("Card", "DeathCardChance", 10, new ConfigDescription("Chance for the Death card to be drawn (default : 10)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); HangedManCardChance = configFile.Bind("Card", "HangedManCardChance", 1, new ConfigDescription("Chance for the Hanged Man card to be drawn (default : 1)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); FoolCardChance = configFile.Bind("Card", "FoolCardChance", 17, new ConfigDescription("Chance for the Fool card to be drawn (default : 17)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); TowerShipLeaveChance = configFile.Bind("TowerCard", "TowerShipLeaveChance", 1, new ConfigDescription("Chance for the Tower card to make the ship leave early (default : 1)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); TowerSecurityDoorsChance = configFile.Bind("TowerCard", "TowerSecurityDoorsChance", 20, new ConfigDescription("Chance for the Tower card to open/close random security doors (default : 20)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); TowerDoorsChance = configFile.Bind("TowerCard", "TowerDoorsChance", 20, new ConfigDescription("Chance for the Tower card to open/close random doors (default : 20)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); TowerShipDoorChance = configFile.Bind("TowerCard", "TowerShipDoorChance", 20, new ConfigDescription("Chance for the Tower card to invert ship door state (default : 20)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); TowerBreakerChance = configFile.Bind("TowerCard", "TowerBreakerChance", 20, new ConfigDescription("Chance for the Tower card to turn off the breaker (default : 20)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); WheelMultiplyValueChance = configFile.Bind("WheelCard", "WheelMultiplyValueChance", 50, new ConfigDescription("Chance for the Wheel card to multiply some scrap value (default : 50)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); WheelBadMultiplyRange = configFile.Bind("WheelCard", "WheelBadMultiplyRange", 0.9f, new ConfigDescription("Range for the Wheel card to multiply some scrap value (bad outcome) (default : 0.9)", (AcceptableValueBase)(object)new AcceptableValueRange(0.1f, 1f), Array.Empty())); WheelGoodMultiplyRange = configFile.Bind("WheelCard", "WheelGoodMultiplyRange", 1.1f, new ConfigDescription("Range for the Wheel card to multiply some scrap value (good outcome) (default : 1.1)", (AcceptableValueBase)(object)new AcceptableValueRange(1f, 2f), Array.Empty())); WheelHealOrDamageChance = configFile.Bind("WheelCard", "WheelHealOrDamageChance", 50, new ConfigDescription("Chance for the Wheel card to heal or damage (default : 50)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); WheelHealOrDamageValue = configFile.Bind("WheelCard", "WheelHealOrDamageValue", 20, new ConfigDescription("Value for the Wheel card to heal or damage (default : 20)", (AcceptableValueBase)(object)new AcceptableValueRange(1, 100), Array.Empty())); SunHealOrDamageChance = configFile.Bind("SunMoonCard", "SunHealOrDamageChance", 50, new ConfigDescription("Chance for the Sun card to heal or damage instead of multiplying scrap value (default : 50)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); SunMaxMultiplyRange = configFile.Bind("SunMoonCard", "SunMaxMultiplyRange", 1.5f, new ConfigDescription("Max range for the Sun card to multiply scrap value (default : 1.5)", (AcceptableValueBase)(object)new AcceptableValueRange(1f, 2f), Array.Empty())); SunMinMultiplyRange = configFile.Bind("SunMoonCard", "SunMinMultiplyRange", 1.1f, new ConfigDescription("Min range for the Sun card to multiply scrap value (default : 1.1)", (AcceptableValueBase)(object)new AcceptableValueRange(1f, 2f), Array.Empty())); MoonMaxMultiplyRange = configFile.Bind("SunMoonCard", "MoonMaxMultiplyRange", 0.9f, new ConfigDescription("Max range for the Moon card to multiply scrap value (default : 0.9)", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); MoonMinMultiplyRange = configFile.Bind("SunMoonCard", "MoonMinMultiplyRange", 0.5f, new ConfigDescription("Min range for the Moon card to multiply scrap value (default : 0.5)", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); DevilBlowChance = configFile.Bind("DevilCard", "DevilBlowChance", 10, new ConfigDescription("Chance for the Devil card to play the ghost breathe SFX (default : 10)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); HermitTpChance = configFile.Bind("HermitCard", "HermitTpChance", 50, new ConfigDescription("Chance for the Hermit card to teleport you away (default : 50)", (AcceptableValueBase)(object)new AcceptableValueRange(0, 100), Array.Empty())); DeathEnableCoilhead = configFile.Bind("DeathCard", "DeathEnableCoilhead", true, new ConfigDescription("Enable Coilhead aggro on Death card (default : true)", (AcceptableValueBase)null, Array.Empty())); DeathEnableJester = configFile.Bind("DeathCard", "DeathEnableJester", true, new ConfigDescription("Enable Jester aggro on Death card (default : true)", (AcceptableValueBase)null, Array.Empty())); DeathEnableGhostGirl = configFile.Bind("DeathCard", "DeathEnableGhostGirl", true, new ConfigDescription("Enable Ghost aggro on Death card (default : true)", (AcceptableValueBase)null, Array.Empty())); DeathEnableBracken = configFile.Bind("DeathCard", "DeathEnableBracken", true, new ConfigDescription("Enable Bracken aggro on Death card (default : true)", (AcceptableValueBase)null, Array.Empty())); DeathEnableDog = configFile.Bind("DeathCard", "DeathEnableDog", true, new ConfigDescription("Enable Dog aggro on Death card (default : true)", (AcceptableValueBase)null, Array.Empty())); DeathEnableGiant = configFile.Bind("DeathCard", "DeathEnableGiant", true, new ConfigDescription("Enable Giant aggro on Death card (default : true)", (AcceptableValueBase)null, Array.Empty())); DeathEnableOldBird = configFile.Bind("DeathCard", "DeathEnableOldBird", true, new ConfigDescription("Enable Old Bird aggro on Death card (default : true)", (AcceptableValueBase)null, Array.Empty())); DeathEnableWorm = configFile.Bind("DeathCard", "DeathEnableWorm", true, new ConfigDescription("Enable Worm aggro on Death card (default : true)", (AcceptableValueBase)null, Array.Empty())); } } } namespace LCTarrotCard.Cards { public static class AllCards { public static class BaseProbabilityTable { public static readonly int TowerCard = 20; public static readonly int WheelCard = 20; public static readonly int SunCard = 5; public static readonly int MoonCard = 5; public static readonly int DevilCard = 10; public static readonly int HermitCard = 10; public static readonly int HighPriestessCard = 2; public static readonly int DeathCard = 10; public static readonly int HangedManCard = 1; public static readonly int FoolCard = 17; } public static readonly Dictionary AllCardsWeighted = new Dictionary(); private static int _totalWeight; internal static void Init() { AllCardsWeighted.Add(typeof(TowerCard), GetValidWeight(ConfigManager.TowerCardChance.Value, BaseProbabilityTable.TowerCard)); AllCardsWeighted.Add(typeof(WheelCard), GetValidWeight(ConfigManager.WheelCardChance.Value, BaseProbabilityTable.WheelCard)); AllCardsWeighted.Add(typeof(SunCard), GetValidWeight(ConfigManager.SunCardChance.Value, BaseProbabilityTable.SunCard)); AllCardsWeighted.Add(typeof(MoonCard), GetValidWeight(ConfigManager.MoonCardChance.Value, BaseProbabilityTable.MoonCard)); AllCardsWeighted.Add(typeof(DevilCard), GetValidWeight(ConfigManager.DevilCardChance.Value, BaseProbabilityTable.DevilCard)); AllCardsWeighted.Add(typeof(HermitCard), GetValidWeight(ConfigManager.HermitCardChance.Value, BaseProbabilityTable.HermitCard)); AllCardsWeighted.Add(typeof(HighPriestessCard), GetValidWeight(ConfigManager.HighPriestessCardChance.Value, BaseProbabilityTable.HighPriestessCard)); AllCardsWeighted.Add(typeof(DeathCard), GetValidWeight(ConfigManager.DeathCardChance.Value, BaseProbabilityTable.DeathCard)); AllCardsWeighted.Add(typeof(HangedManCard), GetValidWeight(ConfigManager.HangedManCardChance.Value, BaseProbabilityTable.HangedManCard)); AllCardsWeighted.Add(typeof(FoolCard), GetValidWeight(ConfigManager.FoolCardChance.Value, BaseProbabilityTable.FoolCard)); RecalculateTotalWeight(); } private static int GetValidWeight(int weight, int defaultWeight) { return (weight >= 0 && weight <= 100) ? weight : defaultWeight; } [UsedImplicitly] public static void RegisterCard(Type cardType, int weight) { if (!typeof(Card).IsAssignableFrom(cardType)) { PluginLogger.Warning("Trying to register a non-card type (type : " + cardType.Name + ")"); return; } if (AllCardsWeighted.ContainsKey(cardType)) { PluginLogger.Warning("Trying to register a card that is already registered (type : " + cardType.Name + ")"); return; } AllCardsWeighted.Add(cardType, weight); RecalculateTotalWeight(); } public static List GetAllCardsAsList() { return new List(AllCardsWeighted.Keys); } private static void RecalculateTotalWeight() { _totalWeight = 0; foreach (int value in AllCardsWeighted.Values) { _totalWeight += value; } } public static Type PullRandomCard() { int num = 0; int num2 = Random.Range(0, _totalWeight + 1); Type type = typeof(object); foreach (KeyValuePair item in AllCardsWeighted) { if (item.Value + num >= num2) { type = item.Key; break; } num += item.Value; } if (typeof(Card).IsAssignableFrom(type)) { return type; } PluginLogger.Warning("Trying to pull a card with a non-card type (type : " + type.Name + ")"); return typeof(FoolCard); } } public abstract class Card { [CompilerGenerated] private sealed class d__9 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Card <>4__this; private Renderer 5__1; private Material 5__2; private Material 5__3; private Material 5__4; private float 5__5; private Vector3 5__6; private float 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__9(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; 5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Expected O, but got Unknown //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.cardAudio.PlayOneShot(Assets.PullCardClips[Random.Range(0, Assets.PullCardClips.Count)]); <>2__current = (object)new WaitForSeconds(2.2f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = <>4__this.cardPrefab.GetComponent(); 5__2 = 5__1.materials[0]; 5__3 = 5__1.materials[1]; 5__4 = 5__1.materials[2]; 5__5 = 0f; goto IL_01a5; case 2: <>1__state = -1; goto IL_01a5; case 3: <>1__state = -1; 5__6 = <>4__this.cardPrefab.transform.localScale; 5__7 = 0f; break; case 4: { <>1__state = -1; break; } IL_01a5: if (5__5 < 0.3f) { 5__1.materials[0].Lerp(5__2, <>4__this.GetCardBurn(), 5__5 / 0.3f); 5__1.materials[1].Lerp(5__3, <>4__this.GetCardBurn(), 5__5 / 0.3f); 5__1.materials[2].Lerp(5__4, <>4__this.GetCardBurn(), 5__5 / 0.3f); 5__5 += Time.deltaTime; <>2__current = null; <>1__state = 2; return true; } <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 3; return true; } if (5__7 < 0.3f) { <>4__this.cardPrefab.transform.localScale = 5__6 * (1f - ControlCurve.Evaluate(5__7 / 0.3f)); 5__7 += Time.deltaTime; <>2__current = null; <>1__state = 4; return true; } <>4__this.cardPrefab.transform.localScale = Vector3.zero; 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(); } } protected static readonly AnimationCurve ControlCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 0f, 0f, 0f, 0.5f, 0.5f), new Keyframe(1f, 1f, 0f, 0f, 0f, 0f) }); protected readonly AudioSource cardAudio; protected readonly GameObject cardPrefab; protected Card(GameObject cardPrefab, AudioSource audioSource) { this.cardPrefab = cardPrefab; cardAudio = audioSource; } public virtual void InitCard(Random random) { Renderer component = cardPrefab.GetComponent(); Material[] materials = component.materials; materials[0] = GetCardMaterial(); component.materials = materials; } public abstract Material GetCardMaterial(); public abstract Material GetCardBurn(); public abstract string ExecuteEffect(PlayerControllerB playerWhoDrew); public abstract string GetCardName(); [IteratorStateMachine(typeof(d__9))] public virtual IEnumerator CardPullingCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__9(0) { <>4__this = this }; } } public class DeathCard : Card { public override Material GetCardMaterial() { return Assets.Materials.CardDeathMat; } public override Material GetCardBurn() { return Assets.Materials.BurnPurple; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { List list = new List(); if (playerWhoDrew.isInsideFactory) { if (ConfigManager.DeathEnableCoilhead.Value) { list.Add(0); } if (ConfigManager.DeathEnableJester.Value) { list.Add(1); } if (ConfigManager.DeathEnableGhostGirl.Value) { list.Add(2); } if (ConfigManager.DeathEnableBracken.Value) { list.Add(3); } if (list.Count == 0) { PluginLogger.Debug("No outcomes enabled, returning"); return "Nothing happened"; } Helper.Shuffle(list); switch (list[0]) { case 0: PluginLogger.Debug("Agroing coilhead or spawning one"); Networker.Instance.AgroCoilheadOrSpawnServerRpc(); break; case 1: PluginLogger.Debug("Pop or spawning jester"); Networker.Instance.PopOrSpawnJesterServerRpc(Random.Range(1.5f, 10.5f)); break; case 2: PluginLogger.Debug("Make ghost girl chase player or spawn"); Networker.Instance.LittleGirlChaseServerRpc((int)playerWhoDrew.playerClientId); break; case 3: PluginLogger.Debug("Make bracken chase player or spawn"); Networker.Instance.AgroBrackenOrSpawnServerRpc((int)playerWhoDrew.playerClientId); break; } return "They know where you are"; } if (ConfigManager.DeathEnableDog.Value) { list.Add(0); } if (ConfigManager.DeathEnableGiant.Value) { list.Add(1); } if (ConfigManager.DeathEnableOldBird.Value) { list.Add(2); } if (ConfigManager.DeathEnableWorm.Value) { list.Add(3); } if (list.Count == 0) { PluginLogger.Debug("No outcomes enabled, returning"); return "Nothing happened"; } Helper.Shuffle(list); switch (list[0]) { case 0: PluginLogger.Debug("Dog chase player or spawn"); Networker.Instance.DogChaseOrSpawnServerRpc((int)playerWhoDrew.playerClientId); break; case 1: PluginLogger.Debug("Giant chase player or spawn"); Networker.Instance.GiantChasePlayerOrSpawnServerRpc((int)playerWhoDrew.playerClientId); break; case 2: PluginLogger.Debug("Old bird chase player or spawn"); Networker.Instance.BirdChaseOrSpawnServerRpc((int)playerWhoDrew.playerClientId); break; case 3: PluginLogger.Debug("Worm chase player or spawn"); Networker.Instance.TeleportOrSpawnWormServerRpc((int)playerWhoDrew.playerClientId); break; } return "It's coming for you"; } public override string GetCardName() { return "Death"; } public DeathCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } } public class DevilCard : Card { [CompilerGenerated] private sealed class d__4 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerControllerB player; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__4(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(2.5f); <>1__state = 1; return true; case 1: <>1__state = -1; Networker.Instance.GhostBreatheServerRpc(((Component)player).transform.position); 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 override Material GetCardMaterial() { return Assets.Materials.CardDevilMat; } public override Material GetCardBurn() { return Assets.Materials.BurnRed; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) int num = Random.Range(0, 100); List list = new List(); for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { list.Add(i); } Helper.Shuffle(list); int num2 = 0; PlayerControllerB val; do { val = StartOfRound.Instance.allPlayerScripts[list[num2]]; num2++; } while (val.isPlayerDead || (!val.isPlayerControlled && num2 < list.Count)); if (val.isPlayerDead || !val.isPlayerControlled) { return "Error : No player to target"; } if (ConfigManager.DevilBlowChance.Value < num) { ((MonoBehaviour)val).StartCoroutine(WaitAndBlow(val)); } else { Vector3 position = ((Component)val).transform.position + ((Component)val).transform.forward * 5f; Networker.Instance.TeleportRandomEntityServerRpc(position, val.isInsideFactory); } return "A mysterious force is moving"; } public override string GetCardName() { return "The Devil"; } [IteratorStateMachine(typeof(d__4))] private static IEnumerator WaitAndBlow(PlayerControllerB player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__4(0) { player = player }; } public DevilCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } } public class FoolCard : Card { [CompilerGenerated] private sealed class d__7 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public FoolCard <>4__this; private Renderer 5__1; private Material 5__2; private Material 5__3; private Material 5__4; private float 5__5; private Material 5__6; private Material 5__7; private Material 5__8; private Material[] 5__9; private Vector3 5__10; private float 5__11; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; 5__4 = null; 5__6 = null; 5__7 = null; 5__8 = null; 5__9 = null; <>1__state = -2; } private bool MoveNext() { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Expected O, but got Unknown //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Expected O, but got Unknown //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.cardAudio.PlayOneShot(Assets.PullCardClips[Random.Range(0, Assets.PullCardClips.Count)]); 5__1 = <>4__this.cardPrefab.GetComponent(); <>2__current = (object)new WaitForSeconds(1.8f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__2 = 5__1.materials[0]; 5__3 = 5__1.materials[1]; 5__4 = 5__1.materials[2]; <>4__this.cardAudio.PlayOneShot(Assets.FoolCardSound); 5__5 = 0f; goto IL_01d9; case 2: <>1__state = -1; goto IL_01d9; case 3: <>1__state = -1; goto IL_02e1; case 4: <>1__state = -1; 5__2 = 5__1.materials[0]; 5__3 = 5__1.materials[1]; 5__4 = 5__1.materials[2]; 5__5 = 0f; goto IL_0451; case 5: <>1__state = -1; goto IL_0451; case 6: <>1__state = -1; 5__10 = <>4__this.cardPrefab.transform.localScale; 5__11 = 0f; break; case 7: { <>1__state = -1; break; } IL_0451: if (5__5 < 0.3f) { 5__1.materials[0].Lerp(5__2, <>4__this.GetCardBurn(), 5__5 / 0.3f); 5__1.materials[1].Lerp(5__3, <>4__this.GetCardBurn(), 5__5 / 0.3f); 5__1.materials[2].Lerp(5__4, <>4__this.GetCardBurn(), 5__5 / 0.3f); 5__5 += Time.deltaTime; <>2__current = null; <>1__state = 5; return true; } <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 6; return true; IL_02e1: if (5__5 < 0.15f) { 5__1.materials[0].Lerp(5__6, Assets.Materials.CardFoolMat, 5__5 / 0.3f); 5__1.materials[1].Lerp(5__7, 5__3, 5__5 / 0.3f); 5__1.materials[2].Lerp(5__8, 5__4, 5__5 / 0.3f); 5__5 += Time.deltaTime; <>2__current = null; <>1__state = 3; return true; } 5__9 = (Material[])(object)new Material[3] { Assets.Materials.CardFoolMat, 5__3, 5__4 }; 5__1.materials = 5__9; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 4; return true; IL_01d9: if (5__5 < 0.15f) { 5__1.materials[0].Lerp(5__2, <>4__this.GetCardBurn(), 5__5 / 0.3f); 5__1.materials[1].Lerp(5__3, <>4__this.GetCardBurn(), 5__5 / 0.3f); 5__1.materials[2].Lerp(5__4, <>4__this.GetCardBurn(), 5__5 / 0.3f); 5__5 += Time.deltaTime; <>2__current = null; <>1__state = 2; return true; } 5__6 = 5__1.materials[0]; 5__7 = 5__1.materials[1]; 5__8 = 5__1.materials[2]; 5__5 = 0f; goto IL_02e1; } if (5__11 < 0.3f) { <>4__this.cardPrefab.transform.localScale = 5__10 * (1f - Card.ControlCurve.Evaluate(5__11 / 0.3f)); 5__11 += Time.deltaTime; <>2__current = null; <>1__state = 7; return true; } <>4__this.cardPrefab.transform.localScale = Vector3.zero; 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 readonly Material[] allCardMat = (Material[])(object)new Material[9] { Assets.Materials.CardTowerMat, Assets.Materials.CardDeathMat, Assets.Materials.CardWheelMat, Assets.Materials.CardSunMat, Assets.Materials.CardMoonMat, Assets.Materials.CardDevilMat, Assets.Materials.CardHermitMat, Assets.Materials.CardPriestessMat, Assets.Materials.CardHangedMat }; private Material cardToMimic; public override void InitCard(Random random) { cardToMimic = allCardMat[random.Next(0, allCardMat.Length)]; base.InitCard(random); } public override Material GetCardMaterial() { return cardToMimic; } public override Material GetCardBurn() { return Assets.Materials.BurnPurple; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { return "You have been fooled!"; } public override string GetCardName() { return "The Fool"; } [IteratorStateMachine(typeof(d__7))] public override IEnumerator CardPullingCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__7(0) { <>4__this = this }; } public FoolCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } } public class HangedManCard : Card { public override Material GetCardMaterial() { return Assets.Materials.CardHangedMat; } public override Material GetCardBurn() { return Assets.Materials.BurnRed; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (!playerWhoDrew.isPlayerDead && playerWhoDrew.isPlayerControlled) { Networker.Instance.KillPlayerServerRpc((int)playerWhoDrew.playerClientId, new Vector3(0f, 1f, 0f), (CauseOfDeath)0); } return ""; } public override string GetCardName() { return "The Hanged Man"; } public HangedManCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } } public class HermitCard : Card { public override Material GetCardMaterial() { return Assets.Materials.CardHermitMat; } public override Material GetCardBurn() { return Assets.Materials.BurnAqua; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { //IL_0067: 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) //IL_0079: Unknown result type (might be due to invalid IL or missing references) if (Random.Range(0, 100) > ConfigManager.HermitTpChance.Value) { PluginLogger.Debug("Teleporting enemy away"); Networker.Instance.TeleportEnemyAwayServerRpc(); return "It seems like a mysterious force has moved some things away"; } PluginLogger.Debug("Teleporting player to random inside node"); Vector3 position = RoundManager.Instance.insideAINodes[Random.Range(0, RoundManager.Instance.insideAINodes.Length)].transform.position; Networker.Instance.TeleportPlayerServerRpc((int)playerWhoDrew.playerClientId, position); return "Where am I?"; } public override string GetCardName() { return "The Hermit"; } public HermitCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } } public class HighPriestessCard : Card { public override Material GetCardMaterial() { return Assets.Materials.CardPriestessMat; } public override Material GetCardBurn() { return Assets.Materials.BurnYellow; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { int num = -1; for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[i]; PluginLogger.Debug("Checking player " + val.playerUsername + " isPlayerControlled: " + val.isPlayerControlled + " isPlayerDead: " + val.isPlayerDead); if (val.isPlayerDead) { num = i; break; } } if (num != -1) { PluginLogger.Debug("Reviving player " + StartOfRound.Instance.allPlayerScripts[num].playerUsername); Networker.Instance.RevivePlayerServerRpc(num); return StartOfRound.Instance.allPlayerScripts[num].playerUsername + " is back from the dead"; } PluginLogger.Debug("No dead player found, allowing extra life"); Networker.Instance.AllowExtraLifeServerRpc(); return "Your team has been granted an extra life"; } public override string GetCardName() { return "The High Priestess"; } public HighPriestessCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } } public class MoonCard : Card { public override Material GetCardMaterial() { return Assets.Materials.CardMoonMat; } public override Material GetCardBurn() { return Assets.Materials.BurnWhite; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { int num = playerWhoDrew.ItemSlots.Count((GrabbableObject item) => Object.op_Implicit((Object)(object)item)); int num2 = Random.Range(0, 100); if (ConfigManager.SunHealOrDamageChance.Value < num2) { PluginLogger.Debug("Damaging player to 2 health"); if (!playerWhoDrew.isPlayerDead && playerWhoDrew.health > 2) { Networker.Instance.SetPlayerHealthServerRpc((int)playerWhoDrew.playerClientId, 2); } return "You feel weak"; } if (num > 2 && Random.Range(0, 4) != 0) { float multiplier = Random.Range(ConfigManager.MoonMinMultiplyRange.Value, ConfigManager.MoonMaxMultiplyRange.Value); PluginLogger.Debug("Multiplying inventory value by " + multiplier); Networker.Instance.MultiplyInventoryValueServerRpc((int)playerWhoDrew.playerClientId, multiplier); } else { float multiplier2 = Random.Range(ConfigManager.MoonMinMultiplyRange.Value, ConfigManager.MoonMaxMultiplyRange.Value); PluginLogger.Debug("Multiplying random scrap value by " + multiplier2); Networker.Instance.MultiplyRandomScrapValueServerRpc(multiplier2); } return "Somehow, it seems like some items are less valuable"; } public override string GetCardName() { return "The Moon"; } public MoonCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } } public class SunCard : Card { public override Material GetCardMaterial() { return Assets.Materials.CardSunMat; } public override Material GetCardBurn() { return Assets.Materials.BurnYellow; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { int num = playerWhoDrew.ItemSlots.Count((GrabbableObject item) => Object.op_Implicit((Object)(object)item)); int num2 = Random.Range(0, 100); if (ConfigManager.SunHealOrDamageChance.Value < num2) { PluginLogger.Debug("Healing player to 100 health"); if (!playerWhoDrew.isPlayerDead && playerWhoDrew.health < 100) { Networker.Instance.SetPlayerHealthServerRpc((int)playerWhoDrew.playerClientId, 100); } return "Refreshing !"; } if (num > 2 && Random.Range(0, 4) != 0) { float multiplier = Random.Range(ConfigManager.SunMinMultiplyRange.Value, ConfigManager.SunMaxMultiplyRange.Value); PluginLogger.Debug("Multiplying inventory value by " + multiplier); Networker.Instance.MultiplyInventoryValueServerRpc((int)playerWhoDrew.playerClientId, multiplier); } else { float multiplier2 = Random.Range(ConfigManager.SunMinMultiplyRange.Value, ConfigManager.SunMaxMultiplyRange.Value); PluginLogger.Debug("Multiplying random scrap value by " + multiplier2); Networker.Instance.MultiplyRandomScrapValueServerRpc(multiplier2); } return "Seems like some items are more valuable today"; } public override string GetCardName() { return "The Sun"; } public SunCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } } public class TowerCard : Card { private static readonly string[] messages = new string[6] { "I can feel a presence somewhere", "Is there a ghost fooling around ?", "It feels like I'm not alone", "What was that noise ?", "I think I saw something", "Something moved !" }; public override Material GetCardMaterial() { return Assets.Materials.CardTowerMat; } public override Material GetCardBurn() { return Assets.Materials.BurnBlue; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { int num = ConfigManager.TowerShipLeaveChance.Value + ConfigManager.TowerDoorsChance.Value + ConfigManager.TowerSecurityDoorsChance.Value + ConfigManager.TowerShipDoorChance.Value + ConfigManager.TowerBreakerChance.Value; int num2 = Random.Range(0, num); string result = messages[Random.Range(0, messages.Length)]; if (num2 <= ConfigManager.TowerShipLeaveChance.Value) { PluginLogger.Debug("Ship will leave early"); Networker.Instance.ShipLeaveEarlyServerRpc(); return result; } if (num2 <= ConfigManager.TowerShipLeaveChance.Value + ConfigManager.TowerSecurityDoorsChance.Value) { PluginLogger.Debug("Opening or closing random security doors"); TerminalAccessibleObject[] array = Object.FindObjectsOfType(); TerminalAccessibleObject[] array2 = array; foreach (TerminalAccessibleObject val in array2) { if (val.isBigDoor && Random.Range(0, 2) == 0) { val.SetDoorToggleLocalClient(); } } return result; } if (num2 <= ConfigManager.TowerShipLeaveChance.Value + ConfigManager.TowerSecurityDoorsChance.Value + ConfigManager.TowerDoorsChance.Value) { PluginLogger.Debug("Opening or closing rng doors"); Networker.Instance.OpenOrCloseRandomDoorServerRpc((int)playerWhoDrew.playerClientId); return result; } if (num2 <= ConfigManager.TowerShipLeaveChance.Value + ConfigManager.TowerSecurityDoorsChance.Value + ConfigManager.TowerDoorsChance.Value + ConfigManager.TowerShipDoorChance.Value) { PluginLogger.Debug("Inverting ship door state"); Networker.Instance.SetShipDoorStateServerRpc(StartOfRound.Instance.hangarDoorsClosed); return result; } if (ConfigManager.TowerBreakerChance.Value > 0) { PluginLogger.Debug("Turning off breaker"); Networker.Instance.BreakerOffServerRpc(); return result; } return "Nothing happened"; } public override string GetCardName() { return "The Tower"; } public TowerCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } } public class WheelCard : Card { private bool outcome; public override void InitCard(Random random) { outcome = random.Next(0, 2) == 0; base.InitCard(random); } public override Material GetCardMaterial() { return Assets.Materials.CardWheelMat; } public override Material GetCardBurn() { return outcome ? Assets.Materials.BurnGreen : Assets.Materials.BurnRed; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) float num = Random.Range(0f, 100f); if (outcome) { if (num <= (float)ConfigManager.WheelHealOrDamageChance.Value) { PluginLogger.Debug("Healing player"); Networker.Instance.SetPlayerHealthServerRpc((int)playerWhoDrew.playerClientId, Math.Min(playerWhoDrew.health + ConfigManager.WheelHealOrDamageValue.Value, 100)); return "Lucky - You've healed from your injuries"; } if (ConfigManager.WheelMultiplyValueChance.Value > 0) { float value = ConfigManager.WheelGoodMultiplyRange.Value; PluginLogger.Debug("Multiplying some scrap value by " + value); Networker.Instance.MultiplyRandomScrapValueServerRpc(value); return "Lucky - Stonks"; } } else { if (num <= (float)ConfigManager.WheelHealOrDamageChance.Value) { PluginLogger.Debug("Damaging player"); Networker.Instance.DamagePlayerServerRpc((int)playerWhoDrew.playerClientId, ConfigManager.WheelHealOrDamageValue.Value, default(Vector3), (CauseOfDeath)0); return "Unlucky - You've been hurt"; } if (ConfigManager.WheelMultiplyValueChance.Value > 0) { float value2 = ConfigManager.WheelBadMultiplyRange.Value; PluginLogger.Debug("Multiplying some scrap value by " + value2); Networker.Instance.MultiplyRandomScrapValueServerRpc(value2); return "Unlucky - The value of some items plummeted"; } } return "Nothing happened"; } public override string GetCardName() { return "The Wheel of Fortune"; } public WheelCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace LCTarrotCard.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }