Please disclose if any significant portion of your mod was created 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 KarmaOne v2.0.2
KarmaOne.dll
Decompiled 2 weeks agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using KarmaOne.Behaviours; using KarmaOne.NetcodePatcher; using LethalLib.Modules; using Microsoft.CodeAnalysis; using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("KarmaOne")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("KarmaOne")] [assembly: AssemblyTitle("KarmaOne")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace KarmaOne { public static class KarmaConfig { public static ConfigEntry<bool> Purchasable { get; private set; } public static ConfigEntry<int> Price { get; private set; } public static ConfigEntry<int> Damage { get; private set; } public static ConfigEntry<int> UsesPerCharge { get; private set; } public static ConfigEntry<float> ShotCooldown { get; private set; } public static ConfigEntry<float> ChargeTime { get; private set; } public static ConfigEntry<float> FireWindow { get; private set; } public static ConfigEntry<bool> OverchargeEnabled { get; private set; } public static ConfigEntry<float> RegenInterval { get; private set; } public static ConfigEntry<int> RegenAmount { get; private set; } public static ConfigEntry<float> WeightLbs { get; private set; } internal static void Init(ConfigFile cfg) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Expected O, but got Unknown //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Expected O, but got Unknown //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Expected O, but got Unknown Purchasable = cfg.Bind<bool>("Shop", "Purchasable", true, "If true, the Karma-1 appears in the terminal shop."); Price = cfg.Bind<int>("Shop", "Price", 700, new ConfigDescription("Shop price in credits.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>())); Damage = cfg.Bind<int>("Combat", "Damage", 100, new ConfigDescription("Damage dealt per shot to players and enemies. Players have 100 HP by default, so 100 is a one-shot.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 1000), Array.Empty<object>())); UsesPerCharge = cfg.Bind<int>("Combat", "UsesPerCharge", 2, new ConfigDescription("Number of full shots available per battery charge. Each shot drains (1 / UsesPerCharge) of the battery.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), Array.Empty<object>())); ShotCooldown = cfg.Bind<float>("Combat", "ShotCooldown", 5f, new ConfigDescription("Seconds the gun must cool down after firing before it can be charged again.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 60f), Array.Empty<object>())); ChargeTime = cfg.Bind<float>("Charging", "ChargeTime", 2f, new ConfigDescription("Seconds of holding [Use] before the scope turns green and the gun enters the fire window. Lower = faster to charge.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 30f), Array.Empty<object>())); FireWindow = cfg.Bind<float>("Charging", "FireWindow", 0.9f, new ConfigDescription("Seconds the gun stays in the green fire window after reaching ChargeTime. Release [Use] during this time to fire. Only relevant when OverchargeEnabled = true — if overcharge is off, this value is unused and the window lasts indefinitely.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 30f), Array.Empty<object>())); OverchargeEnabled = cfg.Bind<bool>("Overcharge", "OverchargeEnabled", true, "If true, holding past the fire window causes an overcharge explosion: VFX/SFX play, the holder takes Damage, and the battery is fully drained (gun enters cooldown but does NOT break). If false, the gun stays in the fire window indefinitely with no penalty."); RegenInterval = cfg.Bind<float>("Battery", "RegenInterval", 30f, new ConfigDescription("Seconds between each passive battery regen tick. Set to 0 to disable passive regen entirely.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 600f), Array.Empty<object>())); RegenAmount = cfg.Bind<int>("Battery", "RegenAmount", 10, new ConfigDescription("Percentage of battery restored per regen tick (1–100). Default 10 means 10% every RegenInterval seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 100), Array.Empty<object>())); WeightLbs = cfg.Bind<float>("Physical", "WeightLbs", 31.5f, new ConfigDescription("Weight of the gun in lbs, shown on the HUD when held. Original value from the mod was 31.5 lbs. Vanilla reference: Shotgun = 19 lbs, Jetpack = 52 lbs.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 200f), Array.Empty<object>())); } } [BepInPlugin("karmaone.karma1", "KarmaOne", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public const string ModGUID = "karmaone.karma1"; public const string ModName = "KarmaOne"; public const string ModVersion = "1.0.0"; internal static ManualLogSource Log; private readonly Harmony harmony = new Harmony("karmaone.karma1"); private void Awake() { //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; Log.LogInfo((object)"KarmaOne 1.0.0 loading..."); KarmaConfig.Init(((BaseUnityPlugin)this).Config); AssetBundle val = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "moreitems")); if ((Object)(object)val == (Object)null) { Log.LogError((object)"Failed to load asset bundle 'moreitems'. Make sure the 'moreitems' file is next to KarmaOne.dll."); return; } Item val2 = val.LoadAsset<Item>("assets/karma/karmaitem.asset"); if ((Object)(object)val2 == (Object)null) { Log.LogError((object)"Failed to load KarmaItem from bundle."); return; } Log.LogInfo((object)("Loaded item: '" + val2.itemName + "'")); val2.weight = KarmaConfig.WeightLbs.Value / 105f + 1f; Log.LogInfo((object)($"Weight set to {KarmaConfig.WeightLbs.Value} lbs " + $"(internal: {val2.weight:F4})")); GameObject spawnPrefab = val2.spawnPrefab; if ((Object)(object)spawnPrefab == (Object)null) { Log.LogError((object)"KarmaItem has no spawnPrefab assigned."); return; } KarmaBehaviour component = spawnPrefab.GetComponent<KarmaBehaviour>(); if ((Object)(object)component != (Object)null) { Object.DestroyImmediate((Object)(object)component); } spawnPrefab.AddComponent<KarmaBehaviour>(); KarmaBehaviour component2 = spawnPrefab.GetComponent<KarmaBehaviour>(); ((GrabbableObject)component2).itemProperties = val2; if (val2.toolTips != null && val2.toolTips.Length != 0) { string[] array = new string[val2.toolTips.Length + 1]; Array.Copy(val2.toolTips, array, val2.toolTips.Length); array[^1] = "Toggle laser: [Q]"; val2.toolTips = array; } else { val2.toolTips = new string[1] { "Toggle laser: [Q]" }; } ((GrabbableObject)component2).grabbable = true; ((GrabbableObject)component2).grabbableToEnemies = true; SkinnedMeshRenderer[] componentsInChildren = spawnPrefab.GetComponentsInChildren<SkinnedMeshRenderer>(true); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].bones = null; } Renderer[] componentsInChildren2 = spawnPrefab.GetComponentsInChildren<Renderer>(true); for (int i = 0; i < componentsInChildren2.Length; i++) { componentsInChildren2[i].motionVectorGenerationMode = (MotionVectorGenerationMode)2; } MeshRenderer componentInChildren = spawnPrefab.GetComponentInChildren<MeshRenderer>(); if (componentInChildren != null) { ((GrabbableObject)component2).mainObjectRenderer = componentInChildren; } else { Log.LogWarning((object)"No MeshRenderer found — FallWithCurve may skip animations."); } ((GrabbableObject)component2).insertedBattery = new Battery(false, 1f); Utilities.FixMixerGroups(spawnPrefab); if ((Object)(object)spawnPrefab.GetComponent<NetworkObject>() == (Object)null) { spawnPrefab.AddComponent<NetworkObject>(); } NetworkPrefabs.RegisterNetworkPrefab(spawnPrefab); if (KarmaConfig.Purchasable.Value) { TerminalNode val3 = val.LoadAsset<TerminalNode>("BuyNode"); Items.RegisterShopItem(val2, (TerminalNode)null, (TerminalNode)null, val3, KarmaConfig.Price.Value); Log.LogInfo((object)$"Karma-1 registered in shop for {KarmaConfig.Price.Value} credits."); } if (!KarmaConfig.Purchasable.Value) { Log.LogWarning((object)"Karma-1: Purchasable is disabled — the item will not appear in the shop."); } harmony.PatchAll(typeof(Plugin).Assembly); Log.LogInfo((object)"KarmaOne loaded successfully."); } } public static class PluginInfo { public const string PLUGIN_GUID = "KarmaOne"; public const string PLUGIN_NAME = "KarmaOne"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace KarmaOne.Behaviours { public class KarmaBehaviour : GrabbableObject { private readonly string[] sources = new string[8] { "ChargeSFX", "ShootSFX", "TrailSFX", "WarningSFX", "ExplosionSFX", "CooldownSFX", "CoolupSFX", "OnCdShotSFX" }; private Dictionary<string, AudioSource> sourcesDict = new Dictionary<string, AudioSource>(); private readonly string[] ps = new string[4] { "MuzzleFlash", "Trail", "LingeringFire", "MainBlast" }; private Dictionary<string, ParticleSystem> psDict = new Dictionary<string, ParticleSystem>(); private Color readyColor = Color32.op_Implicit(new Color32((byte)20, (byte)20, (byte)20, byte.MaxValue)); private Color shootColor = Color32.op_Implicit(new Color32((byte)20, (byte)200, (byte)20, byte.MaxValue)); private Color dangerColor = Color32.op_Implicit(new Color32((byte)200, (byte)20, (byte)20, byte.MaxValue)); private Color unreadyColor = Color32.op_Implicit(new Color32((byte)250, (byte)100, (byte)0, byte.MaxValue)); private bool coolingDown; private bool broken; private bool charging; private bool activated; private bool shoot; private bool startedRegen; private float cooldown = 5f; private float timeSinceShot; private float maxChargeBeforeShooting = 2f; private float maxChargeBeforeExplode = 2.9f; private float chargeTime; private float energyLostPerShot = 0.5f; private bool laserEnabled = true; private GameObject? ScopeChargeTimer; private GameObject? laserLight; private bool initialised; private void InitComponents() { if (initialised) { return; } initialised = true; sourcesDict = GetAllAudioSources(((Component)this).gameObject, "KarmaSFX", sources); AudioClip clip = AudioClip.Create("Silence", 1, 1, 44100, false); foreach (AudioSource value in sourcesDict.Values) { if ((Object)(object)value != (Object)null && (Object)(object)value.clip == (Object)null) { value.clip = clip; } } SkinnedMeshRenderer[] componentsInChildren = ((Component)this).GetComponentsInChildren<SkinnedMeshRenderer>(true); foreach (SkinnedMeshRenderer obj in componentsInChildren) { obj.rootBone = null; obj.bones = null; } Renderer[] componentsInChildren2 = ((Component)this).GetComponentsInChildren<Renderer>(true); for (int i = 0; i < componentsInChildren2.Length; i++) { componentsInChildren2[i].motionVectorGenerationMode = (MotionVectorGenerationMode)2; } Rigidbody component = ((Component)this).GetComponent<Rigidbody>(); if ((Object)(object)component != (Object)null && (Object)(object)base.playerHeldBy == (Object)null) { component.isKinematic = true; } psDict = GetAllParticleSystems(((Component)this).gameObject, "KarmaParticles", ps); Transform obj2 = ((Component)this).gameObject.transform.Find("ScopeChargeTimer"); ScopeChargeTimer = ((obj2 != null) ? ((Component)obj2).gameObject : null); Transform obj3 = ((Component)this).gameObject.transform.Find("laserLight"); laserLight = ((obj3 != null) ? ((Component)obj3).gameObject : null); energyLostPerShot = 1f / (float)Mathf.Max(1, KarmaConfig.UsesPerCharge.Value); cooldown = KarmaConfig.ShotCooldown.Value; maxChargeBeforeShooting = KarmaConfig.ChargeTime.Value; maxChargeBeforeExplode = KarmaConfig.ChargeTime.Value + KarmaConfig.FireWindow.Value; } public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); try { InitComponents(); ((MonoBehaviour)this).StartCoroutine(DelayedIgnorePlayerCollision()); if (!startedRegen) { startedRegen = true; ((MonoBehaviour)this).StartCoroutine(RegenBattery()); } } catch (Exception arg) { Debug.LogError((object)$"[KarmaOne] OnNetworkSpawn error: {arg}"); } } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); Renderer[] componentsInChildren = ((Component)this).GetComponentsInChildren<Renderer>(true); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].enabled = false; } activated = false; StopChargingServerRpc(wasShot: false); SetLaserEnabledServerRpc(enabled: false); MakeRigidbodyKinematic(); } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); Renderer[] componentsInChildren = ((Component)this).GetComponentsInChildren<Renderer>(true); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].enabled = true; } SetLaserEnabledServerRpc(laserEnabled); MakeRigidbodyKinematic(); } public override void OnHitGround() { ((GrabbableObject)this).OnHitGround(); StopChargingServerRpc(wasShot: false); activated = false; if (!coolingDown && base.insertedBattery.charge > energyLostPerShot && !broken && IsLocalPlayerHosting() && Random.Range(1, 20) == 1) { base.insertedBattery.charge = Mathf.Max(0f, base.insertedBattery.charge - energyLostPerShot); ShootServerRpc(isMisfire: true); } } public override void ItemActivate(bool used, bool buttonDown) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if ((Object)(object)base.playerHeldBy == (Object)null || base.isPocketed || !base.wasOwnerLastFrame || broken) { return; } if (buttonDown) { if (!coolingDown && base.insertedBattery.charge > 0f) { activated = true; } else { PlaySafe("OnCdShotSFX"); } } else { activated = false; } } public override void ChargeBatteries() { ((GrabbableObject)this).ChargeBatteries(); RepairServerRpc(); } public override void Update() { //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) SkinnedMeshRenderer[] componentsInChildren = ((Component)this).GetComponentsInChildren<SkinnedMeshRenderer>(true); foreach (SkinnedMeshRenderer val in componentsInChildren) { if (val.bones != null && val.bones.Length != 0) { val.bones = null; } } ((GrabbableObject)this).Update(); if ((Object)(object)base.playerHeldBy != (Object)null && !base.isPocketed) { Rigidbody component = ((Component)this).GetComponent<Rigidbody>(); if ((Object)(object)component != (Object)null && !component.isKinematic) { component.isKinematic = true; } } if (!initialised || broken) { return; } if (base.wasOwnerLastFrame && (Object)(object)base.playerHeldBy != (Object)null && !base.isPocketed && ((ButtonControl)Keyboard.current.qKey).wasPressedThisFrame) { laserEnabled = !laserEnabled; SetLaserEnabledServerRpc(laserEnabled); } if (laserEnabled && (Object)(object)base.playerHeldBy != (Object)null && !base.isPocketed && ((NetworkBehaviour)this).IsOwner && (Object)(object)laserLight != (Object)null) { Camera val2 = base.playerHeldBy?.gameplayCamera; if ((Object)(object)val2 != (Object)null) { laserLight.transform.rotation = ((Component)val2).transform.rotation; } } if (coolingDown) { if (base.wasOwnerLastFrame || IsLocalPlayerHosting()) { timeSinceShot += Time.deltaTime; if (timeSinceShot > cooldown) { ResetCooldownServerRpc(); } } return; } if (!base.wasOwnerLastFrame) { return; } if (activated) { shoot = false; StartChargingServerRpc(); if (KarmaConfig.OverchargeEnabled.Value && chargeTime > maxChargeBeforeExplode) { ExplodeServerRpc(); return; } chargeTime += Time.deltaTime; if (KarmaConfig.OverchargeEnabled.Value && chargeTime > maxChargeBeforeShooting && (Object)(object)ScopeChargeTimer != (Object)null && (chargeTime - maxChargeBeforeShooting) / (maxChargeBeforeExplode - maxChargeBeforeShooting) > 0.6f) { SetScopeColor(dangerColor); } return; } bool num; if (!KarmaConfig.OverchargeEnabled.Value) { num = chargeTime >= maxChargeBeforeShooting; } else { if (!(chargeTime >= maxChargeBeforeShooting)) { goto IL_0492; } num = chargeTime <= maxChargeBeforeExplode; } if (num && (Object)(object)base.playerHeldBy != (Object)null) { StopChargingServerRpc(wasShot: true); if (shoot) { return; } shoot = true; try { PlaySafe("ShootSFX"); PlayDelayedSafe("TrailSFX", 0.1f); PlayParticleSafe("MuzzleFlash"); PlayParticleSafe("Trail"); Camera val3 = base.playerHeldBy?.gameplayCamera; if ((Object)(object)val3 != (Object)null) { Vector3 position = ((Component)val3).transform.position; Vector3 forward = ((Component)val3).transform.forward; int mask = LayerMask.GetMask(new string[2] { "Player", "Enemies" }); RaycastHit val4 = default(RaycastHit); if (Physics.Raycast(position, forward, ref val4, float.PositiveInfinity, mask)) { int value = KarmaConfig.Damage.Value; PlayerControllerB component2 = ((Component)((RaycastHit)(ref val4)).collider).GetComponent<PlayerControllerB>(); if ((Object)(object)component2 != (Object)null && (Object)(object)component2 != (Object)(object)base.playerHeldBy) { component2.DamagePlayerFromOtherClientServerRpc(value, forward, (int)base.playerHeldBy.playerClientId); } EnemyAI component3 = ((Component)((Component)((RaycastHit)(ref val4)).collider).transform.root).GetComponent<EnemyAI>(); if ((Object)(object)component3 != (Object)null) { if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost) { component3.HitEnemy(value, base.playerHeldBy, true, -1); } else { DamageEnemyServerRpc(((NetworkBehaviour)component3).NetworkObjectId, value); } } } int mask2 = LayerMask.GetMask(new string[3] { "Player", "Enemies", "Room" }); RaycastHit val5 = default(RaycastHit); Vector3 end = (Physics.Raycast(position, forward, ref val5, float.PositiveInfinity, mask2) ? ((RaycastHit)(ref val5)).point : (position + forward * 200f)); ParticleSystem value2; Vector3 start = (psDict.TryGetValue("Trail", out value2) ? ((Component)value2).transform.position : ((Component)this).transform.position); SpawnBulletTracer(start, end); } ShootServerRpc(isMisfire: false); return; } catch (Exception arg) { Debug.LogError((object)$"[KarmaOne] Fire error: {arg}"); return; } } goto IL_0492; IL_0492: StopChargingServerRpc(wasShot: false); } private void LateUpdate() { if (!((Object)(object)base.playerHeldBy == (Object)null) && !base.isPocketed) { Transform localItemHolder = base.playerHeldBy.localItemHolder; if ((Object)(object)localItemHolder != (Object)null && (Object)(object)((Component)this).transform.parent != (Object)(object)localItemHolder) { ((Component)this).transform.SetParent(localItemHolder, true); } } } private void OnWillRenderObject() { } private IEnumerator RegenBattery() { if (KarmaConfig.RegenInterval.Value <= 0f) { yield break; } float amount = (float)KarmaConfig.RegenAmount.Value / 100f; while (true) { yield return (object)new WaitForSeconds(KarmaConfig.RegenInterval.Value); if (IsLocalOwner() && base.insertedBattery.charge < 1f) { base.insertedBattery.charge = Mathf.Min(base.insertedBattery.charge + amount, 1f); } } } [ServerRpc(RequireOwnership = false)] public void ShootServerRpc(bool isMisfire) { //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4158919052u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref isMisfire, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4158919052u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; coolingDown = true; SetCoolingDownClientRpc(value: true); ShootClientRpc(); } } } [ServerRpc(RequireOwnership = false)] public void DamageEnemyServerRpc(ulong enemyNetId, int damage) { //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2126134327u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, enemyNetId); BytePacker.WriteValueBitPacked(val, damage); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2126134327u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(enemyNetId, out var value)) { EnemyAI component = ((Component)value).GetComponent<EnemyAI>(); if ((Object)(object)component != (Object)null) { component.HitEnemy(damage, base.playerHeldBy, true, -1); } } } [ClientRpc] public void ShootClientRpc() { //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_0140: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3959243505u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3959243505u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!IsLocalOwner()) { PlaySafe("ShootSFX"); PlayDelayedSafe("TrailSFX", 0.1f); PlayParticleSafe("MuzzleFlash"); PlayParticleSafe("Trail"); } if (IsLocalOwner()) { base.insertedBattery.charge = Mathf.Max(0f, base.insertedBattery.charge - energyLostPerShot); } PlayDelayedSafe("CooldownSFX", 0.35f); SetScopeColor(unreadyColor); if (IsLocalOwner() && (Object)(object)HUDManager.Instance != (Object)null) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } shoot = false; } } [ServerRpc(RequireOwnership = false)] public void StartChargingServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1139426808u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1139426808u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StartChargingClientRpc(); } } } [ClientRpc] public void StartChargingClientRpc() { //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_00f0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3735873320u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3735873320u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!charging) { charging = true; PlaySafe("ChargeSFX"); } if (chargeTime > maxChargeBeforeShooting) { SetScopeColor(shootColor); } } } [ServerRpc(RequireOwnership = false)] public void StopChargingServerRpc(bool wasShot) { //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1666952511u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref wasShot, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1666952511u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StopChargingClientRpc(wasShot); } } } [ClientRpc] public void StopChargingClientRpc(bool wasShot) { //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_010c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3160830933u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref wasShot, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3160830933u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (charging) { charging = false; chargeTime = 0f; StopSafe("ChargeSFX"); if (!wasShot) { SetScopeColor(readyColor); } } } [ServerRpc(RequireOwnership = false)] public void ResetCooldownServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3562104048u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3562104048u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; coolingDown = false; SetCoolingDownClientRpc(value: false); ResetCooldownClientRpc(); } } } [ClientRpc] public void ResetCooldownClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3702522798u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3702522798u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; timeSinceShot = 0f; PlaySafe("CoolupSFX"); } } } [ServerRpc(RequireOwnership = false)] public void ExplodeServerRpc() { //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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2234755725u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2234755725u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; coolingDown = true; SetCoolingDownClientRpc(value: true); Vector3 val3 = (((Object)(object)base.playerHeldBy != (Object)null) ? ((Component)base.playerHeldBy).transform.position : ((Component)this).transform.position); int value = KarmaConfig.Damage.Value; int mask = LayerMask.GetMask(new string[2] { "Player", "Enemies" }); Collider[] array = Physics.OverlapSphere(val3, 10f, mask); foreach (Collider val4 in array) { PlayerControllerB component = ((Component)val4).GetComponent<PlayerControllerB>(); if ((Object)(object)component != (Object)null) { component.DamagePlayer(value, true, true, (CauseOfDeath)3, 0, false, Vector3.up); continue; } EnemyAI component2 = ((Component)((Component)val4).transform.root).GetComponent<EnemyAI>(); if ((Object)(object)component2 != (Object)null) { component2.HitEnemy(value, base.playerHeldBy, true, -1); } } ExplodeClientRpc(); } [ClientRpc] public void ExplodeClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3815608759u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3815608759u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayParticleSafe("LingeringFire"); PlayParticleSafe("MainBlast"); PlaySafe("ExplosionSFX"); activated = false; chargeTime = 0f; if (IsLocalOwner()) { base.insertedBattery.charge = 0f; } } } [ServerRpc(RequireOwnership = false)] public void RepairServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2374597506u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2374597506u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetBrokenServerRpc(value: false); RepairClientRpc(); } } } [ClientRpc] public void RepairClientRpc() { //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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1368960985u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1368960985u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetScopeColor(coolingDown ? unreadyColor : readyColor); } } } [ServerRpc(RequireOwnership = false)] public void SetCoolingDownServerRpc(bool value) { //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1947983455u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1947983455u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetCoolingDownClientRpc(value); } } } [ClientRpc] public void SetCoolingDownClientRpc(bool value) { //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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1318879723u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1318879723u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; coolingDown = value; SetScopeColor(coolingDown ? unreadyColor : readyColor); } } } [ServerRpc(RequireOwnership = false)] public void SetBrokenServerRpc(bool value) { //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1759257859u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1759257859u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetBrokenClientRpc(value); } } } [ClientRpc] public void SetBrokenClientRpc(bool value) { //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1854064234u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1854064234u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; broken = value; } } } [ServerRpc(RequireOwnership = false)] public void SetLaserEnabledServerRpc(bool enabled) { //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1961934554u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref enabled, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1961934554u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetLaserEnabledClientRpc(enabled); } } } [ClientRpc] public void SetLaserEnabledClientRpc(bool enabled) { //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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2957210982u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref enabled, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2957210982u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)laserLight != (Object)null) { laserLight.GetComponent<Behaviour>().enabled = enabled; } } } private static bool IsLocalPlayerHosting() { if ((Object)(object)NetworkManager.Singleton != (Object)null) { if (!NetworkManager.Singleton.IsHost) { return NetworkManager.Singleton.IsServer; } return true; } return false; } private bool IsLocalOwner() { if ((Object)(object)base.playerHeldBy != (Object)null) { return base.playerHeldBy.playerClientId == GameNetworkManager.Instance?.localPlayerController?.playerClientId; } return false; } private void IgnorePlayerCollision() { PlayerControllerB val = GameNetworkManager.Instance?.localPlayerController; if ((Object)(object)val == (Object)null) { return; } Collider[] componentsInChildren = ((Component)this).GetComponentsInChildren<Collider>(true); Collider[] componentsInChildren2 = ((Component)val).GetComponentsInChildren<Collider>(true); Collider[] array = componentsInChildren; foreach (Collider val2 in array) { if ((Object)(object)val2 == (Object)null) { continue; } Collider[] array2 = componentsInChildren2; foreach (Collider val3 in array2) { if (!((Object)(object)val3 == (Object)null)) { Physics.IgnoreCollision(val2, val3, true); } } } } private IEnumerator DelayedIgnorePlayerCollision() { yield return null; IgnorePlayerCollision(); } private void MakeRigidbodyKinematic() { Rigidbody component = ((Component)this).GetComponent<Rigidbody>(); if ((Object)(object)component != (Object)null) { component.isKinematic = true; } } private void DisableColliders() { Collider[] componentsInChildren = ((Component)this).GetComponentsInChildren<Collider>(true); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].enabled = false; } } private void SetScopeColor(Color c) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)ScopeChargeTimer == (Object)null)) { Renderer component = ScopeChargeTimer.GetComponent<Renderer>(); if ((Object)(object)component != (Object)null) { component.material.color = c; } } } private void PlaySafe(string key) { if (sourcesDict.TryGetValue(key, out AudioSource value) && (Object)(object)value.clip != (Object)null) { value.Play(); } } private void PlayDelayedSafe(string key, float delay) { if (sourcesDict.TryGetValue(key, out AudioSource value) && (Object)(object)value.clip != (Object)null) { value.PlayDelayed(delay); } } private void StopSafe(string key) { if (sourcesDict.TryGetValue(key, out AudioSource value)) { value.Stop(); } } private void PlayParticleSafe(string key) { if (psDict.TryGetValue(key, out ParticleSystem value)) { value.Play(); } } private void SpawnBulletTracer(Vector3 start, Vector3 end, float duration = 0.15f) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("BulletTracer"); val.transform.position = start; LineRenderer val2 = val.AddComponent<LineRenderer>(); val2.positionCount = 2; val2.SetPosition(0, start); val2.SetPosition(1, end); val2.startWidth = 0.03f; val2.endWidth = 0.005f; Color val3 = default(Color); ((Color)(ref val3))..ctor(1f, 0.9f, 0.4f, 1f); val2.startColor = val3; val2.endColor = val3; ((MonoBehaviour)this).StartCoroutine(FadeTracer(val, val2, duration)); } private IEnumerator FadeTracer(GameObject go, LineRenderer lr, float duration) { float elapsed = 0f; Color start = lr.startColor; while (elapsed < duration) { float num = elapsed / duration; lr.startColor = new Color(start.r, start.g, start.b, 1f - num); lr.endColor = new Color(start.r, start.g, start.b, 1f - num); elapsed += Time.deltaTime; yield return null; } Object.Destroy((Object)(object)go); } private static Dictionary<string, AudioSource> GetAllAudioSources(GameObject root, string containerName, string[] keys) { Dictionary<string, AudioSource> dictionary = new Dictionary<string, AudioSource>(); Transform val = root.transform.Find(containerName); if ((Object)(object)val == (Object)null) { return dictionary; } foreach (string text in keys) { Transform val2 = val.Find(text); if ((Object)(object)val2 != (Object)null) { AudioSource component = ((Component)val2).GetComponent<AudioSource>(); if ((Object)(object)component != (Object)null) { dictionary[text] = component; } } } return dictionary; } private static Dictionary<string, ParticleSystem> GetAllParticleSystems(GameObject root, string containerName, string[] keys) { Dictionary<string, ParticleSystem> dictionary = new Dictionary<string, ParticleSystem>(); Transform val = root.transform.Find(containerName); if ((Object)(object)val == (Object)null) { return dictionary; } foreach (string text in keys) { Transform val2 = val.Find(text); if ((Object)(object)val2 != (Object)null) { ParticleSystem component = ((Component)val2).GetComponent<ParticleSystem>(); if ((Object)(object)component != (Object)null) { dictionary[text] = component; } } } return dictionary; } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(4158919052u, new RpcReceiveHandler(__rpc_handler_4158919052), "ShootServerRpc"); ((NetworkBehaviour)this).__registerRpc(2126134327u, new RpcReceiveHandler(__rpc_handler_2126134327), "DamageEnemyServerRpc"); ((NetworkBehaviour)this).__registerRpc(3959243505u, new RpcReceiveHandler(__rpc_handler_3959243505), "ShootClientRpc"); ((NetworkBehaviour)this).__registerRpc(1139426808u, new RpcReceiveHandler(__rpc_handler_1139426808), "StartChargingServerRpc"); ((NetworkBehaviour)this).__registerRpc(3735873320u, new RpcReceiveHandler(__rpc_handler_3735873320), "StartChargingClientRpc"); ((NetworkBehaviour)this).__registerRpc(1666952511u, new RpcReceiveHandler(__rpc_handler_1666952511), "StopChargingServerRpc"); ((NetworkBehaviour)this).__registerRpc(3160830933u, new RpcReceiveHandler(__rpc_handler_3160830933), "StopChargingClientRpc"); ((NetworkBehaviour)this).__registerRpc(3562104048u, new RpcReceiveHandler(__rpc_handler_3562104048), "ResetCooldownServerRpc"); ((NetworkBehaviour)this).__registerRpc(3702522798u, new RpcReceiveHandler(__rpc_handler_3702522798), "ResetCooldownClientRpc"); ((NetworkBehaviour)this).__registerRpc(2234755725u, new RpcReceiveHandler(__rpc_handler_2234755725), "ExplodeServerRpc"); ((NetworkBehaviour)this).__registerRpc(3815608759u, new RpcReceiveHandler(__rpc_handler_3815608759), "ExplodeClientRpc"); ((NetworkBehaviour)this).__registerRpc(2374597506u, new RpcReceiveHandler(__rpc_handler_2374597506), "RepairServerRpc"); ((NetworkBehaviour)this).__registerRpc(1368960985u, new RpcReceiveHandler(__rpc_handler_1368960985), "RepairClientRpc"); ((NetworkBehaviour)this).__registerRpc(1947983455u, new RpcReceiveHandler(__rpc_handler_1947983455), "SetCoolingDownServerRpc"); ((NetworkBehaviour)this).__registerRpc(1318879723u, new RpcReceiveHandler(__rpc_handler_1318879723), "SetCoolingDownClientRpc"); ((NetworkBehaviour)this).__registerRpc(1759257859u, new RpcReceiveHandler(__rpc_handler_1759257859), "SetBrokenServerRpc"); ((NetworkBehaviour)this).__registerRpc(1854064234u, new RpcReceiveHandler(__rpc_handler_1854064234), "SetBrokenClientRpc"); ((NetworkBehaviour)this).__registerRpc(1961934554u, new RpcReceiveHandler(__rpc_handler_1961934554), "SetLaserEnabledServerRpc"); ((NetworkBehaviour)this).__registerRpc(2957210982u, new RpcReceiveHandler(__rpc_handler_2957210982), "SetLaserEnabledClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_4158919052(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool isMisfire = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref isMisfire, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).ShootServerRpc(isMisfire); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2126134327(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong enemyNetId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref enemyNetId); int damage = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref damage); target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).DamageEnemyServerRpc(enemyNetId, damage); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3959243505(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).ShootClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1139426808(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).StartChargingServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3735873320(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).StartChargingClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1666952511(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool wasShot = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref wasShot, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).StopChargingServerRpc(wasShot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3160830933(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool wasShot = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref wasShot, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).StopChargingClientRpc(wasShot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3562104048(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).ResetCooldownServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3702522798(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).ResetCooldownClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2234755725(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).ExplodeServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3815608759(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).ExplodeClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2374597506(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).RepairServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1368960985(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).RepairClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1947983455(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool coolingDownServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref coolingDownServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).SetCoolingDownServerRpc(coolingDownServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1318879723(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool coolingDownClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref coolingDownClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).SetCoolingDownClientRpc(coolingDownClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1759257859(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool brokenServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref brokenServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).SetBrokenServerRpc(brokenServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1854064234(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool brokenClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref brokenClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).SetBrokenClientRpc(brokenClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1961934554(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool laserEnabledServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref laserEnabledServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).SetLaserEnabledServerRpc(laserEnabledServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2957210982(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool laserEnabledClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref laserEnabledClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KarmaBehaviour)(object)target).SetLaserEnabledClientRpc(laserEnabledClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "KarmaBehaviour"; } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace KarmaOne.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }