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 PartySupplies v1.0.1
plugins/PartySupplies.dll
Decompiled 9 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using R2API; using RoR2; using RoR2.CharacterAI; using RoR2.Navigation; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("PartySupplies")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("PartySupplies")] [assembly: AssemblyTitle("PartySupplies")] [assembly: AssemblyVersion("1.0.0.0")] namespace PartySupplies; [BepInPlugin("com.prizzys.partysupplies", "Party Supplies", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class PartySuppliesPlugin : BaseUnityPlugin { private class ToxicVialInfectionData { public float expireTime; public float damageBonus; public GameObject markerObject; } private class PanicData { public CharacterBody attackerBody; public GameObject markerObject; public BaseAI aiComponent; public bool aiWasEnabled; public float expireTime; public float nextSpreadTime; public int generation; public float spreadChance; public float spreadRadius; } private class WorldDestroyerData { public Vector3 position; public CharacterBody attackerBody; public GameObject singularityObject; public float spawnTime; public float explodeTime; public float radius; public float damage; public float pullStrength; } private class RadioactiveHazardData { public CharacterBody attackerBody; public GameObject markerObject; public float expireTime; public float nextTickTime; public float radius; public float damage; } private class TeslaRelayData { public Vector3 position; public CharacterBody attackerBody; public GameObject relayObject; public float expireTime; public float nextZapTime; public float radius; public float damage; public int maxTargets; } private class ElectricOverloadData { public CharacterBody attackerBody; public GameObject markerObject; public float dischargeTime; } private class ElectricMarkerData { public GameObject markerObject; public float expireTime; } private class NapalmFirePoolData { public Vector3 position; public CharacterBody attackerBody; public GameObject fireObject; public float expireTime; public float nextTickTime; public float radius; public float damage; } private class ChemicalSpillData { public Vector3 position; public CharacterBody attackerBody; public GameObject spillObject; public float expireTime; public float nextTickTime; public float radius; public float damage; } public const string PluginGUID = "com.prizzys.partysupplies"; public const string PluginName = "Party Supplies"; public const string PluginVersion = "1.0.0"; public static ItemDef councilMomentumItem; public static ItemDef redBarItem; public static ItemDef perc30Item; public static ItemDef adderall30Item; public static ItemDef b707Item; public static ItemDef teslaPillItem; public static ItemDef narcanItem; public static ItemDef bloodBagItem; public static ItemDef bandAidItem; public static ItemDef vitaminBottleItem; public static ItemDef razorBladeItem; public static ItemDef vampireFangsItem; public static ItemDef dynamiteBundleItem; public static ItemDef toxicVialItem; public static ItemDef chemicalSpillItem; public static ItemDef napalmCanisterItem; public static ItemDef overchargedBatteryItem; public static ItemDef teslaRelayItem; public static ItemDef radioactiveHazardItem; public static ItemDef falseAlarmItem; public static ItemDef worldDestroyerItem; public static GameObject dynamiteBundlePickupPrefab; public static AssetBundle mainAssetBundle; public static GameObject redBarPickupPrefab; public static GameObject perc30PickupPrefab; public static GameObject adderall30PickupPrefab; public static GameObject b707PickupPrefab; public static GameObject teslaPillPickupPrefab; public static GameObject narcanPickupPrefab; public static GameObject councilMomentumPickupPrefab; public static GameObject bloodBagPickupPrefab; public static GameObject bandAidPickupPrefab; public static GameObject VitaminBottlePrefab; public static GameObject razorBladePickupPrefab; public static GameObject vampireFangsPickupPrefab; public static GameObject toxicVialPickupPrefab; public static GameObject toxicVialMarkerPrefab; public static GameObject chemicalSpillPickupPrefab; public static GameObject chemicalSpillPuddlePrefab; public static GameObject napalmCanisterPickupPrefab; public static GameObject napalmFirePoolPrefab; public static GameObject overchargedBatteryPickupPrefab; public static GameObject electricShockMarkerPrefab; public static GameObject teslaRelayPickupPrefab; public static GameObject teslaRelayDeployPrefab; public static GameObject radioactiveHazardPickupPrefab; public static GameObject radioactiveMarkerPrefab; public static GameObject falseAlarmPickupPrefab; public static GameObject panicMarkerPrefab; public static GameObject worldDestroyerPickupPrefab; public static GameObject worldDestroyerSingularityPrefab; private Dictionary<CharacterMaster, CharacterBody> dynamiteBurnedEnemies = new Dictionary<CharacterMaster, CharacterBody>(); private Dictionary<CharacterMaster, ToxicVialInfectionData> toxicVialInfectedEnemies = new Dictionary<CharacterMaster, ToxicVialInfectionData>(); private bool toxicVialApplyingBonusDamage = false; private List<ChemicalSpillData> activeChemicalSpills = new List<ChemicalSpillData>(); private bool chemicalSpillApplyingDamage = false; private List<NapalmFirePoolData> activeNapalmFirePools = new List<NapalmFirePoolData>(); private bool napalmApplyingDamage = false; private Dictionary<CharacterMaster, ElectricOverloadData> overloadedEnemies = new Dictionary<CharacterMaster, ElectricOverloadData>(); private List<ElectricMarkerData> activeElectricMarkers = new List<ElectricMarkerData>(); private bool electricApplyingDamage = false; private List<TeslaRelayData> activeTeslaRelays = new List<TeslaRelayData>(); private bool teslaRelayApplyingDamage = false; private Dictionary<CharacterMaster, RadioactiveHazardData> irradiatedEnemies = new Dictionary<CharacterMaster, RadioactiveHazardData>(); private bool radioactiveApplyingDamage = false; private Dictionary<CharacterMaster, PanicData> panickedEnemies = new Dictionary<CharacterMaster, PanicData>(); private Dictionary<CharacterMaster, float> panicImmuneEnemies = new Dictionary<CharacterMaster, float>(); private List<WorldDestroyerData> activeWorldDestroyers = new List<WorldDestroyerData>(); private bool worldDestroyerApplyingDamage = false; private Dictionary<CharacterMaster, int> worldDestroyerHitCharges = new Dictionary<CharacterMaster, int>(); public void Awake() { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown LoadAssetBundle(); CreateItem(); CreateRedBarItem(); CreatePerc30Item(); CreateAdderall30Item(); CreateB707Item(); CreateTeslaPillItem(); CreateNarcanItem(); CreateBloodBagItem(); CreateBandAidItem(); CreateVitaminBottleItem(); CreateRazorBladeItem(); CreateVampireFangsItem(); CreateDynamiteBundleItem(); CreateToxicVialItem(); CreateChemicalSpillItem(); CreateNapalmCanisterItem(); CreateOverchargedBatteryItem(); CreateTeslaRelayItem(); CreateRadioactiveHazardItem(); CreateWorldDestroyerItem(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddCouncilMomentumStats); GlobalEventManager.onCharacterDeathGlobal += NarcanRevive; GlobalEventManager.onCharacterDeathGlobal += BloodBagHealOnKill; GlobalEventManager.onServerDamageDealt += RazorBladeBleed; GlobalEventManager.onServerDamageDealt += VampireFangsHealOnCrit; GlobalEventManager.onServerDamageDealt += DynamiteBundleIgniteOnHit; GlobalEventManager.onCharacterDeathGlobal += DynamiteBundleExplodeOnDeath; GlobalEventManager.onServerDamageDealt += ToxicVialOnDamageDealt; GlobalEventManager.onServerDamageDealt += ChemicalSpillOnDamageDealt; GlobalEventManager.onServerDamageDealt += NapalmCanisterOnDamageDealt; GlobalEventManager.onServerDamageDealt += OverchargedBatteryOnDamageDealt; GlobalEventManager.onCharacterDeathGlobal += OverchargedBatteryExplodeOnDeath; GlobalEventManager.onServerDamageDealt += TeslaRelayOnDamageDealt; GlobalEventManager.onServerDamageDealt += RadioactiveHazardOnDamageDealt; GlobalEventManager.onCharacterDeathGlobal += RadioactiveHazardOnDeath; GlobalEventManager.onServerDamageDealt += WorldDestroyerOnDamageDealt; ((BaseUnityPlugin)this).Logger.LogInfo((object)"Party Supplies have been purchased :)"); } private void LoadAssetBundle() { //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) string text = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "partysuppliesbundle"); mainAssetBundle = AssetBundle.LoadFromFile(text); if ((Object)(object)mainAssetBundle == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)("Failed to load AssetBundle at: " + text)); return; } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded AssetBundle: partysuppliesbundle"); string[] allAssetNames = mainAssetBundle.GetAllAssetNames(); foreach (string text2 in allAssetNames) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("AssetBundle contains: " + text2)); } redBarPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("xanaxbarfinalcopy1"); if ((Object)(object)redBarPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Failed to load red bar prefab from AssetBundle."); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded red bar pickup prefab."); } worldDestroyerPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("WorldDestroyerPrefab"); if ((Object)(object)worldDestroyerPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: WorldDestroyerPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: WorldDestroyerPrefab"); } worldDestroyerSingularityPrefab = worldDestroyerPickupPrefab; falseAlarmPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("FalseAlarmCleanPrefab"); if ((Object)(object)falseAlarmPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: FalseAlarmPickPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: FalseAlarmPickupPrefab"); } if ((Object)(object)falseAlarmPickupPrefab != (Object)null) { falseAlarmPickupPrefab.transform.localScale = Vector3.one * 0.15f; panicMarkerPrefab = falseAlarmPickupPrefab; } radioactiveHazardPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("RadioactiveHazardPrefab"); if ((Object)(object)radioactiveHazardPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: RadioactiveHazardPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: RadioactiveHazardPrefab"); } radioactiveMarkerPrefab = mainAssetBundle.LoadAsset<GameObject>("RadioactiveMarkerPrefab"); if ((Object)(object)radioactiveMarkerPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: RadioactiveMarkerPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: RadioactiveMarkerPrefab"); } teslaRelayPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("TeslaRelayPickUpPrefab"); if ((Object)(object)teslaRelayPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: TeslaRelayPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: TeslaRelayPrefab"); } teslaRelayDeployPrefab = mainAssetBundle.LoadAsset<GameObject>("TeslaRelayPrefab"); if ((Object)(object)teslaRelayDeployPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: TeslaRelayPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded deploy prefab."); } overchargedBatteryPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("OverchargedBatteryPrefab"); if ((Object)(object)overchargedBatteryPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: OverchargedBatteryPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: OverchargedBatteryPrefab"); } electricShockMarkerPrefab = mainAssetBundle.LoadAsset<GameObject>("ElectricShockMarkerPrefab"); if ((Object)(object)electricShockMarkerPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: ElectricShockMarkerPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: ElectricShockMarkerPrefab"); } napalmCanisterPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("NapalmCanisterPrefab"); if ((Object)(object)napalmCanisterPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: NapalmCanisterPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: NapalmCanisterPrefab"); } napalmFirePoolPrefab = mainAssetBundle.LoadAsset<GameObject>("NapalmFirePoolPrefab"); if ((Object)(object)napalmFirePoolPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: NapalmFirePoolPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: NapalmFirePoolPrefab"); } chemicalSpillPuddlePrefab = mainAssetBundle.LoadAsset<GameObject>("ChemicalSpillPuddlePrefab"); if ((Object)(object)chemicalSpillPuddlePrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: ChemicalSpillPuddlePrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: ChemicalSpillPuddlePrefab"); } chemicalSpillPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("ChemicalSpillPrefab"); if ((Object)(object)chemicalSpillPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: ChemicalSpillPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: ChemicalSpillPrefab"); } toxicVialMarkerPrefab = mainAssetBundle.LoadAsset<GameObject>("ToxicVialMarkerPrefab"); if ((Object)(object)toxicVialMarkerPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: ToxicVialMarkerPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: ToxicVialMarkerPrefab"); } toxicVialPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("ToxicVialPrefab"); if ((Object)(object)toxicVialPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: ToxicVialPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: ToxicVialPrefab"); } dynamiteBundlePickupPrefab = mainAssetBundle.LoadAsset<GameObject>("DynamiteBundlePrefab"); if ((Object)(object)dynamiteBundlePickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: DynamiteBundlePrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: DynamiteBundlePrefab"); } vampireFangsPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("VampireFangsPrefab"); if ((Object)(object)vampireFangsPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: VampireFangsPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: VampireFangsPrefab"); } razorBladePickupPrefab = mainAssetBundle.LoadAsset<GameObject>("RazorBladePrefab"); if ((Object)(object)razorBladePickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: RazorBladePrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: RazorBladePrefab"); } VitaminBottlePrefab = mainAssetBundle.LoadAsset<GameObject>("VitaminBottlePrefab"); if ((Object)(object)VitaminBottlePrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: VitaminBottlePrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: VitaminBottlePrefab"); } bandAidPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("BandAidPrefab"); if ((Object)(object)bandAidPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: BandAidPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: BandAidPrefab"); } councilMomentumPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("CouncilMomentumPrefab"); if ((Object)(object)councilMomentumPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: CouncilMomentumPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: CouncilMomentumPrefab"); } bloodBagPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("BloodBagPrefab"); if ((Object)(object)bloodBagPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: BloodBagPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: BloodBagPrefab"); } narcanPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("NarcanPrefab"); if ((Object)(object)narcanPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: NarcanPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: NarcanPrefab"); } teslaPillPickupPrefab = mainAssetBundle.LoadAsset<GameObject>("TeslaPillPrefab"); if ((Object)(object)teslaPillPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: TeslaPillPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: TeslaPillPrefab"); } b707PickupPrefab = mainAssetBundle.LoadAsset<GameObject>("B707Prefab"); if ((Object)(object)b707PickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: B707Prefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: B707Prefab"); } perc30PickupPrefab = mainAssetBundle.LoadAsset<GameObject>("Perc30Prefab"); if ((Object)(object)perc30PickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: Perc30Prefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: Perc30Prefab"); } adderall30PickupPrefab = mainAssetBundle.LoadAsset<GameObject>("Addy30Prefab"); if ((Object)(object)adderall30PickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: Addy30Prefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: Addy30Prefab"); } } private void NarcanRevive(DamageReport damageReport) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) if (damageReport == null) { return; } CharacterBody victimBody = damageReport.victimBody; if ((Object)(object)victimBody == (Object)null || (Object)(object)victimBody.inventory == (Object)null) { return; } int itemCount = victimBody.inventory.GetItemCount(narcanItem); if (itemCount <= 0) { return; } CharacterMaster master = victimBody.master; if (!((Object)(object)master == (Object)null)) { victimBody.inventory.RemoveItem(narcanItem, 1); master.Respawn(((Component)victimBody).transform.position, ((Component)victimBody).transform.rotation, false); if ((Object)(object)master.GetBody() != (Object)null && (Object)(object)master.GetBody().healthComponent != (Object)null) { HealthComponent healthComponent = master.GetBody().healthComponent; healthComponent.health = healthComponent.fullHealth * 0.5f; healthComponent.shield = 0f; } ((BaseUnityPlugin)this).Logger.LogInfo((object)("Narcan revived: " + ((Object)victimBody).name)); } } private void WorldDestroyerOnDamageDealt(DamageReport damageReport) { //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0167: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: 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_0194: 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_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) if (worldDestroyerApplyingDamage || damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; if ((Object)(object)attackerBody.inventory == (Object)null || (Object)(object)attackerBody.master == (Object)null || damageReport.damageInfo == null || damageReport.damageInfo.procCoefficient <= 0f) { return; } int itemCount = attackerBody.inventory.GetItemCount(worldDestroyerItem); if (itemCount <= 0) { return; } CharacterMaster master = attackerBody.master; if (!worldDestroyerHitCharges.ContainsKey(master)) { worldDestroyerHitCharges[master] = 0; } worldDestroyerHitCharges[master]++; if (worldDestroyerHitCharges[master] < 10) { return; } worldDestroyerHitCharges[master] = 0; Vector3 val = damageReport.victimBody.corePosition; NodeGraph groundNodes = SceneInfo.instance.groundNodes; if ((Object)(object)groundNodes != (Object)null) { NodeIndex val2 = groundNodes.FindClosestNode(val, (HullClassification)0, float.PositiveInfinity); if (val2 != NodeIndex.invalid) { groundNodes.GetNodePosition(val2, ref val); val += Vector3.up * 1.5f; } } GameObject val3 = null; if ((Object)(object)worldDestroyerSingularityPrefab != (Object)null) { val3 = Object.Instantiate<GameObject>(worldDestroyerSingularityPrefab, val, Quaternion.identity); val3.transform.localScale = Vector3.one * 4f; } WorldDestroyerData worldDestroyerData = new WorldDestroyerData(); worldDestroyerData.position = val; worldDestroyerData.attackerBody = attackerBody; worldDestroyerData.singularityObject = val3; worldDestroyerData.spawnTime = Time.time; worldDestroyerData.explodeTime = Time.time + 5f; worldDestroyerData.radius = 22f; worldDestroyerData.damage = attackerBody.damage * (8f + 2f * (float)(itemCount - 1)); worldDestroyerData.pullStrength = 10f; activeWorldDestroyers.Add(worldDestroyerData); ((BaseUnityPlugin)this).Logger.LogInfo((object)"World Destroyer singularity created."); } private void FalseAlarmOnDamageDealt(DamageReport damageReport) { if (damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; CharacterBody victimBody = damageReport.victimBody; CharacterMaster val = (((Object)(object)damageReport.victimMaster != (Object)null) ? damageReport.victimMaster : victimBody.master); if ((Object)(object)attackerBody.inventory == (Object)null || (Object)(object)val == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(falseAlarmItem); if (itemCount > 0) { float num = 15f; if (Util.CheckRoll(num, attackerBody.master)) { float spreadChance = Mathf.Min(35f + 5f * (float)((itemCount - 1) / 3), 60f); float spreadRadius = 15f + (float)itemCount; PanicEnemy(attackerBody, victimBody, val, 1, spreadChance, spreadRadius); ((BaseUnityPlugin)this).Logger.LogInfo((object)("False Alarm panicked enemy: " + ((Object)victimBody).name)); } } } private void PanicEnemy(CharacterBody attackerBody, CharacterBody victimBody, CharacterMaster victimMaster, int generation, float spreadChance, float spreadRadius) { //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)attackerBody == (Object)null) && !((Object)(object)victimBody == (Object)null) && !((Object)(object)victimMaster == (Object)null) && generation <= 3 && (!panicImmuneEnemies.ContainsKey(victimMaster) || !(Time.time < panicImmuneEnemies[victimMaster])) && !panickedEnemies.ContainsKey(victimMaster)) { float num = 2f; if (victimBody.isChampion) { num = 0.5f; } BaseAI component = ((Component)victimMaster).GetComponent<BaseAI>(); PanicData panicData = new PanicData(); panicData.attackerBody = attackerBody; panicData.markerObject = null; panicData.aiComponent = component; panicData.aiWasEnabled = (Object)(object)component != (Object)null && ((Behaviour)component).enabled; panicData.expireTime = Time.time + num; panicData.nextSpreadTime = Time.time + 1f; panicData.generation = generation; panicData.spreadChance = spreadChance; panicData.spreadRadius = spreadRadius; if ((Object)(object)component != (Object)null) { ((Behaviour)component).enabled = false; } if ((Object)(object)panicMarkerPrefab != (Object)null && (Object)(object)victimBody.coreTransform != (Object)null) { GameObject val = Object.Instantiate<GameObject>(panicMarkerPrefab); val.transform.SetParent(victimBody.coreTransform); val.transform.localPosition = new Vector3(0f, 2.5f, 0f); val.transform.localRotation = Quaternion.identity; val.transform.localScale = Vector3.one * 1f; panicData.markerObject = val; } panickedEnemies[victimMaster] = panicData; } } private void RadioactiveHazardOnDamageDealt(DamageReport damageReport) { if (radioactiveApplyingDamage || damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; CharacterBody victimBody = damageReport.victimBody; CharacterMaster val = (((Object)(object)damageReport.victimMaster != (Object)null) ? damageReport.victimMaster : victimBody.master); if ((Object)(object)attackerBody.inventory == (Object)null || (Object)(object)val == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(radioactiveHazardItem); if (itemCount > 0) { float num = 10f * (float)itemCount; if (Util.CheckRoll(num, attackerBody.master)) { IrradiateEnemy(attackerBody, victimBody, val, itemCount); ((BaseUnityPlugin)this).Logger.LogInfo((object)("Radioactive Hazard irradiated enemy: " + ((Object)victimBody).name)); } } } private void IrradiateEnemy(CharacterBody attackerBody, CharacterBody victimBody, CharacterMaster victimMaster, int hazardCount) { //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)attackerBody == (Object)null || (Object)(object)victimBody == (Object)null || (Object)(object)victimMaster == (Object)null) { return; } if (irradiatedEnemies.ContainsKey(victimMaster)) { RadioactiveHazardData radioactiveHazardData = irradiatedEnemies[victimMaster]; if (radioactiveHazardData != null && (Object)(object)radioactiveHazardData.markerObject != (Object)null) { Object.Destroy((Object)(object)radioactiveHazardData.markerObject); } irradiatedEnemies.Remove(victimMaster); } RadioactiveHazardData radioactiveHazardData2 = new RadioactiveHazardData(); radioactiveHazardData2.attackerBody = attackerBody; radioactiveHazardData2.markerObject = null; radioactiveHazardData2.expireTime = Time.time + 8f; radioactiveHazardData2.nextTickTime = Time.time + 1f; radioactiveHazardData2.radius = 8f + (float)hazardCount; radioactiveHazardData2.damage = attackerBody.damage * (0.5f + 0.15f * (float)hazardCount); if ((Object)(object)radioactiveMarkerPrefab != (Object)null && (Object)(object)victimBody.coreTransform != (Object)null) { GameObject val = Object.Instantiate<GameObject>(radioactiveMarkerPrefab); val.transform.SetParent(victimBody.coreTransform); val.transform.localPosition = new Vector3(0f, 2.5f, 0f); val.transform.localRotation = Quaternion.identity; val.transform.localScale = Vector3.one * 35f; radioactiveHazardData2.markerObject = val; } irradiatedEnemies[victimMaster] = radioactiveHazardData2; } private void RadioactiveHazardOnDeath(DamageReport damageReport) { //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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_0117: Expected O, but got Unknown //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Expected O, but got Unknown //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) if (damageReport == null || (Object)(object)damageReport.victimBody == (Object)null || (Object)(object)damageReport.victimMaster == (Object)null) { return; } CharacterMaster victimMaster = damageReport.victimMaster; if (!irradiatedEnemies.ContainsKey(victimMaster)) { return; } RadioactiveHazardData radioactiveHazardData = irradiatedEnemies[victimMaster]; irradiatedEnemies.Remove(victimMaster); if (radioactiveHazardData != null && (Object)(object)radioactiveHazardData.markerObject != (Object)null) { Object.Destroy((Object)(object)radioactiveHazardData.markerObject); } if (radioactiveHazardData == null || (Object)(object)radioactiveHazardData.attackerBody == (Object)null || (Object)(object)radioactiveHazardData.attackerBody.teamComponent == (Object)null) { return; } CharacterBody attackerBody = radioactiveHazardData.attackerBody; Vector3 corePosition = damageReport.victimBody.corePosition; int num = ((!((Object)(object)attackerBody.inventory != (Object)null)) ? 1 : attackerBody.inventory.GetItemCount(radioactiveHazardItem)); TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(attackerBody.teamComponent.teamIndex); BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = allButNeutral; val.filterByLoS = false; val.searchOrigin = corePosition; val.searchDirection = Vector3.up; val.maxDistanceFilter = 12f + (float)num; val.maxAngleFilter = 360f; val.sortMode = (SortMode)1; val.RefreshCandidates(); foreach (HurtBox result in val.GetResults()) { if (!((Object)(object)result == (Object)null) && !((Object)(object)result.healthComponent == (Object)null) && !((Object)(object)result.healthComponent.body == (Object)null)) { CharacterBody body = result.healthComponent.body; DamageInfo val2 = new DamageInfo(); val2.damage = attackerBody.damage * (1.2f + 0.25f * (float)num); val2.attacker = ((Component)attackerBody).gameObject; val2.inflictor = ((Component)attackerBody).gameObject; val2.position = body.corePosition; val2.force = Vector3.up * 300f; val2.procCoefficient = 0f; val2.crit = false; radioactiveApplyingDamage = true; body.healthComponent.TakeDamage(val2); radioactiveApplyingDamage = false; if ((Object)(object)body.master != (Object)null) { IrradiateEnemy(attackerBody, body, body.master, num); } } } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Radioactive Hazard burst triggered."); } private void TeslaRelayOnDamageDealt(DamageReport damageReport) { //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: 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_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) if (teslaRelayApplyingDamage || damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; if ((Object)(object)attackerBody.inventory == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(teslaRelayItem); if (itemCount <= 0) { return; } float num = 15f; if (!Util.CheckRoll(num, attackerBody.master)) { return; } int num2 = 3; while (activeTeslaRelays.Count >= num2) { TeslaRelayData teslaRelayData = activeTeslaRelays[0]; if (teslaRelayData != null && (Object)(object)teslaRelayData.relayObject != (Object)null) { Object.Destroy((Object)(object)teslaRelayData.relayObject); } activeTeslaRelays.RemoveAt(0); } Vector3 val = damageReport.victimBody.corePosition; NodeGraph groundNodes = SceneInfo.instance.groundNodes; if ((Object)(object)groundNodes != (Object)null) { NodeIndex val2 = groundNodes.FindClosestNode(val, (HullClassification)0, float.PositiveInfinity); if (val2 != NodeIndex.invalid) { groundNodes.GetNodePosition(val2, ref val); val += Vector3.up * 0.1f; } } GameObject val3 = null; if ((Object)(object)teslaRelayDeployPrefab != (Object)null) { val3 = Object.Instantiate<GameObject>(teslaRelayDeployPrefab, val, Quaternion.identity); val3.transform.localScale = Vector3.one * 2.4f; } TeslaRelayData teslaRelayData2 = new TeslaRelayData(); teslaRelayData2.position = val; teslaRelayData2.attackerBody = attackerBody; teslaRelayData2.relayObject = val3; teslaRelayData2.expireTime = Time.time + 12f; teslaRelayData2.nextZapTime = Time.time + 1f; teslaRelayData2.radius = 9f + 1.5f * (float)itemCount; teslaRelayData2.damage = attackerBody.damage * (0.9f + 0.2f * (float)itemCount); teslaRelayData2.maxTargets = 3 + itemCount - 1; activeTeslaRelays.Add(teslaRelayData2); ((BaseUnityPlugin)this).Logger.LogInfo((object)("Tesla Relay deployed. Active relays: " + activeTeslaRelays.Count)); } private void OverchargedBatteryOnDamageDealt(DamageReport damageReport) { //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0183: 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_019f: Unknown result type (might be due to invalid IL or missing references) if (electricApplyingDamage || damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; CharacterBody victimBody = damageReport.victimBody; CharacterMaster val = (((Object)(object)damageReport.victimMaster != (Object)null) ? damageReport.victimMaster : victimBody.master); if ((Object)(object)attackerBody.inventory == (Object)null || (Object)(object)val == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(overchargedBatteryItem); if (itemCount <= 0) { return; } float num = 10f * (float)itemCount; if (Util.CheckRoll(num, attackerBody.master) && !overloadedEnemies.ContainsKey(val)) { ElectricOverloadData electricOverloadData = new ElectricOverloadData(); electricOverloadData.attackerBody = attackerBody; electricOverloadData.markerObject = null; electricOverloadData.dischargeTime = Time.time + 0.75f; if ((Object)(object)electricShockMarkerPrefab != (Object)null && (Object)(object)victimBody.coreTransform != (Object)null) { GameObject val2 = Object.Instantiate<GameObject>(electricShockMarkerPrefab); val2.transform.SetParent(victimBody.coreTransform); val2.transform.localPosition = new Vector3(0f, 2.5f, 0f); val2.transform.localRotation = Quaternion.identity; val2.transform.localScale = Vector3.one * 35f; electricOverloadData.markerObject = val2; } overloadedEnemies[val] = electricOverloadData; ((BaseUnityPlugin)this).Logger.LogInfo((object)("Enemy overloaded: " + ((Object)victimBody).name)); } } private void OverchargedBatteryExplodeOnDeath(DamageReport damageReport) { //IL_00b3: Unknown result type (might be due to invalid IL or missing references) if (damageReport == null || (Object)(object)damageReport.victimBody == (Object)null || (Object)(object)damageReport.victimMaster == (Object)null) { return; } CharacterMaster victimMaster = damageReport.victimMaster; if (overloadedEnemies.ContainsKey(victimMaster)) { ElectricOverloadData electricOverloadData = overloadedEnemies[victimMaster]; overloadedEnemies.Remove(victimMaster); if (electricOverloadData != null && (Object)(object)electricOverloadData.markerObject != (Object)null) { Object.Destroy((Object)(object)electricOverloadData.markerObject); } if (electricOverloadData != null && !((Object)(object)electricOverloadData.attackerBody == (Object)null)) { TriggerElectricDischarge(electricOverloadData.attackerBody, damageReport.victimBody.corePosition); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Overloaded enemy died and exploded electrically."); } } } private void TriggerElectricDischarge(CharacterBody attackerBody, Vector3 dischargePosition) { //IL_0079: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)attackerBody == (Object)null || (Object)(object)attackerBody.inventory == (Object)null || (Object)(object)attackerBody.teamComponent == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(overchargedBatteryItem); if (itemCount <= 0) { return; } int num = 5 + itemCount - 1; float maxDistanceFilter = 25f; float damage = attackerBody.damage * (1.5f + 0.25f * (float)itemCount); TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(attackerBody.teamComponent.teamIndex); BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = allButNeutral; val.filterByLoS = false; val.searchOrigin = dischargePosition; val.searchDirection = Vector3.up; val.maxDistanceFilter = maxDistanceFilter; val.maxAngleFilter = 360f; val.sortMode = (SortMode)1; val.RefreshCandidates(); int num2 = 0; foreach (HurtBox result in val.GetResults()) { if (num2 >= num) { break; } if (!((Object)(object)result == (Object)null) && !((Object)(object)result.healthComponent == (Object)null) && !((Object)(object)result.healthComponent.body == (Object)null)) { CharacterBody body = result.healthComponent.body; DamageInfo val2 = new DamageInfo(); val2.damage = damage; val2.attacker = ((Component)attackerBody).gameObject; val2.inflictor = ((Component)attackerBody).gameObject; val2.position = body.corePosition; val2.force = Vector3.up * 300f; val2.procCoefficient = 0f; val2.crit = false; electricApplyingDamage = true; body.healthComponent.TakeDamage(val2); electricApplyingDamage = false; SpawnTemporaryElectricMarker(body); num2++; } } ((BaseUnityPlugin)this).Logger.LogInfo((object)("Electric discharge hit " + num2 + " enemies.")); } private void SpawnTemporaryElectricMarker(CharacterBody targetBody) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)electricShockMarkerPrefab == (Object)null) && !((Object)(object)targetBody == (Object)null) && !((Object)(object)targetBody.coreTransform == (Object)null)) { GameObject val = Object.Instantiate<GameObject>(electricShockMarkerPrefab); val.transform.SetParent(targetBody.coreTransform); val.transform.localPosition = new Vector3(0f, 2.5f, 0f); val.transform.localRotation = Quaternion.identity; val.transform.localScale = Vector3.one * 30f; ElectricMarkerData electricMarkerData = new ElectricMarkerData(); electricMarkerData.markerObject = val; electricMarkerData.expireTime = Time.time + 1f; activeElectricMarkers.Add(electricMarkerData); } } private void NapalmCanisterOnDamageDealt(DamageReport damageReport) { //IL_00a5: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: 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) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_0108: 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) if (napalmApplyingDamage || damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; if ((Object)(object)attackerBody.inventory == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(napalmCanisterItem); if (itemCount <= 0) { return; } float num = 10f * (float)itemCount; if (!Util.CheckRoll(num, 0f, (CharacterMaster)null)) { return; } Vector3 val = damageReport.victimBody.corePosition; NodeGraph groundNodes = SceneInfo.instance.groundNodes; if ((Object)(object)groundNodes != (Object)null) { NodeIndex val2 = groundNodes.FindClosestNode(val, (HullClassification)0, float.PositiveInfinity); if (val2 != NodeIndex.invalid) { groundNodes.GetNodePosition(val2, ref val); val += Vector3.up * 0.1f; } } GameObject val3 = null; if ((Object)(object)napalmFirePoolPrefab != (Object)null) { val3 = Object.Instantiate<GameObject>(napalmFirePoolPrefab, val, Quaternion.identity); val3.transform.localScale = Vector3.one; } NapalmFirePoolData napalmFirePoolData = new NapalmFirePoolData(); napalmFirePoolData.position = val; napalmFirePoolData.attackerBody = attackerBody; napalmFirePoolData.fireObject = val3; napalmFirePoolData.expireTime = Time.time + 6f; napalmFirePoolData.nextTickTime = Time.time + 1f; napalmFirePoolData.radius = 8f; napalmFirePoolData.damage = attackerBody.damage * (1f + 0.25f * (float)itemCount); activeNapalmFirePools.Add(napalmFirePoolData); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Napalm fire pool created."); } private void ChemicalSpillOnDamageDealt(DamageReport damageReport) { //IL_00a5: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: 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) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_0108: 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) if (chemicalSpillApplyingDamage || damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; if ((Object)(object)attackerBody.inventory == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(chemicalSpillItem); if (itemCount <= 0) { return; } float num = 10f * (float)itemCount; if (!Util.CheckRoll(num, 0f, (CharacterMaster)null)) { return; } Vector3 val = damageReport.victimBody.corePosition; NodeGraph groundNodes = SceneInfo.instance.groundNodes; if ((Object)(object)groundNodes != (Object)null) { NodeIndex val2 = groundNodes.FindClosestNode(val, (HullClassification)0, float.PositiveInfinity); if (val2 != NodeIndex.invalid) { groundNodes.GetNodePosition(val2, ref val); val += Vector3.up * 0.1f; } } GameObject val3 = null; if ((Object)(object)chemicalSpillPuddlePrefab != (Object)null) { val3 = Object.Instantiate<GameObject>(chemicalSpillPuddlePrefab, val, Quaternion.identity); val3.transform.localScale = Vector3.one; } ChemicalSpillData chemicalSpillData = new ChemicalSpillData(); chemicalSpillData.position = val; chemicalSpillData.attackerBody = attackerBody; chemicalSpillData.spillObject = val3; chemicalSpillData.expireTime = Time.time + 6f; chemicalSpillData.nextTickTime = Time.time + 1f; chemicalSpillData.radius = 8f; chemicalSpillData.damage = attackerBody.damage * (0.8f + 0.2f * (float)itemCount); activeChemicalSpills.Add(chemicalSpillData); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Chemical Spill created."); } private void FixedUpdate() { //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Expected O, but got Unknown //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: 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_042d: Expected O, but got Unknown //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_06aa: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_0839: Unknown result type (might be due to invalid IL or missing references) //IL_0844: Unknown result type (might be due to invalid IL or missing references) //IL_084f: Unknown result type (might be due to invalid IL or missing references) //IL_0856: Expected O, but got Unknown //IL_0858: Unknown result type (might be due to invalid IL or missing references) //IL_085a: Unknown result type (might be due to invalid IL or missing references) //IL_086b: Unknown result type (might be due to invalid IL or missing references) //IL_0870: Unknown result type (might be due to invalid IL or missing references) //IL_0877: Unknown result type (might be due to invalid IL or missing references) //IL_087c: Unknown result type (might be due to invalid IL or missing references) //IL_089f: Unknown result type (might be due to invalid IL or missing references) //IL_0b1c: Unknown result type (might be due to invalid IL or missing references) //IL_0b21: Unknown result type (might be due to invalid IL or missing references) //IL_0b2c: Unknown result type (might be due to invalid IL or missing references) //IL_0b37: Unknown result type (might be due to invalid IL or missing references) //IL_0b3e: Expected O, but got Unknown //IL_0b40: Unknown result type (might be due to invalid IL or missing references) //IL_0b42: Unknown result type (might be due to invalid IL or missing references) //IL_0b53: Unknown result type (might be due to invalid IL or missing references) //IL_0b58: Unknown result type (might be due to invalid IL or missing references) //IL_0b5f: Unknown result type (might be due to invalid IL or missing references) //IL_0b64: Unknown result type (might be due to invalid IL or missing references) //IL_0b87: Unknown result type (might be due to invalid IL or missing references) //IL_092f: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Expected O, but got Unknown //IL_097c: Unknown result type (might be due to invalid IL or missing references) //IL_0981: Unknown result type (might be due to invalid IL or missing references) //IL_0988: Unknown result type (might be due to invalid IL or missing references) //IL_0992: Unknown result type (might be due to invalid IL or missing references) //IL_0997: Unknown result type (might be due to invalid IL or missing references) //IL_0c0c: Unknown result type (might be due to invalid IL or missing references) //IL_0c13: Expected O, but got Unknown //IL_0c41: Unknown result type (might be due to invalid IL or missing references) //IL_0c46: Unknown result type (might be due to invalid IL or missing references) //IL_0c4d: Unknown result type (might be due to invalid IL or missing references) //IL_0c52: Unknown result type (might be due to invalid IL or missing references) //IL_0e0e: Unknown result type (might be due to invalid IL or missing references) //IL_0e1a: Unknown result type (might be due to invalid IL or missing references) //IL_0e1f: Unknown result type (might be due to invalid IL or missing references) //IL_0e24: Unknown result type (might be due to invalid IL or missing references) //IL_0e32: Unknown result type (might be due to invalid IL or missing references) //IL_0e34: Unknown result type (might be due to invalid IL or missing references) //IL_0e66: Unknown result type (might be due to invalid IL or missing references) //IL_0e6f: Unknown result type (might be due to invalid IL or missing references) //IL_0e79: Unknown result type (might be due to invalid IL or missing references) //IL_0e7e: Unknown result type (might be due to invalid IL or missing references) //IL_1272: Unknown result type (might be due to invalid IL or missing references) //IL_1279: Unknown result type (might be due to invalid IL or missing references) //IL_1290: Unknown result type (might be due to invalid IL or missing references) //IL_1306: Unknown result type (might be due to invalid IL or missing references) //IL_130b: Unknown result type (might be due to invalid IL or missing references) //IL_1316: Unknown result type (might be due to invalid IL or missing references) //IL_1321: Unknown result type (might be due to invalid IL or missing references) //IL_1328: Expected O, but got Unknown //IL_132a: Unknown result type (might be due to invalid IL or missing references) //IL_132c: Unknown result type (might be due to invalid IL or missing references) //IL_133d: Unknown result type (might be due to invalid IL or missing references) //IL_1342: Unknown result type (might be due to invalid IL or missing references) //IL_1349: Unknown result type (might be due to invalid IL or missing references) //IL_134e: Unknown result type (might be due to invalid IL or missing references) //IL_1371: Unknown result type (might be due to invalid IL or missing references) //IL_0f0c: Unknown result type (might be due to invalid IL or missing references) //IL_0f11: Unknown result type (might be due to invalid IL or missing references) //IL_0f1c: Unknown result type (might be due to invalid IL or missing references) //IL_0f27: Unknown result type (might be due to invalid IL or missing references) //IL_0f2e: Expected O, but got Unknown //IL_0f30: Unknown result type (might be due to invalid IL or missing references) //IL_0f32: Unknown result type (might be due to invalid IL or missing references) //IL_0f43: Unknown result type (might be due to invalid IL or missing references) //IL_0f48: Unknown result type (might be due to invalid IL or missing references) //IL_0f4f: Unknown result type (might be due to invalid IL or missing references) //IL_0f54: Unknown result type (might be due to invalid IL or missing references) //IL_0f77: Unknown result type (might be due to invalid IL or missing references) //IL_14de: Unknown result type (might be due to invalid IL or missing references) //IL_14e5: Expected O, but got Unknown //IL_14e7: Unknown result type (might be due to invalid IL or missing references) //IL_14e9: Unknown result type (might be due to invalid IL or missing references) //IL_14fa: Unknown result type (might be due to invalid IL or missing references) //IL_14ff: Unknown result type (might be due to invalid IL or missing references) //IL_1506: Unknown result type (might be due to invalid IL or missing references) //IL_150b: Unknown result type (might be due to invalid IL or missing references) //IL_152e: Unknown result type (might be due to invalid IL or missing references) //IL_13ff: Unknown result type (might be due to invalid IL or missing references) //IL_1406: Unknown result type (might be due to invalid IL or missing references) //IL_140b: Unknown result type (might be due to invalid IL or missing references) //IL_1410: Unknown result type (might be due to invalid IL or missing references) //IL_141e: Unknown result type (might be due to invalid IL or missing references) //IL_1420: Unknown result type (might be due to invalid IL or missing references) //IL_145b: Unknown result type (might be due to invalid IL or missing references) //IL_1464: Unknown result type (might be due to invalid IL or missing references) //IL_1471: Unknown result type (might be due to invalid IL or missing references) //IL_1476: Unknown result type (might be due to invalid IL or missing references) //IL_1486: Unknown result type (might be due to invalid IL or missing references) //IL_148b: Unknown result type (might be due to invalid IL or missing references) //IL_1494: Unknown result type (might be due to invalid IL or missing references) //IL_149e: Unknown result type (might be due to invalid IL or missing references) //IL_14a3: Unknown result type (might be due to invalid IL or missing references) //IL_15a4: Unknown result type (might be due to invalid IL or missing references) //IL_15ab: Expected O, but got Unknown //IL_15f1: Unknown result type (might be due to invalid IL or missing references) //IL_15f6: Unknown result type (might be due to invalid IL or missing references) //IL_15fd: Unknown result type (might be due to invalid IL or missing references) //IL_1607: Unknown result type (might be due to invalid IL or missing references) //IL_160c: Unknown result type (might be due to invalid IL or missing references) for (int num = activeChemicalSpills.Count - 1; num >= 0; num--) { ChemicalSpillData chemicalSpillData = activeChemicalSpills[num]; if (chemicalSpillData == null || Time.time > chemicalSpillData.expireTime) { if (chemicalSpillData != null && (Object)(object)chemicalSpillData.spillObject != (Object)null) { Object.Destroy((Object)(object)chemicalSpillData.spillObject); } activeChemicalSpills.RemoveAt(num); } else if (!(Time.time < chemicalSpillData.nextTickTime)) { chemicalSpillData.nextTickTime = Time.time + 1f; CharacterBody attackerBody = chemicalSpillData.attackerBody; if (!((Object)(object)attackerBody == (Object)null) && !((Object)(object)attackerBody.teamComponent == (Object)null)) { TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(attackerBody.teamComponent.teamIndex); BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = allButNeutral; val.filterByLoS = false; val.searchOrigin = chemicalSpillData.position; val.searchDirection = Vector3.up; val.maxDistanceFilter = chemicalSpillData.radius; val.maxAngleFilter = 360f; val.sortMode = (SortMode)1; val.RefreshCandidates(); foreach (HurtBox result in val.GetResults()) { if (!((Object)(object)result == (Object)null) && !((Object)(object)result.healthComponent == (Object)null) && !((Object)(object)result.healthComponent.body == (Object)null)) { CharacterBody body = result.healthComponent.body; DamageInfo val2 = new DamageInfo(); val2.damage = chemicalSpillData.damage; val2.attacker = ((Component)attackerBody).gameObject; val2.inflictor = ((Component)attackerBody).gameObject; val2.position = body.corePosition; val2.force = Vector3.zero; val2.procCoefficient = 0f; val2.crit = false; chemicalSpillApplyingDamage = true; body.healthComponent.TakeDamage(val2); chemicalSpillApplyingDamage = false; } } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Chemical Spill tick damage applied."); } } } for (int num2 = activeNapalmFirePools.Count - 1; num2 >= 0; num2--) { NapalmFirePoolData napalmFirePoolData = activeNapalmFirePools[num2]; if (napalmFirePoolData == null || Time.time > napalmFirePoolData.expireTime) { if (napalmFirePoolData != null && (Object)(object)napalmFirePoolData.fireObject != (Object)null) { Object.Destroy((Object)(object)napalmFirePoolData.fireObject); } activeNapalmFirePools.RemoveAt(num2); } else if (!(Time.time < napalmFirePoolData.nextTickTime)) { napalmFirePoolData.nextTickTime = Time.time + 1f; CharacterBody attackerBody2 = napalmFirePoolData.attackerBody; if (!((Object)(object)attackerBody2 == (Object)null) && !((Object)(object)attackerBody2.teamComponent == (Object)null)) { TeamMask allButNeutral2 = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral2)).RemoveTeam(attackerBody2.teamComponent.teamIndex); BullseyeSearch val3 = new BullseyeSearch(); val3.teamMaskFilter = allButNeutral2; val3.filterByLoS = false; val3.searchOrigin = napalmFirePoolData.position; val3.searchDirection = Vector3.up; val3.maxDistanceFilter = napalmFirePoolData.radius; val3.maxAngleFilter = 360f; val3.sortMode = (SortMode)1; val3.RefreshCandidates(); foreach (HurtBox result2 in val3.GetResults()) { if (!((Object)(object)result2 == (Object)null) && !((Object)(object)result2.healthComponent == (Object)null) && !((Object)(object)result2.healthComponent.body == (Object)null)) { CharacterBody body2 = result2.healthComponent.body; DamageInfo val4 = new DamageInfo(); val4.damage = napalmFirePoolData.damage; val4.attacker = ((Component)attackerBody2).gameObject; val4.inflictor = ((Component)attackerBody2).gameObject; val4.position = body2.corePosition; val4.force = Vector3.zero; val4.procCoefficient = 0f; val4.crit = false; napalmApplyingDamage = true; body2.healthComponent.TakeDamage(val4); napalmApplyingDamage = false; if ((Object)(object)body2.healthComponent != (Object)null) { InflictDotInfo val5 = new InflictDotInfo { attackerObject = ((Component)attackerBody2).gameObject, victimObject = ((Component)body2).gameObject, dotIndex = (DotIndex)1, duration = 3f + 0.5f * (float)attackerBody2.inventory.GetItemCount(napalmCanisterItem), damageMultiplier = 1f }; DotController.InflictDot(ref val5); } } } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Napalm fire pool tick damage applied."); } } } List<CharacterMaster> list = new List<CharacterMaster>(); foreach (KeyValuePair<CharacterMaster, ElectricOverloadData> overloadedEnemy in overloadedEnemies) { if (overloadedEnemy.Value == null) { list.Add(overloadedEnemy.Key); } else if (Time.time >= overloadedEnemy.Value.dischargeTime) { list.Add(overloadedEnemy.Key); } } foreach (CharacterMaster item in list) { if (overloadedEnemies.ContainsKey(item)) { ElectricOverloadData electricOverloadData = overloadedEnemies[item]; overloadedEnemies.Remove(item); CharacterBody val6 = (((Object)(object)item != (Object)null) ? item.GetBody() : null); if (electricOverloadData != null && (Object)(object)electricOverloadData.markerObject != (Object)null) { Object.Destroy((Object)(object)electricOverloadData.markerObject); } if (electricOverloadData != null && !((Object)(object)electricOverloadData.attackerBody == (Object)null) && !((Object)(object)val6 == (Object)null)) { TriggerElectricDischarge(electricOverloadData.attackerBody, val6.corePosition); } } } for (int num3 = activeElectricMarkers.Count - 1; num3 >= 0; num3--) { ElectricMarkerData electricMarkerData = activeElectricMarkers[num3]; if (electricMarkerData == null || Time.time > electricMarkerData.expireTime) { if (electricMarkerData != null && (Object)(object)electricMarkerData.markerObject != (Object)null) { Object.Destroy((Object)(object)electricMarkerData.markerObject); } activeElectricMarkers.RemoveAt(num3); } } for (int num4 = activeTeslaRelays.Count - 1; num4 >= 0; num4--) { TeslaRelayData teslaRelayData = activeTeslaRelays[num4]; if (teslaRelayData == null || Time.time > teslaRelayData.expireTime) { if (teslaRelayData != null && (Object)(object)teslaRelayData.relayObject != (Object)null) { Object.Destroy((Object)(object)teslaRelayData.relayObject); } activeTeslaRelays.RemoveAt(num4); } else if (!(Time.time < teslaRelayData.nextZapTime)) { teslaRelayData.nextZapTime = Time.time + 1f; CharacterBody attackerBody3 = teslaRelayData.attackerBody; if (!((Object)(object)attackerBody3 == (Object)null) && !((Object)(object)attackerBody3.teamComponent == (Object)null)) { TeamMask allButNeutral3 = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral3)).RemoveTeam(attackerBody3.teamComponent.teamIndex); BullseyeSearch val7 = new BullseyeSearch(); val7.teamMaskFilter = allButNeutral3; val7.filterByLoS = false; val7.searchOrigin = teslaRelayData.position; val7.searchDirection = Vector3.up; val7.maxDistanceFilter = teslaRelayData.radius; val7.maxAngleFilter = 360f; val7.sortMode = (SortMode)1; val7.RefreshCandidates(); int num5 = 0; foreach (HurtBox result3 in val7.GetResults()) { if (num5 >= teslaRelayData.maxTargets) { break; } if (!((Object)(object)result3 == (Object)null) && !((Object)(object)result3.healthComponent == (Object)null) && !((Object)(object)result3.healthComponent.body == (Object)null)) { CharacterBody body3 = result3.healthComponent.body; DamageInfo val8 = new DamageInfo(); val8.damage = teslaRelayData.damage; val8.attacker = ((Component)attackerBody3).gameObject; val8.inflictor = (((Object)(object)teslaRelayData.relayObject != (Object)null) ? teslaRelayData.relayObject : ((Component)attackerBody3).gameObject); val8.position = body3.corePosition; val8.force = Vector3.up * 250f; val8.procCoefficient = 0f; val8.crit = false; teslaRelayApplyingDamage = true; body3.healthComponent.TakeDamage(val8); teslaRelayApplyingDamage = false; SpawnTemporaryElectricMarker(body3); num5++; } } ((BaseUnityPlugin)this).Logger.LogInfo((object)("Tesla Relay shocked " + num5 + " enemies.")); } } } List<CharacterMaster> list2 = new List<CharacterMaster>(); foreach (KeyValuePair<CharacterMaster, RadioactiveHazardData> irradiatedEnemy in irradiatedEnemies) { CharacterMaster key = irradiatedEnemy.Key; RadioactiveHazardData value = irradiatedEnemy.Value; if ((Object)(object)key == (Object)null || value == null || Time.time > value.expireTime) { list2.Add(key); continue; } CharacterBody body4 = key.GetBody(); if ((Object)(object)body4 == (Object)null || (Object)(object)value.attackerBody == (Object)null || (Object)(object)value.attackerBody.teamComponent == (Object)null) { list2.Add(key); } else { if (Time.time < value.nextTickTime) { continue; } value.nextTickTime = Time.time + 1f; CharacterBody attackerBody4 = value.attackerBody; TeamMask allButNeutral4 = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral4)).RemoveTeam(attackerBody4.teamComponent.teamIndex); BullseyeSearch val9 = new BullseyeSearch(); val9.teamMaskFilter = allButNeutral4; val9.filterByLoS = false; val9.searchOrigin = body4.corePosition; val9.searchDirection = Vector3.up; val9.maxDistanceFilter = value.radius; val9.maxAngleFilter = 360f; val9.sortMode = (SortMode)1; val9.RefreshCandidates(); foreach (HurtBox result4 in val9.GetResults()) { if (!((Object)(object)result4 == (Object)null) && !((Object)(object)result4.healthComponent == (Object)null) && !((Object)(object)result4.healthComponent.body == (Object)null)) { CharacterBody body5 = result4.healthComponent.body; if (!((Object)(object)body5 == (Object)(object)body4)) { DamageInfo val10 = new DamageInfo(); val10.damage = value.damage; val10.attacker = ((Component)attackerBody4).gameObject; val10.inflictor = ((Component)body4).gameObject; val10.position = body5.corePosition; val10.force = Vector3.zero; val10.procCoefficient = 0f; val10.crit = false; radioactiveApplyingDamage = true; body5.healthComponent.TakeDamage(val10); radioactiveApplyingDamage = false; } } } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Radioactive Hazard aura ticked."); } } foreach (CharacterMaster item2 in list2) { if ((Object)(object)item2 != (Object)null && irradiatedEnemies.ContainsKey(item2)) { RadioactiveHazardData radioactiveHazardData = irradiatedEnemies[item2]; if (radioactiveHazardData != null && (Object)(object)radioactiveHazardData.markerObject != (Object)null) { Object.Destroy((Object)(object)radioactiveHazardData.markerObject); } irradiatedEnemies.Remove(item2); } } List<CharacterMaster> list3 = new List<CharacterMaster>(); foreach (KeyValuePair<CharacterMaster, PanicData> panickedEnemy in panickedEnemies) { CharacterMaster key2 = panickedEnemy.Key; PanicData value2 = panickedEnemy.Value; if ((Object)(object)key2 == (Object)null || value2 == null || Time.time > value2.expireTime) { list3.Add(key2); continue; } CharacterBody body6 = key2.GetBody(); if ((Object)(object)body6 == (Object)null || (Object)(object)value2.attackerBody == (Object)null) { list3.Add(key2); continue; } Vector3 val11 = body6.corePosition - value2.attackerBody.corePosition; val11.y = 0f; if (val11 != Vector3.zero && (Object)(object)body6.characterMotor != (Object)null) { ((Vector3)(ref val11)).Normalize(); body6.characterMotor.velocity = val11 * body6.moveSpeed * 1.75f; } if (Time.time < value2.nextSpreadTime) { continue; } value2.nextSpreadTime = Time.time + 1f; if (value2.generation >= 3 || !Util.CheckRoll(value2.spreadChance, 0f, (CharacterMaster)null)) { continue; } CharacterBody attackerBody5 = value2.attackerBody; if ((Object)(object)attackerBody5.teamComponent == (Object)null) { continue; } TeamMask allButNeutral5 = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral5)).RemoveTeam(attackerBody5.teamComponent.teamIndex); BullseyeSearch val12 = new BullseyeSearch(); val12.teamMaskFilter = allButNeutral5; val12.filterByLoS = false; val12.searchOrigin = body6.corePosition; val12.searchDirection = Vector3.up; val12.maxDistanceFilter = value2.spreadRadius; val12.maxAngleFilter = 360f; val12.sortMode = (SortMode)1; val12.RefreshCandidates(); foreach (HurtBox result5 in val12.GetResults()) { if (!((Object)(object)result5 == (Object)null) && !((Object)(object)result5.healthComponent == (Object)null) && !((Object)(object)result5.healthComponent.body == (Object)null)) { CharacterBody body7 = result5.healthComponent.body; CharacterMaster master = body7.master; if (!((Object)(object)master == (Object)null) && !((Object)(object)master == (Object)(object)key2) && !panickedEnemies.ContainsKey(master) && (!panicImmuneEnemies.ContainsKey(master) || !(Time.time < panicImmuneEnemies[master]))) { PanicEnemy(attackerBody5, body7, master, value2.generation + 1, value2.spreadChance, value2.spreadRadius); ((BaseUnityPlugin)this).Logger.LogInfo((object)("False Alarm panic spread to: " + ((Object)body7).name)); break; } } } } foreach (CharacterMaster item3 in list3) { if (!((Object)(object)item3 != (Object)null) || !panickedEnemies.ContainsKey(item3)) { continue; } PanicData panicData = panickedEnemies[item3]; if (panicData != null) { if ((Object)(object)panicData.markerObject != (Object)null) { Object.Destroy((Object)(object)panicData.markerObject); } if ((Object)(object)panicData.aiComponent != (Object)null) { ((Behaviour)panicData.aiComponent).enabled = panicData.aiWasEnabled; } } panicImmuneEnemies[item3] = Time.time + 5f; panickedEnemies.Remove(item3); } for (int num6 = activeWorldDestroyers.Count - 1; num6 >= 0; num6--) { WorldDestroyerData worldDestroyerData = activeWorldDestroyers[num6]; if (worldDestroyerData == null) { activeWorldDestroyers.RemoveAt(num6); } else { float num7 = 5f; float num8 = Time.time - worldDestroyerData.spawnTime; float num9 = Mathf.Clamp01(num8 / num7); if ((Object)(object)worldDestroyerData.singularityObject != (Object)null) { float num10 = Mathf.Lerp(4f, 10f, num9); if (num8 >= 4.7f) { num10 = 10f; } worldDestroyerData.singularityObject.transform.localScale = Vector3.one * num10; worldDestroyerData.singularityObject.transform.Rotate(Vector3.up, 180f * Time.fixedDeltaTime); } CharacterBody attackerBody6 = worldDestroyerData.attackerBody; if ((Object)(object)attackerBody6 == (Object)null || (Object)(object)attackerBody6.teamComponent == (Object)null) { if ((Object)(object)worldDestroyerData.singularityObject != (Object)null) { Object.Destroy((Object)(object)worldDestroyerData.singularityObject); } activeWorldDestroyers.RemoveAt(num6); } else { TeamMask allButNeutral6 = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral6)).RemoveTeam(attackerBody6.teamComponent.teamIndex); BullseyeSearch val13 = new BullseyeSearch(); val13.teamMaskFilter = allButNeutral6; val13.filterByLoS = false; val13.searchOrigin = worldDestroyerData.position; val13.searchDirection = Vector3.up; val13.maxDistanceFilter = worldDestroyerData.radius; val13.maxAngleFilter = 360f; val13.sortMode = (SortMode)1; val13.RefreshCandidates(); foreach (HurtBox result6 in val13.GetResults()) { if ((Object)(object)result6 == (Object)null || (Object)(object)result6.healthComponent == (Object)null || (Object)(object)result6.healthComponent.body == (Object)null) { continue; } CharacterBody body8 = result6.healthComponent.body; if (!((Object)(object)body8.characterMotor == (Object)null)) { Vector3 val14 = worldDestroyerData.position - body8.corePosition; val14.y = 0f; if (!(val14 == Vector3.zero)) { float magnitude = ((Vector3)(ref val14)).magnitude; ((Vector3)(ref val14)).Normalize(); float num11 = Mathf.Clamp01(1f - magnitude / worldDestroyerData.radius); Vector3 val15 = val14 * worldDestroyerData.pullStrength * (0.4f + num11); body8.characterMotor.velocity = Vector3.Lerp(body8.characterMotor.velocity, val14 * worldDestroyerData.pullStrength, 0.15f); } } } if (!(Time.time < worldDestroyerData.explodeTime)) { BullseyeSearch val16 = new BullseyeSearch(); val16.teamMaskFilter = allButNeutral6; val16.filterByLoS = false; val16.searchOrigin = worldDestroyerData.position; val16.searchDirection = Vector3.up; val16.maxDistanceFilter = worldDestroyerData.radius; val16.maxAngleFilter = 360f; val16.sortMode = (SortMode)1; val16.RefreshCandidates(); int num12 = 0; foreach (HurtBox result7 in val16.GetResults()) { if (!((Object)(object)result7 == (Object)null) && !((Object)(object)result7.healthComponent == (Object)null) && !((Object)(object)result7.healthComponent.body == (Object)null)) { CharacterBody body9 = result7.healthComponent.body; DamageInfo val17 = new DamageInfo(); val17.damage = worldDestroyerData.damage; val17.attacker = ((Component)attackerBody6).gameObject; val17.inflictor = (((Object)(object)worldDestroyerData.singularityObject != (Object)null) ? worldDestroyerData.singularityObject : ((Component)attackerBody6).gameObject); val17.position = body9.corePosition; val17.force = Vector3.up * 800f; val17.procCoefficient = 0f; val17.crit = false; worldDestroyerApplyingDamage = true; body9.healthComponent.TakeDamage(val17); worldDestroyerApplyingDamage = false; num12++; } } if ((Object)(object)worldDestroyerData.singularityObject != (Object)null) { Object.Destroy((Object)(object)worldDestroyerData.singularityObject); } activeWorldDestroyers.RemoveAt(num6); ((BaseUnityPlugin)this).Logger.LogInfo((object)("World Destroyer exploded and hit " + num12 + " enemies.")); } } } } } private void ToxicVialOnDamageDealt(DamageReport damageReport) { //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: 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_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) if (damageReport == null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody victimBody = damageReport.victimBody; CharacterMaster val = (((Object)(object)damageReport.victimMaster != (Object)null) ? damageReport.victimMaster : victimBody.master); if ((Object)(object)val == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; if ((Object)(object)attackerBody == (Object)null || (Object)(object)attackerBody.inventory == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(toxicVialItem); if (itemCount <= 0) { return; } if (!toxicVialApplyingBonusDamage && toxicVialInfectedEnemies.ContainsKey(val)) { ToxicVialInfectionData toxicVialInfectionData = toxicVialInfectedEnemies[val]; if (toxicVialInfectionData != null && Time.time <= toxicVialInfectionData.expireTime && (Object)(object)victimBody.healthComponent != (Object)null && damageReport.damageInfo != null) { float damage = damageReport.damageInfo.damage * toxicVialInfectionData.damageBonus; DamageInfo val2 = new DamageInfo(); val2.damage = damage; val2.attacker = ((Component)attackerBody).gameObject; val2.inflictor = ((Component)attackerBody).gameObject; val2.position = victimBody.corePosition; val2.force = Vector3.zero; val2.procCoefficient = 0f; val2.crit = false; toxicVialApplyingBonusDamage = true; victimBody.healthComponent.TakeDamage(val2); toxicVialApplyingBonusDamage = false; } else { if (toxicVialInfectionData != null && (Object)(object)toxicVialInfectionData.markerObject != (Object)null) { Object.Destroy((Object)(object)toxicVialInfectionData.markerObject); } toxicVialInfectedEnemies.Remove(val); } } float num = 10f * (float)itemCount; if (!Util.CheckRoll(num, 0f, (CharacterMaster)null)) { return; } ToxicVialInfectionData toxicVialInfectionData2 = new ToxicVialInfectionData(); toxicVialInfectionData2.expireTime = Time.time + 6f; toxicVialInfectionData2.damageBonus = 0.1f + 0.1f * (float)itemCount; toxicVialInfectionData2.markerObject = null; if (toxicVialInfectedEnemies.ContainsKey(val)) { ToxicVialInfectionData toxicVialInfectionData3 = toxicVialInfectedEnemies[val]; if (toxicVialInfectionData3 != null && (Object)(object)toxicVialInfectionData3.markerObject != (Object)null) { Object.Destroy((Object)(object)toxicVialInfectionData3.markerObject); } } if ((Object)(object)toxicVialMarkerPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"ToxicVialMarkerPrefab is NULL."); } else if ((Object)(object)victimBody.coreTransform == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Victim coreTransform is NULL."); } else { GameObject val3 = Object.Instantiate<GameObject>(toxicVialMarkerPrefab); val3.transform.SetParent(victimBody.coreTransform); val3.transform.localPosition = new Vector3(0f, 5f, 0f); val3.transform.localRotation = Quaternion.identity; val3.transform.localScale = Vector3.one * 50f; val3.transform.localPosition = new Vector3(0f, 2f, 0f); toxicVialInfectionData2.markerObject = val3; ((BaseUnityPlugin)this).Logger.LogInfo((object)("Toxic marker spawned above: " + ((Object)victimBody).name)); } toxicVialInfectedEnemies[val] = toxicVialInfectionData2; ((BaseUnityPlugin)this).Logger.LogInfo((object)("Toxic Vial infected enemy: " + ((Object)victimBody).name)); } private void DynamiteBundleIgniteOnHit(DamageReport damageReport) { if (damageReport == null) { return; } CharacterBody attackerBody = damageReport.attackerBody; CharacterBody victimBody = damageReport.victimBody; if ((Object)(object)attackerBody == (Object)null || (Object)(object)attackerBody.inventory == (Object)null || (Object)(object)victimBody == (Object)null || (Object)(object)victimBody.master == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(dynamiteBundleItem); if (itemCount > 0) { float num = 10f * (float)itemCount; if (Util.CheckRoll(num, attackerBody.master)) { DotController.InflictDot(((Component)victimBody).gameObject, ((Component)attackerBody).gameObject, (HurtBox)null, (DotIndex)1, 4f, 1f, (uint?)null); dynamiteBurnedEnemies[victimBody.master] = attackerBody; ((BaseUnityPlugin)this).Logger.LogInfo((object)("Dynamite marked burned enemy: " + ((Object)victimBody).name)); } } } private void DynamiteBundleExplodeOnDeath(DamageReport damageReport) { //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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_0109: 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_011b: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021f: 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) if (damageReport == null || (Object)(object)damageReport.victimBody == (Object)null || (Object)(object)damageReport.victimMaster == (Object)null) { return; } CharacterMaster victimMaster = damageReport.victimMaster; if (!dynamiteBurnedEnemies.ContainsKey(victimMaster)) { return; } CharacterBody val = dynamiteBurnedEnemies[victimMaster]; dynamiteBurnedEnemies.Remove(victimMaster); if ((Object)(object)val == (Object)null || (Object)(object)val.inventory == (Object)null || (Object)(object)val.teamComponent == (Object)null) { return; } int itemCount = val.inventory.GetItemCount(dynamiteBundleItem); if (itemCount <= 0) { return; } Vector3 corePosition = damageReport.victimBody.corePosition; float maxDistanceFilter = 8f; float damage = val.damage * (1.5f + 0.5f * (float)itemCount); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Dynamite AOE explosion triggered!"); TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(val.teamComponent.teamIndex); BullseyeSearch val2 = new BullseyeSearch(); val2.teamMaskFilter = allButNeutral; val2.filterByLoS = false; val2.searchOrigin = corePosition; val2.searchDirection = Vector3.up; val2.maxDistanceFilter = maxDistanceFilter; val2.maxAngleFilter = 360f; val2.sortMode = (SortMode)1; val2.RefreshCandidates(); foreach (HurtBox result in val2.GetResults()) { if (!((Object)(object)result == (Object)null) && !((Object)(object)result.healthComponent == (Object)null)) { CharacterBody body = result.healthComponent.body; if (!((Object)(object)body == (Object)null) && !((Object)(object)body.healthComponent == (Object)null)) { DamageInfo val3 = new DamageInfo(); val3.damage = damage; val3.attacker = ((Component)val).gameObject; val3.inflictor = ((Component)val).gameObject; val3.position = body.corePosition; val3.force = Vector3.up * 800f; val3.procCoefficient = 0.5f; val3.crit = false; body.healthComponent.TakeDamage(val3); } } } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Dynamite AOE damage applied."); } private void VampireFangsHealOnCrit(DamageReport damageReport) { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (damageReport == null) { return; } CharacterBody attackerBody = damageReport.attackerBody; if (!((Object)(object)attackerBody == (Object)null) && !((Object)(object)attackerBody.inventory == (Object)null) && damageReport.damageInfo.crit) { int itemCount = attackerBody.inventory.GetItemCount(vampireFangsItem); if (itemCount > 0) { float num = 3f * (float)itemCount; attackerBody.healthComponent.Heal(num, default(ProcChainMask), true); } } } private void RazorBladeBleed(DamageReport damageReport) { if (damageReport == null) { return; } CharacterBody attackerBody = damageReport.attackerBody; CharacterBody victimBody = damageReport.victimBody; if ((Object)(object)attackerBody == (Object)null || (Object)(object)attackerBody.inventory == (Object)null || (Object)(object)victimBody == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(razorBladeItem); if (itemCount > 0) { float num = 10f * (float)itemCount; if (Util.CheckRoll(num, attackerBody.master)) { DotController.InflictDot(((Component)victimBody).gameObject, ((Component)attackerBody).gameObject, (HurtBox)null, (DotIndex)0, 3f, 1f, (uint?)null); } } } private void BloodBagHealOnKill(DamageReport damageReport) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (damageReport != null && !((Object)(object)damageReport.attackerBody == (Object)null)) { CharacterBody attackerBody = damageReport.attackerBody; int itemCount = attackerBody.inventory.GetItemCount(bloodBagItem); if (itemCount > 0) { float num = 3f * (float)itemCount; attackerBody.healthComponent.Heal(num, default(ProcChainMask), true); } } } private void CreateRedBarItem() { //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown redBarItem = ScriptableObject.CreateInstance<ItemDef>(); ((Object)redBarItem).name = "RED_BAR"; redBarItem.nameToken = "RED_BAR_NAME"; redBarItem.pickupToken = "RED_BAR_PICKUP"; redBarItem.descriptionToken = "RED_BAR_DESC"; redBarItem.loreToken = "RED_BAR_LORE"; redBarItem.tier = (ItemTier)1; redBarItem.canRemove = true; redBarItem.hidden = false; redBarItem.pickupIconSprite = LoadSpriteFromEmbeddedResource("PartySupplies.Assets.redbar_icon.png"); LanguageAPI.Add("RED_BAR_NAME", "Red Devils"); LanguageAPI.Add("RED_BAR_PICKUP", "Take the edge off."); LanguageAPI.Add("RED_BAR_DESC", "Increase <style=cIsDamage>damage</style> by <style=cIsDamage>10%</style> and <style=cIsDamage>critical strike chance</style> by <style=cIsDamage>5%</style> per stack."); LanguageAPI.Add("RED_BAR_LORE", "Calm is power."); redBarItem.pickupModelPrefab = redBarPickupPrefab; ItemAPI.Add(new CustomItem("RED_BAR", "RED_BAR_NAME", "RED_BAR_DESC", "RED_BAR_LORE", "RED_BAR_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.redbar_icon.png"), redBarPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateWorldDestroyerItem() { //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown worldDestroyerItem = ScriptableObject.CreateInstance<ItemDef>(); ((Object)worldDestroyerItem).name = "WORLD_DESTROYER"; worldDestroyerItem.nameToken = "WORLD_DESTROYER_NAME"; worldDestroyerItem.pickupToken = "WORLD_DESTROYER_PICKUP"; worldDestroyerItem.descriptionToken = "WORLD_DESTROYER_DESC"; worldDestroyerItem.loreToken = "WORLD_DESTROYER_LORE"; worldDestroyerItem.canRemove = true; worldDestroyerItem.hidden = false; LanguageAPI.Add("WORLD_DESTROYER_NAME", "World Destroyer"); LanguageAPI.Add("WORLD_DESTROYER_PICKUP", "Create unstable singularities on hit."); LanguageAPI.Add("WORLD_DESTROYER_DESC", "Every <style=cIsUtility>10th hit</style> creates a <style=cIsUtility>singularity</style> that pulls enemies inward for <style=cIsUtility>5 seconds</style>, then detonates for <style=cIsDamage>800%</style> base damage. Damage increases with stacks."); LanguageAPI.Add("WORLD_DESTROYER_LORE", "A small world. A smaller warning."); ItemAPI.Add(new CustomItem("WORLD_DESTROYER", "WORLD_DESTROYER_NAME", "WORLD_DESTROYER_DESC", "WORLD_DESTROYER_LORE", "WORLD_DESTROYER_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.worlddestroyer_icon.png"), worldDestroyerPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[2] { (ItemTag)1, (ItemTag)3 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateFalseAlarmItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown falseAlarmItem = ScriptableObject.CreateInstance<ItemDef>(); ((Object)falseAlarmItem).name = "FALSE_ALARM"; falseAlarmItem.nameToken = "FALSE_ALARM_NAME"; falseAlarmItem.pickupToken = "FALSE_ALARM_PICKUP"; falseAlarmItem.descriptionToken = "FALSE_ALARM_DESC"; falseAlarmItem.loreToken = "FALSE_ALARM_LORE"; falseAlarmItem.canRemove = true; falseAlarmItem.hidden = false; LanguageAPI.Add("FALSE_ALARM_NAME", "False Alarm"); LanguageAPI.Add("FALSE_ALARM_PICKUP", "Cause enemies to panic."); LanguageAPI.Add("FALSE_ALARM_DESC", "Gain a <style=cIsUtility>15%</style> chance on hit to <style=cIsUtility>panic</style> enemies for <style=cIsUtility>2 seconds</style>. Panicked enemies can spread panic to nearby enemies. Spread chance and radius improve with stacks."); LanguageAPI.Add("FALSE_ALARM_LORE", "Somebody always runs."); ItemAPI.Add(new CustomItem("FALSE_ALARM", "FALSE_ALARM_NAME", "FALSE_ALARM_DESC", "FALSE_ALARM_LORE", "FALSE_ALARM_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.falsealarm_icon.png"), falseAlarmPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateRadioactiveHazardItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown radioactiveHazardItem = ScriptableObject.CreateInstance<ItemDef>(); ((Object)radioactiveHazardItem).name = "RADIOACTIVE_HAZARD"; radioactiveHazardItem.nameToken = "RADIOACTIVE_HAZARD_NAME"; radioactiveHazardItem.pickupToken = "RADIOACTIVE_HAZARD_PICKUP"; radioactiveHazardItem.descriptionToken = "RADIOACTIVE_HAZARD_DESC"; radioactiveHazardItem.loreToken = "RADIOACTIVE_HAZARD_LORE"; radioactiveHazardItem.canRemove = true; radioactiveHazardItem.hidden = false; LanguageAPI.Add("RADIOACTIVE_HAZARD_NAME", "Radioactive Hazard"); LanguageAPI.Add("RADIOACTIVE_HAZARD_PICKUP", "Irradiate enemies on hit."); LanguageAPI.Add("RADIOACTIVE_HAZARD_DESC", "Gain a <style=cIsDamage>10%</style> chance to <style=cIsDamage>irradiate</style> enemies on hit. Irradiated enemies damage nearby enemies every second. If they die while irradiated, they burst and irradiate nearby enemies."); LanguageAPI.Add("RADIOACTIVE_HAZARD_LORE", "Warning signs were posted. Nobody listened."); ItemAPI.Add(new CustomItem("RADIOACTIVE_HAZARD", "RADIOACTIVE_HAZARD_NAME", "RADIOACTIVE_HAZARD_DESC", "RADIOACTIVE_HAZARD_LORE", "RADIOACTIVE_HAZARD_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.radioactivehazard_icon.png"), radioactiveHazardPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateTeslaRelayItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown teslaRelayItem = ScriptableObject.CreateInstance<ItemDef>(); ((Object)teslaRelayItem).name = "TESLA_RELAY"; teslaRelayItem.nameToken = "TESLA_RELAY_NAME"; teslaRelayItem.pickupToken = "TESLA_RELAY_PICKUP";