Decompiled source of SivsContentPack v1.3.0
plugins/SivsContentPack.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Bison; using EntityStates.BrotherMonster; using EntityStates.BrotherMonster.Weapon; using EntityStates.ClayBruiser.Weapon; using EntityStates.Duplicator; using EntityStates.Interactables.GoldBeacon; using EntityStates.LunarGolem; using EntityStates.NullifierMonster; using HG; using HarmonyLib; using Microsoft.CodeAnalysis; using On.EntityStates; using On.EntityStates.BrotherMonster; using On.EntityStates.BrotherMonster.Weapon; using On.EntityStates.Duplicator; using On.RoR2; using On.RoR2.CharacterSpeech; using On.RoR2.Projectile; using R2API; using R2API.ContentManagement; using R2API.ScriptableObjects; using RoR2; using RoR2.Achievements; using RoR2.Achievements.Artifacts; using RoR2.CharacterAI; using RoR2.CharacterSpeech; using RoR2.ExpansionManagement; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using SivsContentPack.Config; using SivsContentPack.CustomEntityStates; using SivsContentPack.CustomEntityStates.MiniConstructs; using SivsContentPack.Items; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [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("SivsContentPack")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+b140b6e1b91cd81e41973aa6e96e037b9814e7a0")] [assembly: AssemblyProduct("SivsContentPack")] [assembly: AssemblyTitle("SivsContentPack")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SivsContentPack { internal class Design : ArtifactFactory { public class DesignItemController : MonoBehaviour { public static DesignItemController instance; private void OnEnable() { if (!Object.op_Implicit((Object)(object)instance)) { instance = this; } else { Object.Destroy((Object)(object)this); } } private void OnDisable() { if ((Object)(object)instance == (Object)(object)this) { instance = null; } } public int GetItemCount(ItemDef item) { if (itemLimitDictionary.ContainsKey(((Object)item).name)) { return Math.Clamp(Run.instance.stageClearCount + 1, 0, itemLimitDictionary[((Object)item).name]); } return Run.instance.stageClearCount + 1; } } public static Dictionary<string, int> itemLimitDictionary = new Dictionary<string, int> { { "BeetleGland", 2 }, { "RoboBallBuddy", 0 }, { "OrbitingConstructs", 0 }, { "GodMode", 2 }, { "VoidEye", 10 }, { "ThunderAura", 2 } }; public static Dictionary<string, string> overrideItemDictionary = new Dictionary<string, string> { { "BrotherBody", "GodMode" }, { "TitanGoldBody", "Knurl" }, { "FalseSonBossBodyLunarShard", "ThunderAura" }, { "FalseSonBossBody", "ThunderAura" }, { "MiniVoidRaidCrabBodyPhase1", "VoidEye" }, { "MiniVoidRaidCrabBodyPhase2", "VoidEye" } }; protected override void LoadAssets(ref ArtifactDef artifactDef) { artifactDef = Assets.AssetBundles.Artifacts.LoadAsset<ArtifactDef>("adSpecializedItems"); artifactCode = Assets.AssetBundles.Artifacts.LoadAsset<ArtifactCode>("acodeSpecializedItems"); } protected override void HandleMaterials() { Material material = Assets.AssetBundles.Artifacts.LoadAsset<Material>("matDesignCore"); Materials.SubmitMaterialFix(material, "Hopoo Games/Deferred/Standard"); } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart); Run.Awake += new hook_Awake(Run_Awake); } private void Run_Awake(orig_Awake orig, Run self) { orig.Invoke(self); DesignItemController designItemController = ((Component)self).gameObject.AddComponent<DesignItemController>(); } private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Invalid comparison between Unknown and I4 //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, body); if (!RunArtifactManager.instance.IsArtifactEnabled(Content.Artifacts.EnemySpecializedItems) || !((Object)(object)DesignItemController.instance != (Object)null)) { return; } TeamComponent teamComponent = body.teamComponent; if (!((Object)(object)teamComponent != (Object)null) || (int)teamComponent.teamIndex == 1) { return; } DeathRewards component = ((Component)body).GetComponent<DeathRewards>(); if ((Object)(object)component != (Object)null) { PickupDropTable bossDropTable = component.bossDropTable; ExplicitPickupDropTable val = (ExplicitPickupDropTable)(object)((bossDropTable is ExplicitPickupDropTable) ? bossDropTable : null); if ((Object)(object)val != (Object)null) { PickupDefEntry[] pickupEntries = val.pickupEntries; foreach (PickupDefEntry val2 in pickupEntries) { Object pickupDef = val2.pickupDef; ItemDef val3 = (ItemDef)(object)((pickupDef is ItemDef) ? pickupDef : null); if (!((Object)(object)val3 != (Object)null)) { continue; } bool flag = val3.ContainsTag((ItemTag)4); int itemCount = DesignItemController.instance.GetItemCount(val3); if (itemCount > 0 && !flag) { Debug.LogFormat("Design: Drop table found. Granting {0} {1} of item {2}.", new object[3] { ((Component)body).gameObject, itemCount, ((Object)val3).name }); Inventory inventory = body.inventory; if ((Object)(object)inventory != (Object)null) { inventory.GiveItem(val3, itemCount); } } } } } string key = ((Object)((Component)body).gameObject).name.Replace("(Clone)", ""); if (!overrideItemDictionary.ContainsKey(key)) { return; } ItemDef itemDef = ItemCatalog.GetItemDef(ItemCatalog.itemNameToIndex[overrideItemDictionary[key]]); if (!((Object)(object)itemDef != (Object)null)) { return; } bool flag2 = itemDef.ContainsTag((ItemTag)4); int itemCount2 = DesignItemController.instance.GetItemCount(itemDef); if (itemCount2 > 0 && !flag2) { Debug.LogFormat("Design: Body override found. Granting {0} {1} of item {2}.", new object[3] { ((Component)body).gameObject, itemCount2, ((Object)itemDef).name }); Inventory inventory2 = body.inventory; if ((Object)(object)inventory2 != (Object)null) { inventory2.GiveItem(itemDef, itemCount2); } } } } public static class Assets { public static class AssetBundles { public static AssetBundle Main; public static AssetBundle Items; public static AssetBundle Elites; public static AssetBundle Artifacts; public static AssetBundle Objects; public static AssetBundle Champions; } public const string assetBundleFolder = "Assets"; public static string AssetBundlePath(string bundleName) { return Path.Combine(Path.GetDirectoryName(SivsContentPack.PInfo.Location), "Assets", bundleName); } public static void Init() { AssetBundles.Main = AssetBundle.LoadFromFile(AssetBundlePath("sivscontentpack_main")); AssetBundles.Items = AssetBundle.LoadFromFile(AssetBundlePath("sivscontentpack_items")); AssetBundles.Elites = AssetBundle.LoadFromFile(AssetBundlePath("sivscontentpack_elites")); AssetBundles.Artifacts = AssetBundle.LoadFromFile(AssetBundlePath("sivscontentpack_artifacts")); AssetBundles.Objects = AssetBundle.LoadFromFile(AssetBundlePath("sivscontentpack_objects")); AssetBundles.Champions = AssetBundle.LoadFromFile(AssetBundlePath("sivscontentpack_champions")); } } public class AffixBlack : BuffFactory { private class AffixBlackController : ItemBehavior { private void FixedUpdate() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: 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_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_0142: Expected O, but got Unknown if (base.stack > 0 && NetworkServer.active && Object.op_Implicit((Object)(object)base.body)) { if (!base.body.HasBuff(Buffs.Cloak) && base.body.outOfCombat && base.body.outOfDanger) { Util.PlaySound("Play_elite_haunt_ghost_convert", ((Component)base.body).gameObject); Object.Instantiate<GameObject>(cloakActiveEffect, base.body.transform.position, base.body.transform.rotation); base.body.AddBuff(Buffs.Cloak); } else if (base.body.HasBuff(Buffs.Cloak) && (!base.body.outOfCombat || !base.body.outOfDanger)) { EffectData val = new EffectData { origin = base.body.transform.position, rotation = base.body.transform.rotation, start = base.body.transform.position }; EffectManager.SpawnEffect(Content.Effects.ShadowCloakBreak.prefab, val, true); base.body.RemoveBuff(Buffs.Cloak); } } } private void OnDisable() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown if (base.body.HasBuff(Buffs.Cloak)) { EffectData val = new EffectData { origin = base.body.transform.position, rotation = base.body.transform.rotation, start = base.body.transform.position }; EffectManager.SpawnEffect(Content.Effects.ShadowCloakBreak.prefab, val, true); base.body.RemoveBuff(Buffs.Cloak); } } } public static GameObject cloakActiveEffect; protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Elites.LoadAsset<BuffDef>("bdEliteShadow"); cloakActiveEffect = Assets.AssetBundles.Elites.LoadAsset<GameObject>("ShadowCloakEffect"); } protected override bool CheckIfEnabled() { return Configuration.Elites.Obscuring.enabled.Value; } protected override void HandleMaterials() { Material material = Assets.AssetBundles.Elites.LoadAsset<Material>("matShadowCloak"); Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap"); material = Assets.AssetBundles.Elites.LoadAsset<Material>("matShadowTracer"); Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap"); material = Assets.AssetBundles.Items.LoadAsset<Material>("matDistortion"); Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Distortion"); } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy); CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged); } private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self) { if ((Object)(object)self != (Object)null) { self.AddItemBehavior<AffixBlackController>(self.HasBuff(Content.Buffs.AffixShadow) ? 1 : 0); } orig.Invoke(self); } private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { orig.Invoke(self, damageInfo, victim); GameObject attacker = damageInfo.attacker; if (!((Object)(object)attacker != (Object)null)) { return; } CharacterBody component = attacker.GetComponent<CharacterBody>(); if ((Object)(object)component != (Object)null && component.HasBuff(Content.Buffs.AffixShadow)) { CharacterBody component2 = victim.GetComponent<CharacterBody>(); if ((Object)(object)component2 != (Object)null) { component2.AddTimedBuff(Buffs.Blinded, Configuration.Elites.Obscuring.blindnessDuration * damageInfo.procCoefficient); } } } } public class AffixUnstable : BuffFactory { private class AffixUnstableController : ItemBehavior { private float fireballTimer; private int fireballsToLaunch; private float launchInterval; private void Start() { fireballTimer = Configuration.Elites.Unstable.fireballInterval; } private void FixedUpdate() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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) if (fireballTimer <= 0f) { if (fireballsToLaunch > 0) { if (launchInterval <= 0f) { if (fireballsToLaunch > 0) { FireProjectileInfo val = default(FireProjectileInfo); val.owner = ((Component)base.body).gameObject; val.crit = base.body.RollCrit(); val.damage = base.body.damage * Configuration.Elites.Unstable.fireBallDamageCoefficient; val.position = base.body.corePosition; val.rotation = Util.QuaternionSafeLookRotation(Vector3.up + Random.insideUnitSphere * 0.5f); val.projectilePrefab = Content.Misc.EliteUnstableFireball; val.procChainMask = default(ProcChainMask); FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); fireballsToLaunch--; launchInterval = Configuration.Elites.Unstable.fireballInterval * 0.05f; if (fireballsToLaunch <= 0) { fireballTimer = Configuration.Elites.Unstable.fireballInterval; } } } else { launchInterval -= Time.deltaTime; } } else { fireballsToLaunch = Configuration.Elites.Unstable.fireBallCount; launchInterval = Configuration.Elites.Unstable.fireballInterval * 0.05f; } } else { fireballTimer -= Time.deltaTime; } } } protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Elites.LoadAsset<BuffDef>("bdEliteUnstable"); Content.Misc.EliteUnstableFireball = Assets.AssetBundles.Elites.LoadAsset<GameObject>("EliteUnstableFireball"); ContentAddition.AddProjectile(Content.Misc.EliteUnstableFireball); } protected override bool CheckIfEnabled() { return Configuration.Elites.Unstable.enabled.Value; } protected override void HandleMaterials() { Material material = Assets.AssetBundles.Elites.LoadAsset<Material>("matUnstableFireball"); Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Cloud Remap"); material = Assets.AssetBundles.Elites.LoadAsset<Material>("matUnstableLightshaft"); Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Cloud Remap"); } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); CharacterBody.OnClientBuffsChanged += new hook_OnClientBuffsChanged(CharacterBody_OnClientBuffsChanged); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Content.Buffs.AffixUnstable)) { args.damageMultAdd += Configuration.Elites.Unstable.damageMult; args.baseCurseAdd += Configuration.Elites.Unstable.healthMult; } } private void CharacterBody_OnClientBuffsChanged(orig_OnClientBuffsChanged orig, CharacterBody self) { orig.Invoke(self); self.AddItemBehavior<AffixUnstableController>(self.HasBuff(Content.Buffs.AffixUnstable) ? 1 : 0); } } public class AffixTar : BuffFactory { public class TarLifeStealOrb : GenericDamageOrb { public override GameObject GetOrbEffect() { return Content.Effects.TarLifeStealOrb.prefab; } public override void OnArrival() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Orb)this).target != (Object)null) { HealthComponent healthComponent = ((Orb)this).target.healthComponent; if ((Object)(object)healthComponent != (Object)null && healthComponent.alive) { healthComponent.Heal(base.damageValue * Configuration.Elites.Tar.lifeStealCoefficient, base.procChainMask, true); } } } } public class EliteTarController : ItemBehavior { private GameObject bodyAttachmentInstance; private void OnEnable() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)bodyAttachmentInstance)) { bodyAttachmentInstance = Object.Instantiate<GameObject>(bodyAttachment, ((Component)this).gameObject.transform); NetworkedBodyAttachment component = bodyAttachmentInstance.GetComponent<NetworkedBodyAttachment>(); EntityStateMachine.FindByCustomName(bodyAttachmentInstance, "Main").initialStateType = Content.SerializableEntityStates.EntityStateDictionary["TarBodyAttachmentState"]; EntityStateMachine.FindByCustomName(bodyAttachmentInstance, "Main").mainStateType = Content.SerializableEntityStates.EntityStateDictionary["TarBodyAttachmentState"]; if ((Object)(object)component != (Object)null) { component.AttachToGameObjectAndSpawn(((Component)this).gameObject, (string)null); } } } private void OnDisable() { if (Object.op_Implicit((Object)(object)bodyAttachmentInstance)) { Object.Destroy((Object)(object)bodyAttachmentInstance); } } } public static Material tarOverlayMaterial; public static Material tarParticleReplacementMaterial; public static GameObject bodyAttachment; private static readonly Color tarEliteLightColor = Color32.op_Implicit(new Color32((byte)170, (byte)89, (byte)59, (byte)204)); protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Elites.LoadAsset<BuffDef>("bdEliteTar"); bodyAttachment = Assets.AssetBundles.Elites.LoadAsset<GameObject>("TarDripBodyAttachment"); } protected override bool CheckIfEnabled() { return Configuration.Elites.Tank.enabled.Value; } protected override void HandleMaterials() { tarOverlayMaterial = Assets.AssetBundles.Elites.LoadAsset<Material>("matEliteTarOverlay"); Materials.SubmitMaterialFix(tarOverlayMaterial, "Hopoo Games/FX/Opaque Cloud Remap"); Material material = Assets.AssetBundles.Elites.LoadAsset<Material>("matTarDroplet"); Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap"); tarParticleReplacementMaterial = Assets.AssetBundles.Elites.LoadAsset<Material>("matEliteTarParticleReplacement"); Materials.SubmitMaterialFix(tarParticleReplacementMaterial, "Hopoo Games/FX/Opaque Cloud Remap"); } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy); CharacterModel.UpdateRendererMaterials += new hook_UpdateRendererMaterials(CharacterModel_UpdateRendererMaterials); CharacterBody.OnClientBuffsChanged += new hook_OnClientBuffsChanged(CharacterBody_OnClientBuffsChanged); CharacterModel.InstanceUpdate += new hook_InstanceUpdate(CharacterModel_InstanceUpdate); } private void CharacterModel_InstanceUpdate(orig_InstanceUpdate orig, CharacterModel self) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); CharacterBody body = self.body; if (Object.op_Implicit((Object)(object)body) && body.HasBuff(Content.Buffs.AffixTar)) { self.particleMaterialOverride = tarParticleReplacementMaterial; self.lightColorOverride = tarEliteLightColor; } } private void CharacterModel_UpdateRendererMaterials(orig_UpdateRendererMaterials orig, CharacterModel self, Renderer renderer, Material defaultMaterial, bool ignoreOverlays) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Invalid comparison between Unknown and I4 orig.Invoke(self, renderer, defaultMaterial, ignoreOverlays); CharacterBody body = self.body; if (Object.op_Implicit((Object)(object)body) && body.HasBuff(Content.Buffs.AffixTar) && (int)self.visibility == 3 && !ignoreOverlays) { Material[] sharedMaterials = renderer.sharedMaterials; ArrayUtils.ArrayAppend<Material>(ref sharedMaterials, ref tarOverlayMaterial); renderer.sharedMaterials = sharedMaterials; } } private void CharacterBody_OnClientBuffsChanged(orig_OnClientBuffsChanged orig, CharacterBody self) { orig.Invoke(self); self.AddItemBehavior<EliteTarController>(self.HasBuff(Content.Buffs.AffixTar) ? 1 : 0); } private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0082: 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) //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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo, victim); GameObject attacker = damageInfo.attacker; if (!((Object)(object)attacker != (Object)null)) { return; } CharacterBody component = attacker.GetComponent<CharacterBody>(); if ((Object)(object)component != (Object)null && component.HasBuff(Content.Buffs.AffixTar)) { CharacterBody component2 = victim.GetComponent<CharacterBody>(); if ((Object)(object)component2 != (Object)null) { component2.AddTimedBuff(Buffs.ClayGoo, Configuration.Elites.Tar.tarDuration); } if (!((ProcChainMask)(ref damageInfo.procChainMask)).HasProc(Content.ProcTypes.eliteTarLifesteal)) { ((ProcChainMask)(ref damageInfo.procChainMask)).AddProc(Content.ProcTypes.eliteTarLifesteal); OrbManager.instance.AddOrb((Orb)(object)new TarLifeStealOrb { attacker = attacker, damageValue = damageInfo.damage * damageInfo.procCoefficient, origin = damageInfo.position, procChainMask = damageInfo.procChainMask, target = component.mainHurtBox, procCoefficient = 0f, isCrit = false }); } } } } public class ShadowCloak : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Elites.LoadAsset<BuffDef>("bdShadowCloak"); } protected override void HandleMaterials() { Material material = Assets.AssetBundles.Elites.LoadAsset<Material>("matShadowCloak"); Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Cloud Remap"); material = Assets.AssetBundles.Elites.LoadAsset<Material>("matShadowTracer"); Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Cloud Remap"); } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterBody.GetVisibilityLevel_TeamIndex += new hook_GetVisibilityLevel_TeamIndex(CharacterBody_GetVisibilityLevel_TeamIndex); } private VisibilityLevel CharacterBody_GetVisibilityLevel_TeamIndex(orig_GetVisibilityLevel_TeamIndex orig, CharacterBody self, TeamIndex observerTeam) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (self.teamComponent.teamIndex != observerTeam && self.HasBuff(Content.Buffs.DarknessCamo)) { return (VisibilityLevel)1; } return orig.Invoke(self, observerTeam); } } public class LunarCorruption : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdLunarCorruption"); } protected override void HandleMaterials() { } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); CharacterMaster.GiveExperience += new hook_GiveExperience(CharacterMaster_GiveExperience); } private void CharacterMaster_GiveExperience(orig_GiveExperience orig, CharacterMaster self, ulong amount) { GameObject bodyObject = self.GetBodyObject(); if ((Object)(object)bodyObject != (Object)null) { CharacterBody component = bodyObject.GetComponent<CharacterBody>(); if ((Object)(object)component != (Object)null) { int buffCount = component.GetBuffCount(Content.Buffs.LunarCorruption); if (buffCount > 0) { amount *= (ulong)(1f - Configuration.Items.LunarRosary.LunarCorruption.experienceGainPenalty * (float)buffCount); } } } orig.Invoke(self, amount); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Content.Buffs.LunarCorruption)) { int buffCount = sender.GetBuffCount(Content.Buffs.LunarCorruption); args.baseCurseAdd += sender.maxHealth * ((float)buffCount * Configuration.Items.LunarRosary.LunarCorruption.healthPenalty) / 100f; args.moveSpeedReductionMultAdd += (float)buffCount * Configuration.Items.LunarRosary.LunarCorruption.movementPenalty; args.damageMultAdd -= (float)buffCount * Configuration.Items.LunarRosary.LunarCorruption.movementPenalty; args.primaryCooldownMultAdd += Configuration.Items.LunarRosary.LunarCorruption.cooldownPenalty * (float)buffCount; args.secondaryCooldownMultAdd += Configuration.Items.LunarRosary.LunarCorruption.cooldownPenalty * (float)buffCount; args.utilityCooldownMultAdd += Configuration.Items.LunarRosary.LunarCorruption.cooldownPenalty * (float)buffCount; args.specialCooldownMultAdd += Configuration.Items.LunarRosary.LunarCorruption.cooldownPenalty * (float)buffCount; } } } public class FullyCorrupted : BuffFactory { private static Material corruptionOverlay; protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdFullyCorrupted"); } protected override void HandleMaterials() { corruptionOverlay = Assets.AssetBundles.Items.LoadAsset<Material>("matCorruptionOverlay"); Materials.SubmitMaterialFix(corruptionOverlay, "Hopoo Games/FX/Cloud Remap"); } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); CharacterMaster.GiveExperience += new hook_GiveExperience(CharacterMaster_GiveExperience); CharacterMaster.OnInventoryChanged += new hook_OnInventoryChanged(CharacterMaster_OnInventoryChanged); CharacterModel.UpdateRendererMaterials += new hook_UpdateRendererMaterials(CharacterModel_UpdateRendererMaterials); CharacterBody.OnBuffFinalStackLost += new hook_OnBuffFinalStackLost(CharacterBody_OnBuffFinalStackLost); CharacterBody.OnBuffFirstStackGained += new hook_OnBuffFirstStackGained(CharacterBody_OnBuffFirstStackGained); } private void CharacterMaster_GiveExperience(orig_GiveExperience orig, CharacterMaster self, ulong amount) { GameObject bodyObject = self.GetBodyObject(); if ((Object)(object)bodyObject != (Object)null) { CharacterBody component = bodyObject.GetComponent<CharacterBody>(); if ((Object)(object)component != (Object)null) { int buffCount = component.GetBuffCount(Content.Buffs.LunarCorruption); if (buffCount > 0) { amount *= (ulong)(1f + Configuration.Items.LunarRosary.FullyCorrupted.experienceGainBonus * (float)buffCount); } } } orig.Invoke(self, amount); } private void CharacterMaster_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterMaster self) { orig.Invoke(self); GameObject bodyObject = self.GetBodyObject(); if (!((Object)(object)bodyObject != (Object)null)) { return; } CharacterBody component = bodyObject.GetComponent<CharacterBody>(); if ((Object)(object)component != (Object)null && component.HasBuff(Content.Buffs.FullyCorrupted)) { LunarRosary.LunarRosaryController component2 = bodyObject.GetComponent<LunarRosary.LunarRosaryController>(); if ((Object)(object)component2 != (Object)null) { int corruptionCap = component2.corruptionCap; float num = Configuration.Items.LunarRosary.FullyCorrupted.luckBonus * (float)corruptionCap; self.luck += num; } } } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Content.Buffs.FullyCorrupted)) { LunarRosary.LunarRosaryController component = ((Component)sender).GetComponent<LunarRosary.LunarRosaryController>(); if ((Object)(object)component != (Object)null) { int corruptionCap = component.corruptionCap; args.damageMultAdd += Configuration.Items.LunarRosary.FullyCorrupted.damageBonus * (float)corruptionCap; args.moveSpeedMultAdd += Configuration.Items.LunarRosary.FullyCorrupted.movementBonus * (float)corruptionCap; args.healthMultAdd += Configuration.Items.LunarRosary.FullyCorrupted.healthBonus * (float)corruptionCap; args.primaryCooldownMultAdd -= Configuration.Items.LunarRosary.FullyCorrupted.cooldownBonus * (float)corruptionCap; args.secondaryCooldownMultAdd -= Configuration.Items.LunarRosary.FullyCorrupted.cooldownBonus * (float)corruptionCap; args.utilityCooldownMultAdd -= Configuration.Items.LunarRosary.FullyCorrupted.cooldownBonus * (float)corruptionCap; args.specialCooldownMultAdd -= Configuration.Items.LunarRosary.FullyCorrupted.cooldownBonus * (float)corruptionCap; } } } private void CharacterBody_OnBuffFirstStackGained(orig_OnBuffFirstStackGained orig, CharacterBody self, BuffDef buffDef) { orig.Invoke(self, buffDef); if (!((Object)(object)buffDef == (Object)(object)Content.Buffs.FullyCorrupted)) { return; } CharacterMaster master = self.master; if ((Object)(object)master != (Object)null) { LunarRosary.LunarRosaryController component = ((Component)self).GetComponent<LunarRosary.LunarRosaryController>(); if ((Object)(object)component != (Object)null) { int corruptionCap = component.corruptionCap; float num = Configuration.Items.LunarRosary.FullyCorrupted.luckBonus * (float)corruptionCap; master.luck += num; } } ModelLocator modelLocator = self.modelLocator; if (!((Object)(object)modelLocator != (Object)null)) { return; } Transform modelTransform = modelLocator.modelTransform; if ((Object)(object)modelTransform != (Object)null) { CharacterModel component2 = ((Component)modelTransform).GetComponent<CharacterModel>(); if ((Object)(object)component2 != (Object)null) { component2.materialsDirty = true; } } } private void CharacterBody_OnBuffFinalStackLost(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown orig.Invoke(self, buffDef); if (!((Object)(object)buffDef == (Object)(object)Content.Buffs.FullyCorrupted)) { return; } float scale = 1f; ModelLocator modelLocator = self.modelLocator; if ((Object)(object)modelLocator != (Object)null) { scale = modelLocator.modelScaleCompensation; } EffectData val = new EffectData { origin = self.coreTransform.position, start = self.coreTransform.position, rootObject = ((Component)self).gameObject, scale = scale, rotation = Quaternion.identity }; EffectManager.SpawnEffect(Content.Effects.CorruptionLifts.prefab, val, true); CharacterMaster master = self.master; if ((Object)(object)master != (Object)null) { LunarRosary.LunarRosaryController component = ((Component)self).GetComponent<LunarRosary.LunarRosaryController>(); if ((Object)(object)component != (Object)null) { int corruptionCap = component.corruptionCap; float num = Configuration.Items.LunarRosary.FullyCorrupted.luckBonus * (float)corruptionCap; master.luck -= num; } } if (!((Object)(object)modelLocator != (Object)null)) { return; } Transform modelTransform = modelLocator.modelTransform; if ((Object)(object)modelTransform != (Object)null) { CharacterModel component2 = ((Component)modelTransform).GetComponent<CharacterModel>(); if ((Object)(object)component2 != (Object)null) { component2.materialsDirty = true; } } } private void CharacterModel_UpdateRendererMaterials(orig_UpdateRendererMaterials orig, CharacterModel self, Renderer renderer, Material defaultMaterial, bool ignoreOverlays) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Invalid comparison between Unknown and I4 orig.Invoke(self, renderer, defaultMaterial, ignoreOverlays); CharacterBody body = self.body; if (Object.op_Implicit((Object)(object)body) && body.HasBuff(Content.Buffs.FullyCorrupted) && (int)self.visibility == 3 && !ignoreOverlays) { Material[] sharedMaterials = renderer.sharedMaterials; ArrayUtils.ArrayAppend<Material>(ref sharedMaterials, ref corruptionOverlay); renderer.sharedMaterials = sharedMaterials; } } } public class EliteTankArmorBonus : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Elites.LoadAsset<BuffDef>("bdEliteTankArmorBonus"); } protected override void HandleMaterials() { } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender)) { args.armorAdd += (float)sender.GetBuffCount(Content.Buffs.TankArmorBonus) * Configuration.Elites.Tank.armorBonus; } } } public class GeodeArmor : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bgGeodeArmor"); } protected override void Hooks() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown base.Hooks(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (!sender.HasBuff(Content.Buffs.GeodeArmor)) { return; } Inventory inventory = sender.inventory; if ((Object)(object)inventory != (Object)null) { int itemCount = inventory.GetItemCount(Content.Items.Geode); if (itemCount > 0) { args.armorAdd += Util.GetStackingBehavior(Configuration.Items.Geode.armorBonus, Configuration.Items.Geode.armorStack, itemCount); args.baseRegenAdd += Util.GetStackingBehavior(Configuration.Items.Geode.regenMult, Configuration.Items.Geode.regenMultStack, itemCount); } } } } public class BeetlePlushRegen : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("buffBeetlePlushRegenBonus"); } protected override void Hooks() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown base.Hooks(); CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); if (self.HasBuff(Content.Buffs.BeetleRegen)) { BeetlePlush.BeetlePlushBehaviourController component = ((Component)self).gameObject.GetComponent<BeetlePlush.BeetlePlushBehaviourController>(); if ((Object)(object)component != (Object)null) { int alliesNearby = component.alliesNearby; self.regen += Configuration.Items.BeetlePlush.regenBonus * (float)self.GetBuffCount(Content.Buffs.BeetleRegen); } } } } public class DeathImmunityBuff : BuffFactory { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static EffectCondition <>9__1_0; internal bool <LoadAssets>b__1_0(CharacterBody target) { return target.HasBuff(Content.Buffs.DeathImmunity); } } protected static GameObject tempEffect; protected override void LoadAssets(ref BuffDef buffDef) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdDeathImmunity"); tempEffect = Assets.AssetBundles.Items.LoadAsset<GameObject>("DeathImmunityEffect"); GameObject obj = tempEffect; object obj2 = <>c.<>9__1_0; if (obj2 == null) { EffectCondition val = (CharacterBody target) => target.HasBuff(Content.Buffs.DeathImmunity); <>c.<>9__1_0 = val; obj2 = (object)val; } TempVisualEffectAPI.AddTemporaryVisualEffect(obj, (EffectCondition)obj2, true, ""); } protected override void HandleMaterials() { Material material = Assets.AssetBundles.Items.LoadAsset<Material>("matAngelFeather"); Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Cloud Remap"); } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess); GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(GlobalEventManager_OnCharacterDeath); } private void GlobalEventManager_OnCharacterDeath(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageReport); CharacterBody attackerBody = damageReport.attackerBody; if (!((Object)(object)attackerBody != (Object)null) || !attackerBody.HasBuff(Content.Buffs.DeathImmunity)) { return; } foreach (TimedBuff timedBuff in attackerBody.timedBuffs) { if (timedBuff.buffIndex == Content.Buffs.DeathImmunity.buffIndex) { timedBuff.timer += Configuration.Items.DeathImmunity.buffExtension; } } } private void HealthComponent_TakeDamageProcess(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { CharacterBody body = self.body; if ((Object)(object)body != (Object)null && body.HasBuff(Content.Buffs.DeathImmunity)) { damageInfo.damage = Mathf.Clamp(damageInfo.damage, 0f, self.combinedHealth - 1f); } orig.Invoke(self, damageInfo); } } public class BossKillFrenzy : BuffFactory { private Material overlayMat; protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdFrenzyOnBossKill"); } protected override void HandleMaterials() { overlayMat = Assets.AssetBundles.Items.LoadAsset<Material>("matFrenzyOnBossKillOverlay"); Materials.SubmitMaterialFix(overlayMat, "Hopoo Games/FX/Cloud Remap"); } protected override void Hooks() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown base.Hooks(); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); CharacterModel.UpdateRendererMaterials += new hook_UpdateRendererMaterials(CharacterModel_UpdateRendererMaterials); CharacterBody.OnBuffFirstStackGained += new hook_OnBuffFirstStackGained(CharacterBody_OnBuffFirstStackGained); CharacterBody.OnBuffFinalStackLost += new hook_OnBuffFinalStackLost(CharacterBody_OnBuffFinalStackLost); CharacterMaster.OnInventoryChanged += new hook_OnInventoryChanged(CharacterMaster_OnInventoryChanged); } private void CharacterModel_UpdateRendererMaterials(orig_UpdateRendererMaterials orig, CharacterModel self, Renderer renderer, Material defaultMaterial, bool ignoreOverlays) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Invalid comparison between Unknown and I4 orig.Invoke(self, renderer, defaultMaterial, ignoreOverlays); CharacterBody body = self.body; if (Object.op_Implicit((Object)(object)body) && body.HasBuff(Content.Buffs.BossKillFrenzy) && (int)self.visibility == 3 && !ignoreOverlays) { Material[] sharedMaterials = renderer.sharedMaterials; ArrayUtils.ArrayAppend<Material>(ref sharedMaterials, ref overlayMat); renderer.sharedMaterials = sharedMaterials; } } private void CharacterMaster_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterMaster self) { orig.Invoke(self); CharacterBody body = self.GetBody(); if ((Object)(object)body != (Object)null && body.HasBuff(Content.Buffs.BossKillFrenzy)) { self.luck += Configuration.Items.FrenzyOnBossKill.luckBonus; } } private void CharacterBody_OnBuffFinalStackLost(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef) { orig.Invoke(self, buffDef); if ((Object)(object)buffDef == (Object)(object)Content.Buffs.BossKillFrenzy) { CharacterMaster master = self.master; if ((Object)(object)master != (Object)null) { master.luck -= Configuration.Items.FrenzyOnBossKill.luckBonus; } } } private void CharacterBody_OnBuffFirstStackGained(orig_OnBuffFirstStackGained orig, CharacterBody self, BuffDef buffDef) { orig.Invoke(self, buffDef); if ((Object)(object)buffDef == (Object)(object)Content.Buffs.BossKillFrenzy) { CharacterMaster master = self.master; if ((Object)(object)master != (Object)null) { master.luck += Configuration.Items.FrenzyOnBossKill.luckBonus; } } } private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown CharacterBody body = self.body; if ((Object)(object)body != (Object)null && body.HasBuff(Content.Buffs.BossKillFrenzy)) { EffectData val = new EffectData { origin = damageInfo.position, start = damageInfo.position, rotation = Util.QuaternionSafeLookRotation((damageInfo.force != Vector3.zero) ? damageInfo.force : Random.onUnitSphere) }; EffectManager.SpawnEffect(AssetReferences.damageRejectedPrefab, val, true); damageInfo.rejected = true; } orig.Invoke(self, damageInfo); } } public class TimeSlowed : BuffFactory { private Material overlayMat; protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdSlowTime"); } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Content.Buffs.SlowedTime)) { args.moveSpeedReductionMultAdd += Configuration.Items.SlowTime.speedMult; args.attackSpeedReductionMultAdd += Configuration.Items.SlowTime.speedMult; } } } public class Grief : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdGrief"); } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Content.Buffs.Grief)) { args.damageMultAdd += Configuration.Items.GriefFlower.damageMult; args.armorAdd += Configuration.Items.GriefFlower.armorBoost; args.regenMultAdd += Configuration.Items.GriefFlower.regenMult; args.moveSpeedMultAdd += Configuration.Items.GriefFlower.moveSpeedMult; args.attackSpeedMultAdd += Configuration.Items.GriefFlower.attackSpeedMult; } } } public class MiniWispStock : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdWispOnHit"); } } public class BisonShieldActive : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("BisonShieldReady"); } } public class BisonShieldCooldown : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("BisonShieldCooldown"); } } public class MeleeAttackSpeedBuff : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdMeleeAttackSpeed"); } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Content.Buffs.MeleeAttackSpeed)) { Inventory inventory = sender.inventory; if ((Object)(object)inventory != (Object)null) { int itemCount = inventory.GetItemCount(Content.Items.MeleeAttackSpeed); float stackingBehavior = Util.GetStackingBehavior(Configuration.Items.MeleeAttackSpeed.attackSpeedMult, Configuration.Items.MeleeAttackSpeed.attackSpeedMultStack, itemCount); args.attackSpeedMultAdd += stackingBehavior; } } } } public class NullSeedActive : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdNullSeedReady"); } } public class NullSeedCooldown : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdNullSeedCooldown"); } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterBody.OnBuffFinalStackLost += new hook_OnBuffFinalStackLost(CharacterBody_OnBuffFinalStackLost); } private void CharacterBody_OnBuffFinalStackLost(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef) { orig.Invoke(self, buffDef); if ((Object)(object)buffDef == (Object)(object)Content.Buffs.NullSeedCooldown) { Inventory inventory = self.inventory; if ((Object)(object)inventory != (Object)null && inventory.GetItemCount(Content.Items.NullSeed) > 0) { self.AddBuff(Content.Buffs.NullSeedActive); } } } } public class StoredLunarCoin : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("BisonShieldCooldown"); } } public class ArmorZone : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdArmorZone"); } protected override void Hooks() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown base.Hooks(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Content.Buffs.ArmorZone)) { float armorBonus = TeleporterArmorZone.HoldOutArmorZoneController.armorBonus; args.armorAdd += armorBonus; } } } public class TarbineBuff : BuffFactory { protected override void LoadAssets(ref BuffDef buffDef) { buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdTarbineActive"); } } public static class CommonHooks { } public static class Content { public struct AddressablePickupPair { [TypeRestrictedReference(new Type[] { typeof(ItemDef), typeof(EquipmentDef), typeof(MiscPickupDef) })] public Object pickupDef; public string objectAddress; } public struct PendingArtifactCode { public ArtifactDef artifactDef; public ArtifactCode codeAsset; } public struct PendingItemPair { public ItemDef item1; public ItemDef item2; public ItemRelationshipType relationshipType; } public struct PendingSpawnCard { public SpawnCard card; public List<string> sceneInfoAddresses; } public static class Characters { public static GameObject DocBody; public static GameObject DocMaster; public static GameObject MarbleGolemBody; public static GameObject MarbleGolemMaster; public static GameObject SuperBeetleBody; public static GameObject SuperBeetleMaster; public static GameObject AnimaBody; public static GameObject AnimaMaster; public static void Init() { } } public static class Survivors { public static SurvivorDef Doc; public static SurvivorDef Reaper; public static SurvivorDef King; public static SurvivorDef Imp; public static SurvivorDef Devotee; public static SurvivorDef Anima; } public static class SpawnCards { } public static class Champions { [CompilerGenerated] private static class <>O { public static hook_OnBodyStart <0>__CharacterMaster_OnBodyStart; public static hook_Start <1>__CharacterMaster_Start; } public static DirectorCardCategorySelection dccsChampions; public static GameObject halcyoniteArmoredMaster; public static CharacterSpawnCard iscHalcyoniteArmoredMaster; public static GameObject killerBeetleMaster; public static CharacterSpawnCard iscKillerBeetle; public static GameObject jellyTankMaster; public static CharacterSpawnCard iscJellyTank; public static GameObject kjaroMaster; public static CharacterSpawnCard iscKjaro; public static GameObject runaldMaster; public static CharacterSpawnCard iscRunald; public static GameObject shadowRingMaster; public static CharacterSpawnCard iscShadowRing; public static GameObject smiterMaster; public static CharacterSpawnCard iscSmiter; public static GameObject miniWorshipUnitMaster; public static CharacterSpawnCard iscMiniWorshipUnit; public static GameObject redBaronMaster; public static CharacterSpawnCard iscRedBaron; public static GameObject deathUrchinMaster; public static CharacterSpawnCard iscDeathUrchin; public static GameObject sniperHermitMaster; public static CharacterSpawnCard iscSniperHermit; public static GameObject hereticMaster; public static CharacterSpawnCard iscHeretic; public static GameObject aurelioniteMaster; public static CharacterSpawnCard iscAurelionite; public static string GetChampionSubtitle(ChampionType type) { return type switch { ChampionType.Lunar => "CHAMPION_SUBTITLE_LUNAR", ChampionType.Imp => "CHAMPION_SUBTITLE_IMP", ChampionType.Void => "CHAMPION_SUBTITLE_VOID", ChampionType.Heretic => "CHAMPION_SUBTITLE_HERETIC", ChampionType.Aurelionite => "CHAMPION_SUBTITLE_AURELIONITE", _ => "CHAMPION_SUBTITLE_GENERIC", }; } public static void Init() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Expected O, but got Unknown //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Expected O, but got Unknown //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020b: 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_0222: Expected O, but got Unknown //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Expected O, but got Unknown //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Expected O, but got Unknown //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Expected O, but got Unknown //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Expected O, but got Unknown //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Expected O, but got Unknown //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0300: 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_0317: Expected O, but got Unknown //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown object obj = <>O.<0>__CharacterMaster_OnBodyStart; if (obj == null) { hook_OnBodyStart val = CharacterMaster_OnBodyStart; <>O.<0>__CharacterMaster_OnBodyStart = val; obj = (object)val; } CharacterMaster.OnBodyStart += (hook_OnBodyStart)obj; object obj2 = <>O.<1>__CharacterMaster_Start; if (obj2 == null) { hook_Start val2 = CharacterMaster_Start; <>O.<1>__CharacterMaster_Start = val2; obj2 = (object)val2; } CharacterMaster.Start += (hook_Start)obj2; new KillerBeetle().Init(ref killerBeetleMaster, ref iscKillerBeetle); new ArmoredHalcyonite().Init(ref halcyoniteArmoredMaster, ref iscHalcyoniteArmoredMaster); new JellyfishTank().Init(ref jellyTankMaster, ref iscJellyTank); new Kjaro().Init(ref kjaroMaster, ref iscKjaro); new Runald().Init(ref runaldMaster, ref iscRunald); new ShadowRing().Init(ref shadowRingMaster, ref iscShadowRing); new Smiter().Init(ref smiterMaster, ref iscSmiter); new MiniWorshipUnit().Init(ref miniWorshipUnitMaster, ref iscMiniWorshipUnit); new RedBaron().Init(ref redBaronMaster, ref iscRedBaron); new DeathUrchin().Init(ref deathUrchinMaster, ref iscDeathUrchin); new SniperHermit().Init(ref sniperHermitMaster, ref iscSniperHermit); new Heretic().Init(ref hereticMaster, ref iscHeretic); new Aurelionite().Init(ref aurelioniteMaster, ref iscAurelionite); dccsChampions = ScriptableObject.CreateInstance<DirectorCardCategorySelection>(); int num = dccsChampions.AddCategory("champions", 10f); dccsChampions.AddCard(num, new DirectorCard { spawnCard = (SpawnCard)(object)iscKillerBeetle, selectionWeight = 1 }); dccsChampions.AddCard(num, new DirectorCard { spawnCard = (SpawnCard)(object)iscHalcyoniteArmoredMaster, selectionWeight = 5 }); dccsChampions.AddCard(num, new DirectorCard { spawnCard = (SpawnCard)(object)iscJellyTank, selectionWeight = 5 }); dccsChampions.AddCard(num, new DirectorCard { spawnCard = (SpawnCard)(object)iscKjaro, selectionWeight = 5 }); dccsChampions.AddCard(num, new DirectorCard { spawnCard = (SpawnCard)(object)iscRunald, selectionWeight = 5 }); dccsChampions.AddCard(num, new DirectorCard { spawnCard = (SpawnCard)(object)iscShadowRing, selectionWeight = 5 }); dccsChampions.AddCard(num, new DirectorCard { spawnCard = (SpawnCard)(object)iscSmiter, selectionWeight = 5 }); dccsChampions.AddCard(num, new DirectorCard { spawnCard = (SpawnCard)(object)iscMiniWorshipUnit, selectionWeight = 5 }); dccsChampions.AddCard(num, new DirectorCard { spawnCard = (SpawnCard)(object)iscRedBaron, selectionWeight = 5 }); dccsChampions.AddCard(num, new DirectorCard { spawnCard = (SpawnCard)(object)iscDeathUrchin, selectionWeight = 5 }); dccsChampions.AddCard(num, new DirectorCard { spawnCard = (SpawnCard)(object)iscSniperHermit, selectionWeight = 5 }); dccsChampions.AddCard(num, new DirectorCard { spawnCard = (SpawnCard)(object)iscHeretic, selectionWeight = 1 }); dccsChampions.AddCard(num, new DirectorCard { spawnCard = (SpawnCard)(object)iscAurelionite, selectionWeight = 1 }); } private static void CharacterMaster_Start(orig_Start orig, CharacterMaster self) { orig.Invoke(self); ChampionComponent component = ((Component)self).GetComponent<ChampionComponent>(); if (!((Object)(object)component != (Object)null)) { return; } Inventory component2 = ((Component)self).GetComponent<Inventory>(); if (!((Object)(object)component2 != (Object)null)) { return; } Debug.LogFormat("ChampionComponent: Granting pickups to {0}.", new object[1] { ((Component)self).gameObject }); if (component.equipment != "") { component2.GiveEquipmentString(component.equipment); Debug.LogFormat("- Granting equipment {0}.", new object[1] { component.equipment }); } if (component.pickupList == null) { return; } Debug.LogFormat("ChampionComponent: {0} pickup(s) to grant:", new object[1] { component.pickupList.Count }); foreach (ChampionComponent.GrantedItem pickup in component.pickupList) { component2.GiveItemString(pickup.pickupName, pickup.amount); Debug.LogFormat("- Granting {1} of item {0}.", new object[2] { pickup.pickupName, pickup.amount }); } } private static void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { orig.Invoke(self, body); ChampionComponent component = ((Component)self).GetComponent<ChampionComponent>(); if ((Object)(object)component != (Object)null && (Object)(object)body != (Object)null) { body.baseNameToken = component.characterNameToken; body.subtitleNameToken = GetChampionSubtitle(component.championType); } } } public static class ItemRelationships { public static class RelationshipProviders { public static ItemRelationshipProvider contagiousItems; } public static ItemRelationshipType contagiousItem; public static void Init() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) RelationshipProviders.contagiousItems = ScriptableObject.CreateInstance<ItemRelationshipProvider>(); contagiousItem = Addressables.LoadAssetAsync<ItemRelationshipType>((object)"RoR2/DLC1/Common/ContagiousItem.asset").WaitForCompletion(); if ((Object)(object)contagiousItem != (Object)null) { RelationshipProviders.contagiousItems.relationshipType = contagiousItem; } } } public static class Items { public static ItemDef GlassShield; public static ItemDef GlassShieldBroken; public static ItemDef GoldStar; public static ItemDef FlatHealIncrease; public static ItemDef ProcBoost; public static ItemDef BoostExperience; public static ItemDef DebuffBoss; public static ItemDef PrizeTicket; public static ItemDef HealOnCooldown; public static ItemDef SprintFireMissiles; public static ItemDef MaterialTester; public static ItemDef HealOnLevelUp; public static ItemDef TeleporterArmorZone; public static ItemDef MoneyObjectOnSpawn; public static ItemDef RevengeDamageBonus; public static ItemDef ExtraPrinterRoll; public static ItemDef UpgradeChests; public static ItemDef ShieldArmor; public static ItemDef DropYellowItemOnKill; public static ItemDef DropYellowItemOnKillUsed; public static ItemDef ProjectileBoost; public static ItemDef BulletsIntoLasers; public static ItemDef GoldIdol; public static ItemDef BlockLowDamageHits; public static ItemDef FrenzyOnBossKill; public static ItemDef ShieldBreaker; public static ItemDef Placebo; public static ItemDef HealthBasedDamageBonus; public static EquipmentDef StunNearbyFoes; public static EquipmentDef ChargingLaser; public static EquipmentDef FireburstOnFreeze; public static EquipmentDef SlowTime; public static EquipmentDef LevelUp; public static EquipmentDef DeathImmunity; public static EquipmentDef AffixTank; public static EquipmentDef AffixShadow; public static EquipmentDef AffixTar; public static EquipmentDef AffixToxic; public static EquipmentDef AffixEmpowering; public static EquipmentDef AffixSuperboss; public static EquipmentDef AffixUnstable; public static ItemDef WakeOfVulturesVoid; public static ItemDef AspectShardBase; public static ItemDef AegisVoid; public static ItemDef WaxQuailVoid; public static ItemDef StickyBombVoid; public static ItemDef EnergyDrinkVoid; public static ItemDef VoidSeedSpawner; public static ItemDef PiggyBank; public static ItemDef Monocle; public static ItemDef Chimera; public static ItemDef Grudge; public static EquipmentDef Egg; public static EquipmentDef EggUsed; public static ItemDef ChimeraHealth; public static ItemDef ChimeraRegen; public static ItemDef ChimeraShields; public static ItemDef ChimeraDamage; public static ItemDef ChimeraCrit; public static ItemDef ChimeraArmor; public static ItemDef ChimeraCooldown; public static ItemDef ChimeraSpeed; public static ItemDef ChimeraLuck; public static ItemDef BeetlePlush; public static ItemDef Tentacle; public static ItemDef ImpEye; public static ItemDef WispOnKill; public static ItemDef ArmorWhenEnteringCombat; public static ItemDef BeetleFallBoots; public static ItemDef Geode; public static ItemDef Tarbine; public static ItemDef SmiteOnHit; public static ItemDef BighornBuckler; public static ItemDef IgniteOnHit; public static ItemDef ShieldWhenStationary; public static ItemDef DroneCoupon; public static ItemDef MushroomOnKill; public static ItemDef ProjectileKiller; public static ItemDef GriefFlower; public static ItemDef OrbitingConstructs; public static ItemDef DoubleProjectiles; public static ItemDef TarBallsOnHit; public static ItemDef ExplodeOnDeath; public static ItemDef LunarFlight; public static ItemDef LowHealthShield; public static ItemDef HoverWings; public static ItemDef MeleeAttackSpeed; public static ItemDef AcidSack; public static ItemDef VoidChains; public static ItemDef VoidBarnacleMinion; public static ItemDef NullSeed; public static ItemDef SafeZone; public static ItemDef FireEye; public static ItemDef GoldArmorBoost; public static ItemDef ScavBonus; public static ItemDef Godmode; public static ItemDef VoidEye; public static ItemDef ThunderAura; public static ItemDef LunarRosary; public static ItemDef ChampionAura; public static void Init() { new ChampionAura().Init(ref ChampionAura); new GlassShield().Init(ref GlassShield); new GlassShieldBroken().Init(ref GlassShieldBroken); new FlatHealIncrease().Init(ref FlatHealIncrease); new ProcBoost().Init(ref ProcBoost); new HealOnCooldown().Init(ref HealOnCooldown); new ProjectileBoost().Init(ref ProjectileBoost); new TeleporterArmorZone().Init(ref TeleporterArmorZone); new UpgradeChests().Init(ref UpgradeChests); new DropYellowItemOnKill().Init(ref DropYellowItemOnKill); new DropYellowItemOnKillConsumed().Init(ref DropYellowItemOnKillUsed); new GoldIdol().Init(ref GoldIdol); new BlockLowDamageHits().Init(ref BlockLowDamageHits); new FrenzyOnBossKill().Init(ref FrenzyOnBossKill); new HealthBasedDamageBonus().Init(ref HealthBasedDamageBonus); new Placebo().Init(ref Placebo); new Shieldbreaker().Init(ref ShieldBreaker); new VoidSeedSpawner().Init(ref VoidSeedSpawner); new Monocle().Init(ref Monocle); new ChimeraArmor().Init(ref ChimeraArmor); new ChimeraCooldown().Init(ref ChimeraCooldown); new ChimeraCrit().Init(ref ChimeraCrit); new ChimeraDamage().Init(ref ChimeraDamage); new ChimeraHealth().Init(ref ChimeraHealth); new ChimeraLuck().Init(ref ChimeraLuck); new ChimeraRegen().Init(ref ChimeraRegen); new ChimeraShields().Init(ref ChimeraShields); new ChimeraSpeed().Init(ref ChimeraSpeed); new Chimera().Init(ref Chimera); new Grudge().Init(ref Grudge); new DeathImmunity().Init(ref DeathImmunity); new SlowTime().Init(ref SlowTime); new BeetlePlush().Init(ref BeetlePlush); new Geode().Init(ref Geode); new MiniWispOnKill().Init(ref WispOnKill); new Tentacle().Init(ref Tentacle); new ImpEye().Init(ref ImpEye); new BisonShield().Init(ref BighornBuckler); new SmiteOnHit().Init(ref SmiteOnHit); new IgniteOnHit().Init(ref IgniteOnHit); new Tarbine().Init(ref Tarbine); new MushroomOnKill().Init(ref MushroomOnKill); new ProjectileKiller().Init(ref ProjectileKiller); new GriefFlower().Init(ref GriefFlower); new OrbitingConstructs().Init(ref OrbitingConstructs); new DoubleProjectiles().Init(ref DoubleProjectiles); new MeleeAttackSpeed().Init(ref MeleeAttackSpeed); new FireEye().Init(ref FireEye); new GoldArmorBoost().Init(ref GoldArmorBoost); new NullSeed().Init(ref NullSeed); new GodMode().Init(ref Godmode); new VoidEye().Init(ref VoidEye); new ThunderAura().Init(ref ThunderAura); new LunarRosary().Init(ref LunarRosary); new EquipEliteShadow().Init(ref AffixShadow); new EquipEliteUnstable().Init(ref AffixUnstable); new EquipEliteTar().Init(ref AffixTar); } } public static class ItemTiers { public static class ItemMasks { public static ItemMask GodTier; } public static ItemTierDef GodTier; public static void Init() { new GodTier().Init(ref GodTier); } } public static class SerializableEntityStates { private static Type[] statesToLoad = new Type[15] { typeof(BaseTarbineState), typeof(TarbineFire), typeof(TarbineIdle), typeof(BaseMiniConstructState), typeof(MC_BaseShellChangeState), typeof(MC_AIState), typeof(MC_Attack), typeof(MC_IdleOpen), typeof(MC_IdleClosed), typeof(MC_Closing), typeof(MC_Opening), typeof(FireEyeActive), typeof(VoidMine_Arming), typeof(VoidMine_Armed), typeof(TarBodyAttachmentState) }; public static Dictionary<string, SerializableEntityStateType> EntityStateDictionary = new Dictionary<string, SerializableEntityStateType>(); public static void Init() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) Debug.LogFormat("Siv's Content Pack: Checking for entity state types...", Array.Empty<object>()); Debug.LogFormat("Siv's Content Pack: {0} Entity State(s) found. Beginning addition to content pack.", new object[1] { statesToLoad.Count() }); Type[] array = statesToLoad; foreach (Type type in array) { Debug.LogFormat("- Loading entity state {0} ({1}).", new object[2] { type.Name, type.Namespace }); bool flag = false; SerializableEntityStateType value = ContentAddition.AddEntityState(type, ref flag); if (flag) { Debug.LogFormat("- Added entity state type {0} to content pack.", new object[1] { type.Name }); EntityStateDictionary.Add(type.Name, value); } } } } public static class Buffs { public static BuffDef AffixTank; public static BuffDef AffixTar; public static BuffDef AffixToxic; public static BuffDef AffixShadow; public static BuffDef AffixEmpowering; public static BuffDef AffixSuperboss; public static BuffDef AffixUnstable; public static BuffDef GeodeArmor; public static BuffDef MiniWispStock; public static BuffDef TankArmorBonus; public static BuffDef Blindness; public static BuffDef DarknessCamo; public static BuffDef Tarbine; public static BuffDef ArmorZone; public static BuffDef MeleeAttackSpeed; public static BuffDef Grief; public static BuffDef BeetleRegen; public static BuffDef BisonShieldActive; public static BuffDef BisonShieldCooldown; public static BuffDef SlowedTime; public static BuffDef BossKillFrenzy; public static BuffDef StoredLunarCoins; public static BuffDef NullSeedActive; public static BuffDef NullSeedCooldown; public static BuffDef LunarCorruption; public static BuffDef FullyCorrupted; public static BuffDef DeathImmunity; public static void Init() { new BeetlePlushRegen().Init(ref BeetleRegen); new BossKillFrenzy().Init(ref BossKillFrenzy); new GeodeArmor().Init(ref GeodeArmor); new Grief().Init(ref Grief); new MiniWispStock().Init(ref MiniWispStock); new MeleeAttackSpeedBuff().Init(ref MeleeAttackSpeed); new BisonShieldActive().Init(ref BisonShieldActive); new BisonShieldCooldown().Init(ref BisonShieldCooldown); new NullSeedActive().Init(ref NullSeedActive); new NullSeedCooldown().Init(ref NullSeedCooldown); new TarbineBuff().Init(ref Tarbine); new DeathImmunityBuff().Init(ref DeathImmunity); new TimeSlowed().Init(ref SlowedTime); new ArmorZone().Init(ref ArmorZone); new LunarCorruption().Init(ref LunarCorruption); new FullyCorrupted().Init(ref FullyCorrupted); new EliteTankArmorBonus().Init(ref TankArmorBonus); new AffixBlack().Init(ref AffixShadow); new AffixUnstable().Init(ref AffixUnstable); new AffixTar().Init(ref AffixTar); } } public static class Elites { public static EliteDef EliteTank; public static EliteDef EliteToxic; public static EliteDef EliteTar; public static EliteDef EliteShadow; public static EliteDef EliteEmpowering; public static EliteDef EliteSuperboss; public static EliteDef EliteUnstable; public static void Init() { new Shadow().Init(ref EliteShadow); new Unstable().Init(ref EliteUnstable); new Tar().Init(ref EliteTar); } } public static class Artifacts { public static ArtifactDef FloorIsLava; public static ArtifactDef EnemySpecializedItems; public static ArtifactDef SuperBeetleCompanion; public static void Init() { Material material = Assets.AssetBundles.Artifacts.LoadAsset<Material>("matArtifact"); Materials.SubmitMaterialFix(material, "Hopoo Games/Deferred/Standard"); material = Assets.AssetBundles.Artifacts.LoadAsset<Material>("matCompoundCircle"); Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap"); material = Assets.AssetBundles.Artifacts.LoadAsset<Material>("matCompoundDiamond"); Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap"); material = Assets.AssetBundles.Artifacts.LoadAsset<Material>("matCompoundSquare"); Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap"); material = Assets.AssetBundles.Artifacts.LoadAsset<Material>("matCompoundTriangle"); Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap"); new Design().Init(ref EnemySpecializedItems); } } public static class Effects { public static EffectDef BlockLowDamageHitsProc; public static EffectDef DoubleProjectilesProc; public static EffectDef ProcBoostEffect; public static EffectDef CupcakeProc; public static EffectDef GoldStarProc; public static EffectDef GoldStarOrb; public static EffectDef GlassShieldBreakProc; public static EffectDef FrenzyOnBossKillProc; public static EffectDef MiniConstructHitSparks; public static EffectDef MiniConstructMuzzleFlash; public static EffectDef MiniConstructOrb; public static EffectDef MiniConstructCharge; public static EffectDef MiniWispMuzzleFlash; public static EffectDef MiniWispImpact; public static EffectDef EliteUnstableImpact; public static EffectDef VoidMineFX; public static EffectDef TarLifeStealOrb; public static EffectDef SmiteFX; public static EffectDef DeathImmunityProc; public static EffectDef ThunderAuraOrbiterImpact; public static EffectDef ThunderAuraLightning; public static EffectDef FireEyeOrb; public static EffectDef FireEyeProc; public static EffectDef GriefProc; public static EffectDef CorruptedSpikeImpact; public static EffectDef SingularityBlast; public static EffectDef ShadowCloakBreak; public static EffectDef CorruptionTakesHold; public static EffectDef CorruptionLifts; public static EffectDef TransformationComplete; public static void Init() { new BlockLowDamageHitsProc().Init(ref BlockLowDamageHitsProc); new DoubleProjectilesProc().Init(ref DoubleProjectilesProc); new CupcakeProc().Init(ref CupcakeProc); new CoinProc().Init(ref ProcBoostEffect); new GoldStarProc().Init(ref GoldStarProc); new GriefProc().Init(ref GriefProc); new SmiteEffect().Init(ref SmiteFX); new GlassShieldBreakProc().Init(ref GlassShieldBreakProc); new FrenzyOnBossKillProc().Init(ref FrenzyOnBossKillProc); new EliteUnstableFX().Init(ref EliteUnstableImpact); new MiniConstructHitSparks().Init(ref MiniConstructHitSparks); new MiniConstructCharge().Init(ref MiniConstructCharge); new MiniConstructMuzzleFlash().Init(ref MiniConstructMuzzleFlash); new MiniConstructOrbTracer().Init(ref MiniConstructOrb); new VoidMineVFX().Init(ref VoidMineFX); new ThunderAuraOrbiterImpact().Init(ref ThunderAuraOrbiterImpact); new LightningStrikeEffect().Init(ref ThunderAuraLightning); new ShadowCloakBreak().Init(ref ShadowCloakBreak); new FireEyeOrb().Init(ref FireEyeOrb); new FireEyeProcEffect().Init(ref FireEyeProc); new WispOnHitMuzzleFlash().Init(ref MiniWispMuzzleFlash); new DeathImmunityProc().Init(ref DeathImmunityProc); new WispOnHitImpact().Init(ref MiniWispImpact); new SingularityBlast().Init(ref SingularityBlast); new TarLifeStealOrbFX().Init(ref TarLifeStealOrb); new CorruptedSpikeImpact().Init(ref CorruptedSpikeImpact); new CorruptionTakesHold().Init(ref CorruptionTakesHold); new CorruptionLifts().Init(ref CorruptionLifts); new TransformationComplete().Init(ref TransformationComplete); } } public static class Orbs { } public static class Interactables { public static InteractableSpawnCard BountyTerminal; public static InteractableSpawnCard ZigguratLightningRod; public static InteractableSpawnCard iscEnemyChest; public static GameObject EnemyChest; public static InteractableSpawnCard iscBossShrine; public static GameObject BossShrine; public static DirectorCard dcBossShrine; public static void Init() { new BossShrine().Init(ref iscBossShrine, ref BossShrine); } } public static class Skills { public static class Huntress { public static SkillDef HeavyGlaive; public static SkillDef LuckyGlaive; } public static class Toolbot { public static SkillDef HaulingMode; } public static class FalseSon { public static SkillDef AltLunarSpikes; public static SkillDef ThunderStorm; } } public static class Unlockables { public static UnlockableDef UnlockSpecializedItems; public static UnlockableDef UnlockGodMode; public static UnlockableDef UnlockThunderAura; public static UnlockableDef UnlockVoidEye; public static UnlockableDef UnlockGodTier; public static UnlockableDef UnlockLunarRosary; public static void Init() { new ArtifactSpecializedItems().Init(ref UnlockSpecializedItems); new UnlockGodTier().Init(ref UnlockGodTier); new UnlockGodMode().Init(ref UnlockGodMode); new UnlockVoidEye().Init(ref UnlockVoidEye); new UnlockThunderAura().Init(ref UnlockThunderAura); new UnlockLunarRosary().Init(ref UnlockLunarRosary); } } public static class SceneDefs { public static SceneDef Ziggurat; public static SceneDef LemurianHome; public static SceneDef ConstructFactory; } public static class Misc { public static GameObject VoidMine; public static GameObject GodModeShockwave; public static GameObject ThunderAuraLightning; public static GameObject MushroomWard; public static GameObject MushroomSpawner; public static GameObject SlowTimeBubble; public static GameObject ProjectileKillerPrefab; public static GameObject VoidEyeSingularity; public static GameObject GrudgeFollower; public static GameObject MiniWispProjectile; public static GameObject EliteUnstableFireball; public static GameObject Smite; public static GameObject CorruptedSpike; public static GameObject ThunderAuraOrbiter; } public static class DeployableSlots { public static DeployableSlot GodModeLunarAlly; public static DeployableSlot Mushroom; public static DeployableSlot ProjectileKiller; public static DeployableSlot Singularity; public static DeployableSlot GrudgeProjectile; public static DeployableSlot ThunderAuraOrbiter; } public static class ProcTypes { public static ProcType procBonus; public static ProcType smite; public static ProcType revengeDamageBonus; public static ProcType placebo; public static ProcType miniWispOnHit; public static ProcType healthBasedDamageBonus; public static ProcType stickyBombVoid; public static ProcType monocle; public static ProcType tentacle; public static ProcType tarbine; public static ProcType igniteOnHit; public static ProcType voidChains; public static ProcType singularity; public static ProcType eliteTarLifesteal; } public static class DamageTypes { public static ModdedDamageType ArmorPiercingLaser; } public static R2APISerializableContentPack contentPack; public static ExpansionDef expansionDef; private static int lastProcType = 25; private static int lastDeployableSlot = 23; private static ItemRelationshipProvider itemRelationshipProvider; private static int lastItemTier = 11; private static List<AddressablePickupPair> addressablePickupPairs = new List<AddressablePickupPair>(); private static List<PendingArtifactCode> pendingArtifactCodes = new List<PendingArtifactCode>(); private static List<PendingItemPair> pendingItemPairs = new List<PendingItemPair>(); private static List<PendingSpawnCard> pendingSpawnCards = new List<PendingSpawnCard>(); public static void Init() { contentPack = Assets.AssetBundles.Main.LoadAsset<R2APISerializableContentPack>("cpSivsContentPack"); R2APIContentManager.AddPreExistingSerializableContentPack(contentPack, true); expansionDef = Assets.AssetBundles.Main.LoadAsset<ExpansionDef>("exSivsContentPack"); ContentAddition.AddExpansionDef(expansionDef); Effects.Init(); ItemTiers.Init(); Elites.Init(); Unlockables.Init(); Champions.Init(); Interactables.Init(); Buffs.Init(); Artifacts.Init(); SerializableEntityStates.Init(); Characters.Init(); ItemRelationships.Init(); Items.Init(); } public static ProcType CreateProcType() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) ProcType val = (ProcType)lastProcType; Debug.LogFormat("Created new ProcType at index {0}.", new object[1] { val }); lastProcType++; return val; } public static DeployableSlot CreateDeployableSlot() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) DeployableSlot val = (DeployableSlot)lastDeployableSlot; Debug.LogFormat("Created new DeployableSlot at index {0}.", new object[1] { val }); lastDeployableSlot++; return val; } public static ItemTier CreateItemTier() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) ItemTier val = (ItemTier)lastItemTier; Debug.LogFormat("Created new ItemTier at index {0}.", new object[1] { val }); lastItemTier++; return val; } public static void SubmitAddressablePickupPair(AddressablePickupPair pair) { addressablePickupPairs.Add(pair); } public static void ValidateAddressablePickupPairs() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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) Debug.LogFormat("Validating AddressablePickupPairs... ({0} pair(s) found)", new object[1] { addressablePickupPairs.Count }); foreach (AddressablePickupPair addressablePickupPair in addressablePickupPairs) { GameObject val = Addressables.LoadAsset<GameObject>((object)addressablePickupPair.objectAddress).WaitForCompletion(); if ((Object)(object)val != (Object)null) { DeathRewards component = val.GetComponent<DeathRewards>(); if ((Object)(object)component != (Object)null && (Object)(object)component.bossDropTable == (Object)null) { ExplicitPickupDropTable val2 = ScriptableObject.CreateInstance<ExplicitPickupDropTable>(); ((PickupDropTable)val2).canDropBeReplaced = true; val2.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1]; val2.pickupEntries[0] = new PickupDefEntry { pickupDef = addressablePickupPair.pickupDef, pickupWeight = 1f }; component.bossDropTable = (PickupDropTable)(object)val2; Debug.LogFormat("- Validated pair {0}/{1}.", new object[2] { val, addressablePickupPair.pickupDef }); } } } } public static void SubmitArtifactCode(PendingArtifactCode pendingArtifactCode) { pendingArtifactCodes.Add(pendingArtifactCode); } public static void ValidatePendingArtifactCodes() { foreach (PendingArtifactCode pendingArtifactCode in pendingArtifactCodes) { ArtifactCodeAPI.AddCode(pendingArtifactCode.artifactDef, pendingArtifactCode.codeAsset); } } public static void SubmitPendingItemPair(PendingItemPair pair) { pendingItemPairs.Add(pair); } public static void ValidatePendingItemPairs() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) Debug.LogFormat("SivsContentPack: Validating pending item pairs.", Array.Empty<object>()); foreach (PendingItemPair pendingItemPair in pendingItemPairs) { Debug.LogFormat("- Located pair with relationship {0} ({1}/{2}).", new object[3] { pendingItemPair.relationshipType, pendingItemPair.item1, pendingItemPair.item2 }); if ((Object)(object)pendingItemPair.relationshipType == (Object)(object)ItemRelationshipTypes.ContagiousItem) { Pair[] relationships = ItemRelationships.RelationshipProviders.contagiousItems.relationships; relationships = CollectionExtensions.AddToArray<Pair>(relationships, new Pair { itemDef1 = pendingItemPair.item1, itemDef2 = pendingItemPair.item2 }); ItemRelationships.RelationshipProviders.contagiousItems.relationships = relationships; Debug.LogFormat("- Added item pair to item relationship provider.", Array.Empty<object>()); } } ItemCatalog.SetItemRelationships((ItemRelationshipProvider[])(object)new ItemRelationshipProvider[1] { ItemRelationships.RelationshipProviders.contagiousItems }); } public static void AddPendingSpawnCard(PendingSpawnCard pendingSpawnCard) { pendingSpawnCards.Add(pendingSpawnCard); } public static void ValidatePendingSpawnCards() { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown Debug.LogFormat("Validating Spawn Cards... ({0} pairs to validate)", new object[1] { pendingSpawnCards.Count }); foreach (PendingSpawnCard pendingSpawnCard in pendingSpawnCards) { if (pendingSpawnCard.sceneInfoAddresses.Count <= 0 || !Object.op_Implicit((Object)(object)pendingSpawnCard.card)) { continue; } Debug.LogFormat("- Validating spawn card {0} ({1} sceneDef(s) to add to).", new object[2] { pendingSpawnCard.card, pendingSpawnCard.sceneInfoAddresses.Count }); foreach (string sceneInfoAddress in pendingSpawnCard.sceneInfoAddresses) { DirectorCardCategorySelection val = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)sceneInfoAddress).WaitForCompletion(); if ((Object)(object)val != (Object)null) { val.AddCard(0, new DirectorCard { spawnCard = pendingSpawnCard.card, selectionWeight = 10 }); Debug.LogFormat("- Added spawn card to {0}.", new object[1] { val }); } } } } } public class ItemFactory { protected GameObject displayPrefab; public void Init(ref ItemDef itemDef) { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown if ((Object)(object)itemDef != (Object)null) { Debug.LogWarningFormat("Content {0} has already been loaded.", new object[1] { ((Object)itemDef).name }); return; } if (!CheckIfEnabled()) { Debug.LogFormat("Content {0} has been disabled.", new object[1] { GetType().Name }); return; } LoadAssets(ref itemDef); SetUpItemRelationships(ref itemDef); HandleMaterials(); RegisterLanguageTokens(); ItemDisplayRuleDict itemDisplayRules = new ItemDisplayRuleDict((ItemDisplayRule[])null); RegisterItemDisplayRules(ref itemDisplayRules); Hooks(); CustomItem val = new CustomItem(itemDef, itemDisplayRules); ItemAPI.Add(val); SubmitItemAsAddressablePair(ref itemDef); Debug.LogFormat("Loaded item {0} and submitted to content pack.", new object[1] { ((Object)itemDef).name }); } protected virtual bool CheckIfEnabled() { return true; } protected virtual void LoadAssets(ref ItemDef itemDef) { } protected virtual void HandleMaterials() { } protected virtual void SetUpExpansionRequirements(ref ItemDef itemDef) { } protected virtual void SetUpItemRelationships(ref ItemDef itemDef) { } protected virtual void RegisterLanguageTokens() { LanguageAPI.Add("ITEM_???_NAME", ""); LanguageAPI.Add("ITEM_???_PICKUP", ""); LanguageAPI.Add("ITEM_???_DESCRIPTION", ""); LanguageAPI.Add("ITEM_???_LORE", ""); } protected virtual void RegisterItemDisplayRule