Please disclose if your mod was created primarily using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of LCTarotCard v1.1.3
LCTarrotCard.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
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 <DelaySetGirlProperties>b__0() { return (Object)(object)((EnemyAI)dressGirl).agent != (Object)null; } } [CompilerGenerated] private sealed class <>c__DisplayClass44_0 { public FlowermanAI bracken; internal bool <SetBrackenProperties>b__0() { return (Object)(object)((EnemyAI)bracken).agent != (Object)null; } } [CompilerGenerated] private sealed class <>c__DisplayClass47_0 { public MouthDogAI dog; internal bool <SetDogProperties>b__0() { return (Object)(object)((EnemyAI)dog).agent != (Object)null; } } [CompilerGenerated] private sealed class <>c__DisplayClass57_0 { public EnemyAI enemy; internal bool <TeleportEnemyWhenReady>b__0() { return (Object)(object)enemy.agent != (Object)null; } } [CompilerGenerated] private sealed class <DelaySetGirlProperties>d__39 : IEnumerator<object>, 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<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DelaySetGirlProperties>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<bool>)(() => (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 <PopDelay>d__15 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public float delay; private List<EnemyAI>.Enumerator <>s__1; private EnemyAI <enemy>5__2; private JesterAI <jester>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <PopDelay>d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = default(List<EnemyAI>.Enumerator); <enemy>5__2 = null; <jester>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()) { <enemy>5__2 = <>s__1.Current; ref JesterAI reference = ref <jester>5__3; EnemyAI obj = <enemy>5__2; reference = (JesterAI)(object)((obj is JesterAI) ? obj : null); if (<jester>5__3 != null && !((EnemyAI)<jester>5__3).isEnemyDead) { ((EnemyAI)<jester>5__3).SwitchToBehaviourState(2); } <jester>5__3 = null; <enemy>5__2 = null; } } finally { ((IDisposable)<>s__1).Dispose(); } <>s__1 = default(List<EnemyAI>.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 <SetBrackenProperties>d__44 : IEnumerator<object>, 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<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <SetBrackenProperties>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<bool>)(() => (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 <SetDogProperties>d__47 : IEnumerator<object>, 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<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <SetDogProperties>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<bool>)(() => (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 <SetPlayerUI>d__41 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerControllerB player; public bool critical; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <SetPlayerUI>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 <TeleportEnemyWhenReady>d__57 : IEnumerator<object>, 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<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <TeleportEnemyWhenReady>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<bool>)(() => (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 <WaitAndSyncItemsValues>d__59 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public NetworkObjectReference[] items; public int[] values; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <WaitAndSyncItemsValues>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<CauseOfDeath>(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<CauseOfDeath>(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)); } } } [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<bool>(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<bool>(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<HangarShipDoor>(); 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<DoorLock>(); 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>(); 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<SpringManAI>(); 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<GameObject>(Helper.Enemies.SpringMan.enemyPrefab, position, Quaternion.identity); val3.GetComponentInChildren<NetworkObject>().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val3.GetComponent<SpringManAI>()); ((EnemyAI)val3.GetComponent<SpringManAI>()).SetEnemyOutside(false); ((EnemyAI)val3.GetComponent<SpringManAI>()).SwitchToBehaviourState(1); if (!SpringManAIPatch.ChasingSprings.Contains(((NetworkBehaviour)val3.GetComponent<SpringManAI>()).NetworkObjectId)) { SpringManAIPatch.ChasingSprings.Add(((NetworkBehaviour)val3.GetComponent<SpringManAI>()).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<float>(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<GameObject>(Helper.Enemies.Jester.enemyPrefab, position, Quaternion.identity); val4.GetComponentInChildren<NetworkObject>().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val4.GetComponent<JesterAI>()); ((EnemyAI)val4.GetComponent<JesterAI>()).SetEnemyOutside(false); ((EnemyAI)val4.GetComponent<JesterAI>()).SwitchToBehaviourState(1); } ((MonoBehaviour)this).StartCoroutine(PopDelay(popDelay)); } [IteratorStateMachine(typeof(<PopDelay>d__15))] private static IEnumerator PopDelay(float delay) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <PopDelay>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<GameObject>(Helper.Enemies.ForestGiant.enemyPrefab, position, Quaternion.identity); val3.GetComponentInChildren<NetworkObject>().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val3.GetComponent<ForestGiantAI>()); ((EnemyAI)val3.GetComponent<ForestGiantAI>()).SetEnemyOutside(true); } else { PluginLogger.Debug("Spawn dog"); GameObject val4 = Object.Instantiate<GameObject>(Helper.Enemies.MouthDog.enemyPrefab, position, Quaternion.identity); val4.GetComponentInChildren<NetworkObject>().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val4.GetComponent<MouthDogAI>()); ((EnemyAI)val4.GetComponent<MouthDogAI>()).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<bool>(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<EnemyAI> spawnedEnemies = RoundManager.Instance.SpawnedEnemies; Helper.Shuffle(spawnedEnemies); using IEnumerator<EnemyAI> 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<EnemyAI> spawnedEnemies = RoundManager.Instance.SpawnedEnemies; foreach (EnemyAI item in spawnedEnemies) { Vector3 position = item.ChooseFarthestNodeFromPosition(((Component)item).transform.position, false, 0, false, 50, false).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<bool>(ref inside, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(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<bool>(ref inside, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(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<AudioReverbPresets>())) { if (val3.isInsideFactory) { Object.FindObjectOfType<AudioReverbPresets>().audioPresets[2].ChangeAudioReverbForPlayer(val3); } else { Object.FindObjectOfType<AudioReverbPresets>().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<CauseOfDeath>(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<CauseOfDeath>(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<float>(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<float>(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<float>(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<float>(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>(); 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) 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<OccludeAudio>().overridingLowPass = false; } RagdollGrabbableObject[] array = Object.FindObjectsOfType<RagdollGrabbableObject>(); 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); } } DeadBodyInfo[] array3 = Object.FindObjectsOfType<DeadBodyInfo>(); 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<bool>(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<GameObject>(Helper.Enemies.DressGirl.enemyPrefab, position, Quaternion.identity); val5.GetComponentInChildren<NetworkObject>().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val5.GetComponent<DressGirlAI>()); ((EnemyAI)val5.GetComponent<DressGirlAI>()).SetEnemyOutside(false); val3 = val5.GetComponent<DressGirlAI>(); } val3.hauntingPlayer = StartOfRound.Instance.allPlayerScripts[playerId]; ((MonoBehaviour)this).StartCoroutine(DelaySetGirlProperties(playerId, val3)); } [IteratorStateMachine(typeof(<DelaySetGirlProperties>d__39))] private IEnumerator DelaySetGirlProperties(int playerId, DressGirlAI dressGirl) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <DelaySetGirlProperties>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<EnemyAI>)RoundManager.Instance.SpawnedEnemies).FirstOrDefault((Func<EnemyAI, bool>)((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); ((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(<SetPlayerUI>d__41))] private static IEnumerator SetPlayerUI(PlayerControllerB player, bool critical = false) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <SetPlayerUI>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<GameObject>(Helper.Enemies.FlowerMan.enemyPrefab, position, Quaternion.identity); val5.GetComponentInChildren<NetworkObject>().Spawn(true); RoundManager.Instance.SpawnedEnemies.Add((EnemyAI)(object)val5.GetComponent<FlowermanAI>()); ((EnemyAI)val5.GetComponent<FlowermanAI>()).SetEnemyOutside(false); val3 = val5.GetComponent<FlowermanAI>(); ((EnemyAI)val3).SyncPositionToClients(); } SyncBrackenPropertiesClientRpc(playerId, ((NetworkBehaviour)val3).NetworkObjectId); }