Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of WolfoQoL OptionalExtras v4.0.2
WolfoQoL_Server.dll
Decompiled 6 months agousing System; using System.CodeDom.Compiler; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using EntityStates.Headstompers; using Microsoft.CodeAnalysis; using On.EntityStates; using On.EntityStates.Headstompers; using On.RoR2; using On.RoR2.Items; using On.RoR2.UI.MainMenu; using R2API; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.Items; using RoR2.UI.MainMenu; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using WolfoQoL_Client; [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("WolfoQoL_Server")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+93e6e0eb42e43feac200f7f69c72b66d6bd3b0d2")] [assembly: AssemblyProduct("WolfoQoL_Server")] [assembly: AssemblyTitle("WolfoQoL_Server")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: UnverifiableCode] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [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 WolfoQoL_Extras.Properties { [GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [DebuggerNonUserCode] [CompilerGenerated] public class Resources { private static ResourceManager resourceMan; private static CultureInfo resourceCulture; [EditorBrowsable(EditorBrowsableState.Advanced)] public static ResourceManager ResourceManager { get { if (resourceMan == null) { ResourceManager resourceManager = new ResourceManager("WolfoQoL_Server.Properties.Resources", typeof(Resources).Assembly); resourceMan = resourceManager; } return resourceMan; } } [EditorBrowsable(EditorBrowsableState.Advanced)] public static CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } internal Resources() { } } } namespace WolfoQoL_Server { public static class Assets { public static AssetBundle Bundle => Assets.Bundle; } public static class ArrayUtil { } public class v { public static Rect rec256 = new Rect(0f, 0f, 256f, 256f); public static Rect rec128 = new Rect(0f, 0f, 128f, 128f); public static Rect rec64 = new Rect(0f, 0f, 64f, 64f); public static Vector2 half = new Vector2(0.5f, 0.5f); } public class BuffTimers { [CompilerGenerated] private static class <>O { public static hook_ApplyJumpVelocity <0>__FeatherRemoveBuffs; public static hook_ReadBuffs <1>__FeatherClient; public static Action<CharacterBody> <2>__CharacterBody_onBodyStartGlobal; } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_StartFlight <>9__13_0; public static hook_OnDestroy <>9__13_1; public static hook_OnEnter <>9__13_2; public static hook_OnExit <>9__13_3; public static hook_OnSprintStart <>9__13_4; public static hook_OnSprintStop <>9__13_5; public static hook_OnEnter <>9__13_6; public static hook_OnExit <>9__13_7; public static hook_OnEnter <>9__13_8; public static hook_OnEnter <>9__13_9; public static hook_OnDisable <>9__13_10; public static hook_OnTakeDamageServer <>9__13_11; public static hook_ForceShieldRegen <>9__13_12; public static hook_OnOwnerKillOther <>9__13_13; public static hook_OnLanded <>9__17_0; public static hook_OnLanded <>9__17_1; internal void <Buffs_NewBuffs>b__13_0(orig_StartFlight orig, JetpackController self) { orig.Invoke(self); if (NetworkServer.active) { self.targetBody.AddTimedBuff(FakeBugWings, self.duration); } } internal void <Buffs_NewBuffs>b__13_1(orig_OnDestroy orig, JetpackController self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)self.targetBody)) { self.targetBody.ClearTimedBuffs(FakeBugWings); } } internal void <Buffs_NewBuffs>b__13_2(orig_OnEnter orig, GhostUtilitySkillState self) { orig.Invoke(self); if (NetworkServer.active) { float num = GhostUtilitySkillState.baseDuration * (float)((Component)((EntityState)self).outer).GetComponentInParent<CharacterBody>().inventory.GetItemCount(Items.LunarUtilityReplacement); ((Component)((EntityState)self).outer).GetComponentInParent<CharacterBody>().AddTimedBuff(FakeStrides, num); } } internal void <Buffs_NewBuffs>b__13_3(orig_OnExit orig, GhostUtilitySkillState self) { orig.Invoke(self); if (NetworkServer.active) { ((Component)((EntityState)self).outer).GetComponentInParent<CharacterBody>().ClearTimedBuffs(FakeStrides); } } internal void <Buffs_NewBuffs>b__13_4(orig_OnSprintStart orig, CharacterBody self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(Items.SprintArmor) > 0) { self.AddBuff(FakeRoseBuckle); } } internal void <Buffs_NewBuffs>b__13_5(orig_OnSprintStop orig, CharacterBody self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(Items.SprintArmor) > 0 && self.HasBuff(FakeRoseBuckle)) { self.RemoveBuff(FakeRoseBuckle); } } internal void <Buffs_NewBuffs>b__13_6(orig_OnEnter orig, FrozenState self) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (NetworkServer.active) { for (float num = 0f; num <= self.freezeDuration; num += 0.5f) { ((EntityState)self).characterBody.AddTimedBuffAuthority(FakeFrozen.buffIndex, num); } } } internal void <Buffs_NewBuffs>b__13_7(orig_OnExit orig, FrozenState self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.ClearTimedBuffs(FakeFrozen); } } internal void <Buffs_NewBuffs>b__13_8(orig_OnEnter orig, BaseHeadstompersState self) { orig.Invoke(self); if (NetworkServer.active && self is HeadstompersIdle && self.body.GetBuffCount(FakeHeadstompOn) == 0) { self.body.AddBuff(FakeHeadstompOn); } } internal void <Buffs_NewBuffs>b__13_9(orig_OnEnter orig, HeadstompersCooldown self) { orig.Invoke(self); if (NetworkServer.active) { ((BaseHeadstompersState)self).body.RemoveBuff(FakeHeadstompOn); float num = self.duration; while (0f < num) { ((BaseHeadstompersState)self).body.AddTimedBuff(FakeHeadstompOff, num); num -= 1f; } } } internal void <Buffs_NewBuffs>b__13_10(orig_OnDisable orig, HeadstomperBodyBehavior self) { orig.Invoke(self); if (NetworkServer.active && (Object)(object)((BaseItemBodyBehavior)self).body != (Object)null) { ((BaseItemBodyBehavior)self).body.RemoveBuff(FakeHeadstompOn); } } internal void <Buffs_NewBuffs>b__13_11(orig_OnTakeDamageServer orig, CharacterBody self, DamageReport damageReport) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 orig.Invoke(self, damageReport); if (!NetworkServer.active || (int)self.teamComponent.teamIndex != 1 || !(self.outOfDangerStopwatch < 0.5f)) { return; } if (self.healthComponent.fullShield > 0f && self.healthComponent.shield < self.healthComponent.fullShield) { float num = 7f - self.outOfDangerStopwatch; if (self.healthComponent.itemCounts.missileVoid > 0) { self.AddTimedBuff(FakeShieldDelayPink, num); } else { self.AddTimedBuff(FakeShieldDelay, num); } } if (Object.op_Implicit((Object)(object)self.inventory)) { float num2 = 7f - self.outOfDangerStopwatch; if (self.inventory.GetItemCount(Items.OutOfCombatArmor) > 0) { self.AddTimedBuff(FakeOpalCooldown, num2); } } } internal void <Buffs_NewBuffs>b__13_12(orig_ForceShieldRegen orig, HealthComponent self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(FakeShieldDelay)) { self.body.ClearTimedBuffs(FakeShieldDelay); self.body.ClearTimedBuffs(FakeShieldDelayPink); } } internal void <Buffs_NewBuffs>b__13_13(orig_OnOwnerKillOther orig, IcicleAuraController self) { orig.Invoke(self); if (NetworkServer.active) { if (self.cachedOwnerInfo.characterBody.GetBuffCount(FakeFrostRelic) + 1 > self.maxIcicleCount) { self.cachedOwnerInfo.characterBody.RemoveOldestTimedBuff(FakeFrostRelic); } self.cachedOwnerInfo.characterBody.AddTimedBuff(FakeFrostRelic, self.icicleDuration); } } internal void <ModSupport>b__17_0(orig_OnLanded orig, CharacterMotor self) { //IL_0037: 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_0072: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.body) && self.body.isPlayerControlled) { self.body.SetBuffCount(FakeFeather.buffIndex, self.body.inventory.GetItemCount(Items.Feather)); self.body.SetBuffCount(FakeVoidFeather.buffIndex, self.body.inventory.GetItemCount(VV_VoidFeather)); if (!NetworkServer.active) { ((Component)self).GetComponent<FeatherTrackerClients>().SetVal(self.body.GetBuffCount(FakeFeather), self.body.GetBuffCount(FakeVoidFeather)); } } } internal void <ModSupport>b__17_1(orig_OnLanded orig, CharacterMotor self) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.body) && self.body.isPlayerControlled) { self.body.SetBuffCount(FakeFeather.buffIndex, self.body.inventory.GetItemCount(Items.Feather)); if (!NetworkServer.active) { ((Component)self).GetComponent<FeatherTrackerClients>().SetVal(self.body.GetBuffCount(FakeFeather), self.body.GetBuffCount(FakeVoidFeather)); } } } } public static BuffDef FakeHellFire; public static BuffDef FakePercentBurn; public static BuffDef FakeBugWings; public static BuffDef FakeStrides; public static BuffDef FakeRoseBuckle; public static BuffDef FakeFrozen; public static BuffDef FakeHeadstompOn; public static BuffDef FakeHeadstompOff; public static BuffDef FakeFeather; public static BuffDef FakeShieldDelay; public static BuffDef FakeShieldDelayPink; public static BuffDef FakeFrostRelic; public static BuffDef FakeOpalCooldown; public static BuffDef FakeVoidFeather; public static ItemIndex VV_VoidFeather = (ItemIndex)(-1); public static void Buffs_NewBuffs() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: 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_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Expected O, but got Unknown //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Expected O, but got Unknown //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Expected O, but got Unknown //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Expected O, but got Unknown //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Expected O, but got Unknown //IL_050c: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_059f: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Expected O, but got Unknown //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Expected O, but got Unknown //IL_06b2: Unknown result type (might be due to invalid IL or missing references) //IL_06b7: Unknown result type (might be due to invalid IL or missing references) //IL_0736: Unknown result type (might be due to invalid IL or missing references) //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_078c: Unknown result type (might be due to invalid IL or missing references) //IL_0791: Unknown result type (might be due to invalid IL or missing references) //IL_07ce: Unknown result type (might be due to invalid IL or missing references) //IL_07d3: Unknown result type (might be due to invalid IL or missing references) //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_08bc: Unknown result type (might be due to invalid IL or missing references) //IL_08c1: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_0623: Expected O, but got Unknown //IL_097e: Unknown result type (might be due to invalid IL or missing references) //IL_0983: Unknown result type (might be due to invalid IL or missing references) //IL_0988: Unknown result type (might be due to invalid IL or missing references) //IL_0a00: Unknown result type (might be due to invalid IL or missing references) //IL_0a05: Unknown result type (might be due to invalid IL or missing references) //IL_0844: Unknown result type (might be due to invalid IL or missing references) //IL_0849: Unknown result type (might be due to invalid IL or missing references) //IL_084f: Expected O, but got Unknown //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Expected O, but got Unknown //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_0938: Unknown result type (might be due to invalid IL or missing references) //IL_093e: Expected O, but got Unknown //IL_0869: Unknown result type (might be due to invalid IL or missing references) //IL_086e: Unknown result type (might be due to invalid IL or missing references) //IL_0874: Expected O, but got Unknown //IL_0662: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_066d: Expected O, but got Unknown bool flag = false; if (Chainloader.PluginInfos.ContainsKey("com.RiskyLives.RiskyMod")) { flag = true; } BuffDef val = LegacyResourcesAPI.Load<BuffDef>("buffdefs/OnFire"); FakeHellFire = ScriptableObject.CreateInstance<BuffDef>(); FakeHellFire.iconSprite = val.iconSprite; FakeHellFire.buffColor = Color32.op_Implicit(new Color32((byte)50, (byte)188, byte.MaxValue, byte.MaxValue)); ((Object)FakeHellFire).name = "visual_HelFire"; FakeHellFire.isDebuff = false; FakeHellFire.canStack = true; FakeHellFire.ignoreGrowthNectar = true; ContentAddition.AddBuffDef(FakeHellFire); FakePercentBurn = ScriptableObject.CreateInstance<BuffDef>(); FakePercentBurn.iconSprite = val.iconSprite; FakePercentBurn.buffColor = Color32.op_Implicit(new Color32((byte)203, (byte)53, (byte)38, byte.MaxValue)); ((Object)FakePercentBurn).name = "visual_EnemyBurn"; FakePercentBurn.isDebuff = false; FakePercentBurn.canStack = true; FakePercentBurn.ignoreGrowthNectar = true; ContentAddition.AddBuffDef(FakePercentBurn); FakeBugWings = ScriptableObject.CreateInstance<BuffDef>(); FakeBugWings.iconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/WQoL/Buffs/texBuffBeetleUp.png"); FakeBugWings.buffColor = Color32.op_Implicit(new Color32((byte)218, (byte)136, (byte)251, byte.MaxValue)); ((Object)FakeBugWings).name = "visual_BugFlight"; FakeBugWings.isDebuff = false; FakeBugWings.canStack = false; FakeBugWings.ignoreGrowthNectar = !WConfig.BuffsAffectNectar.Value; ContentAddition.AddBuffDef(FakeBugWings); if (WConfig.cfgBuff_BugFlight.Value) { object obj = <>c.<>9__13_0; if (obj == null) { hook_StartFlight val2 = delegate(orig_StartFlight orig, JetpackController self) { orig.Invoke(self); if (NetworkServer.active) { self.targetBody.AddTimedBuff(FakeBugWings, self.duration); } }; <>c.<>9__13_0 = val2; obj = (object)val2; } JetpackController.StartFlight += (hook_StartFlight)obj; object obj2 = <>c.<>9__13_1; if (obj2 == null) { hook_OnDestroy val3 = delegate(orig_OnDestroy orig, JetpackController self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)self.targetBody)) { self.targetBody.ClearTimedBuffs(FakeBugWings); } }; <>c.<>9__13_1 = val3; obj2 = (object)val3; } JetpackController.OnDestroy += (hook_OnDestroy)obj2; } FakeStrides = ScriptableObject.CreateInstance<BuffDef>(); FakeStrides.iconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/WQoL/Buffs/texBuffLunarShellIcon.png"); FakeStrides.buffColor = Color32.op_Implicit(new Color32((byte)189, (byte)176, byte.MaxValue, byte.MaxValue)); ((Object)FakeStrides).name = "visual_ShadowIntangible"; FakeStrides.isDebuff = false; FakeStrides.canStack = false; FakeStrides.ignoreGrowthNectar = !WConfig.BuffsAffectNectar.Value; ContentAddition.AddBuffDef(FakeStrides); if (WConfig.cfgBuff_Strides.Value) { object obj3 = <>c.<>9__13_2; if (obj3 == null) { hook_OnEnter val4 = delegate(orig_OnEnter orig, GhostUtilitySkillState self) { orig.Invoke(self); if (NetworkServer.active) { float num5 = GhostUtilitySkillState.baseDuration * (float)((Component)((EntityState)self).outer).GetComponentInParent<CharacterBody>().inventory.GetItemCount(Items.LunarUtilityReplacement); ((Component)((EntityState)self).outer).GetComponentInParent<CharacterBody>().AddTimedBuff(FakeStrides, num5); } }; <>c.<>9__13_2 = val4; obj3 = (object)val4; } GhostUtilitySkillState.OnEnter += (hook_OnEnter)obj3; object obj4 = <>c.<>9__13_3; if (obj4 == null) { hook_OnExit val5 = delegate(orig_OnExit orig, GhostUtilitySkillState self) { orig.Invoke(self); if (NetworkServer.active) { ((Component)((EntityState)self).outer).GetComponentInParent<CharacterBody>().ClearTimedBuffs(FakeStrides); } }; <>c.<>9__13_3 = val5; obj4 = (object)val5; } GhostUtilitySkillState.OnExit += (hook_OnExit)obj4; } FakeRoseBuckle = ScriptableObject.CreateInstance<BuffDef>(); FakeRoseBuckle.iconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/WQoL/Buffs/texBuffBodyArmor.png"); FakeRoseBuckle.buffColor = Color32.op_Implicit(new Color32((byte)251, (byte)199, (byte)38, byte.MaxValue)); ((Object)FakeRoseBuckle).name = "visual_SprintArmor"; FakeRoseBuckle.isDebuff = false; FakeRoseBuckle.canStack = false; FakeRoseBuckle.ignoreGrowthNectar = !WConfig.BuffsAffectNectar.Value; ContentAddition.AddBuffDef(FakeRoseBuckle); if (WConfig.cfgBuff_SprintArmor.Value) { object obj5 = <>c.<>9__13_4; if (obj5 == null) { hook_OnSprintStart val6 = delegate(orig_OnSprintStart orig, CharacterBody self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(Items.SprintArmor) > 0) { self.AddBuff(FakeRoseBuckle); } }; <>c.<>9__13_4 = val6; obj5 = (object)val6; } CharacterBody.OnSprintStart += (hook_OnSprintStart)obj5; object obj6 = <>c.<>9__13_5; if (obj6 == null) { hook_OnSprintStop val7 = delegate(orig_OnSprintStop orig, CharacterBody self) { orig.Invoke(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(Items.SprintArmor) > 0 && self.HasBuff(FakeRoseBuckle)) { self.RemoveBuff(FakeRoseBuckle); } }; <>c.<>9__13_5 = val7; obj6 = (object)val7; } CharacterBody.OnSprintStop += (hook_OnSprintStop)obj6; } FakeFrozen = ScriptableObject.CreateInstance<BuffDef>(); FakeFrozen.iconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/WQoL/Buffs/texBuffBrokenCube.png"); FakeFrozen.buffColor = Color32.op_Implicit(new Color32((byte)184, (byte)216, (byte)239, byte.MaxValue)); ((Object)FakeFrozen).name = "visual_Frozen"; FakeFrozen.isDebuff = false; FakeFrozen.canStack = true; FakeFrozen.ignoreGrowthNectar = true; ContentAddition.AddBuffDef(FakeFrozen); if (WConfig.cfgBuff_Frozen.Value && !flag) { object obj7 = <>c.<>9__13_6; if (obj7 == null) { hook_OnEnter val8 = delegate(orig_OnEnter orig, FrozenState self) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (NetworkServer.active) { for (float num4 = 0f; num4 <= self.freezeDuration; num4 += 0.5f) { ((EntityState)self).characterBody.AddTimedBuffAuthority(FakeFrozen.buffIndex, num4); } } }; <>c.<>9__13_6 = val8; obj7 = (object)val8; } FrozenState.OnEnter += (hook_OnEnter)obj7; object obj8 = <>c.<>9__13_7; if (obj8 == null) { hook_OnExit val9 = delegate(orig_OnExit orig, FrozenState self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.ClearTimedBuffs(FakeFrozen); } }; <>c.<>9__13_7 = val9; obj8 = (object)val9; } FrozenState.OnExit += (hook_OnExit)obj8; } FakeHeadstompOn = ScriptableObject.CreateInstance<BuffDef>(); FakeHeadstompOn.iconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/WQoL/Buffs/texBuffHeadStompOn.png"); FakeHeadstompOn.buffColor = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)250, (byte)250, byte.MaxValue)); ((Object)FakeHeadstompOn).name = "visual_HeadstomperReady"; FakeHeadstompOn.isDebuff = false; FakeHeadstompOn.canStack = false; FakeHeadstompOn.ignoreGrowthNectar = !WConfig.BuffsAffectNectar.Value; ContentAddition.AddBuffDef(FakeHeadstompOn); FakeHeadstompOff = ScriptableObject.CreateInstance<BuffDef>(); FakeHeadstompOff.iconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/WQoL/Buffs/texBuffHeadStompOff.png"); FakeHeadstompOff.buffColor = Color32.op_Implicit(new Color32((byte)250, (byte)250, byte.MaxValue, byte.MaxValue)); ((Object)FakeHeadstompOff).name = "visual_HeadstomperCooldown"; FakeHeadstompOff.isDebuff = false; FakeHeadstompOff.canStack = true; FakeHeadstompOff.ignoreGrowthNectar = true; ContentAddition.AddBuffDef(FakeHeadstompOff); if (WConfig.cfgBuff_Headstomper.Value && !flag) { object obj9 = <>c.<>9__13_8; if (obj9 == null) { hook_OnEnter val10 = delegate(orig_OnEnter orig, BaseHeadstompersState self) { orig.Invoke(self); if (NetworkServer.active && self is HeadstompersIdle && self.body.GetBuffCount(FakeHeadstompOn) == 0) { self.body.AddBuff(FakeHeadstompOn); } }; <>c.<>9__13_8 = val10; obj9 = (object)val10; } BaseHeadstompersState.OnEnter += (hook_OnEnter)obj9; object obj10 = <>c.<>9__13_9; if (obj10 == null) { hook_OnEnter val11 = delegate(orig_OnEnter orig, HeadstompersCooldown self) { orig.Invoke(self); if (NetworkServer.active) { ((BaseHeadstompersState)self).body.RemoveBuff(FakeHeadstompOn); float num3 = self.duration; while (0f < num3) { ((BaseHeadstompersState)self).body.AddTimedBuff(FakeHeadstompOff, num3); num3 -= 1f; } } }; <>c.<>9__13_9 = val11; obj10 = (object)val11; } HeadstompersCooldown.OnEnter += (hook_OnEnter)obj10; object obj11 = <>c.<>9__13_10; if (obj11 == null) { hook_OnDisable val12 = delegate(orig_OnDisable orig, HeadstomperBodyBehavior self) { orig.Invoke(self); if (NetworkServer.active && (Object)(object)((BaseItemBodyBehavior)self).body != (Object)null) { ((BaseItemBodyBehavior)self).body.RemoveBuff(FakeHeadstompOn); } }; <>c.<>9__13_10 = val12; obj11 = (object)val12; } HeadstomperBodyBehavior.OnDisable += (hook_OnDisable)obj11; } BuffDef val13 = LegacyResourcesAPI.Load<BuffDef>("buffdefs/MedkitHeal"); FakeShieldDelay = ScriptableObject.CreateInstance<BuffDef>(); FakeShieldDelay.iconSprite = val13.iconSprite; FakeShieldDelay.buffColor = new Color(0.3529f, 0.4863f, 0.9647f, 1f); ((Object)FakeShieldDelay).name = "visual_ShieldDelay"; FakeShieldDelay.isDebuff = false; FakeShieldDelay.canStack = false; FakeShieldDelay.isCooldown = false; FakeShieldDelay.ignoreGrowthNectar = true; ContentAddition.AddBuffDef(FakeShieldDelay); FakeShieldDelayPink = ScriptableObject.CreateInstance<BuffDef>(); FakeShieldDelayPink.iconSprite = val13.iconSprite; FakeShieldDelayPink.buffColor = new Color(1f, 0.2235f, 0.7804f, 1f); ((Object)FakeShieldDelayPink).name = "visual_ShieldDelayPink"; FakeShieldDelayPink.isDebuff = false; FakeShieldDelayPink.canStack = false; FakeShieldDelayPink.isCooldown = false; FakeShieldDelayPink.ignoreGrowthNectar = true; ContentAddition.AddBuffDef(FakeShieldDelayPink); BuffDef val14 = Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/DLC1/OutOfCombatArmor/bdOutOfCombatArmorBuff.asset").WaitForCompletion(); FakeOpalCooldown = ScriptableObject.CreateInstance<BuffDef>(); FakeOpalCooldown.iconSprite = val14.iconSprite; FakeOpalCooldown.buffColor = new Color(0.4151f, 0.4014f, 0.4014f, 1f); ((Object)FakeOpalCooldown).name = "visual_OutOfCombatArmorCooldown"; FakeOpalCooldown.isDebuff = false; FakeOpalCooldown.canStack = false; FakeOpalCooldown.isCooldown = false; FakeOpalCooldown.ignoreGrowthNectar = true; ContentAddition.AddBuffDef(FakeOpalCooldown); if (WConfig.cfgBuff_ShieldOpalCooldown.Value) { object obj12 = <>c.<>9__13_11; if (obj12 == null) { hook_OnTakeDamageServer val15 = delegate(orig_OnTakeDamageServer orig, CharacterBody self, DamageReport damageReport) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 orig.Invoke(self, damageReport); if (NetworkServer.active && (int)self.teamComponent.teamIndex == 1 && self.outOfDangerStopwatch < 0.5f) { if (self.healthComponent.fullShield > 0f && self.healthComponent.shield < self.healthComponent.fullShield) { float num = 7f - self.outOfDangerStopwatch; if (self.healthComponent.itemCounts.missileVoid > 0) { self.AddTimedBuff(FakeShieldDelayPink, num); } else { self.AddTimedBuff(FakeShieldDelay, num); } } if (Object.op_Implicit((Object)(object)self.inventory)) { float num2 = 7f - self.outOfDangerStopwatch; if (self.inventory.GetItemCount(Items.OutOfCombatArmor) > 0) { self.AddTimedBuff(FakeOpalCooldown, num2); } } } }; <>c.<>9__13_11 = val15; obj12 = (object)val15; } CharacterBody.OnTakeDamageServer += (hook_OnTakeDamageServer)obj12; object obj13 = <>c.<>9__13_12; if (obj13 == null) { hook_ForceShieldRegen val16 = delegate(orig_ForceShieldRegen orig, HealthComponent self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(FakeShieldDelay)) { self.body.ClearTimedBuffs(FakeShieldDelay); self.body.ClearTimedBuffs(FakeShieldDelayPink); } }; <>c.<>9__13_12 = val16; obj13 = (object)val16; } HealthComponent.ForceShieldRegen += (hook_ForceShieldRegen)obj13; } FakeFrostRelic = ScriptableObject.CreateInstance<BuffDef>(); FakeFrostRelic.iconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/WQoL/Buffs/texBuffFrostRelic.png"); FakeFrostRelic.buffColor = Color32.op_Implicit(new Color32((byte)202, (byte)229, byte.MaxValue, byte.MaxValue)); ((Object)FakeFrostRelic).name = "visual_FrostRelicGrowth"; FakeFrostRelic.isDebuff = false; FakeFrostRelic.canStack = true; FakeFrostRelic.ignoreGrowthNectar = !WConfig.BuffsAffectNectar.Value; ContentAddition.AddBuffDef(FakeFrostRelic); if (WConfig.cfgBuff_FrostRelic.Value) { object obj14 = <>c.<>9__13_13; if (obj14 == null) { hook_OnOwnerKillOther val17 = delegate(orig_OnOwnerKillOther orig, IcicleAuraController self) { orig.Invoke(self); if (NetworkServer.active) { if (self.cachedOwnerInfo.characterBody.GetBuffCount(FakeFrostRelic) + 1 > self.maxIcicleCount) { self.cachedOwnerInfo.characterBody.RemoveOldestTimedBuff(FakeFrostRelic); } self.cachedOwnerInfo.characterBody.AddTimedBuff(FakeFrostRelic, self.icicleDuration); } }; <>c.<>9__13_13 = val17; obj14 = (object)val17; } IcicleAuraController.OnOwnerKillOther += (hook_OnOwnerKillOther)obj14; } FakeFeather = ScriptableObject.CreateInstance<BuffDef>(); FakeFeather.iconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/WQoL/Buffs/texBuffFeather.png"); FakeFeather.buffColor = Color32.op_Implicit(new Color32((byte)99, (byte)192, byte.MaxValue, byte.MaxValue)); ((Object)FakeFeather).name = "visual_BonusJump"; FakeFeather.isDebuff = false; FakeFeather.canStack = true; FakeFeather.ignoreGrowthNectar = true; ContentAddition.AddBuffDef(FakeFeather); FakeVoidFeather = ScriptableObject.CreateInstance<BuffDef>(); FakeVoidFeather.iconSprite = FakeFeather.iconSprite; FakeVoidFeather.buffColor = new Color(0.7f, 0.45f, 1f, 1f); ((Object)FakeVoidFeather).name = "visual_BonusJumpVoid"; FakeVoidFeather.isDebuff = false; FakeVoidFeather.canStack = true; FakeVoidFeather.ignoreGrowthNectar = true; ContentAddition.AddBuffDef(FakeVoidFeather); } private static void ReplaceBuffOrderIGuess(orig_SetBuffDefs orig, BuffDef[] newBuffDefs) { try { BuffDef[] array = (BuffDef[])(object)new BuffDef[newBuffDefs.Length + 1]; int num = 0; for (int i = 0; i < newBuffDefs.Length; i++) { if ((Object)(object)newBuffDefs[i] == (Object)(object)Buffs.OutOfCombatArmorBuff) { array[num] = newBuffDefs[i]; num++; array[num] = FakeOpalCooldown; } else { array[num] = newBuffDefs[i]; } Debug.Log((object)newBuffDefs[i]); Debug.Log((object)array[num]); num++; } orig.Invoke(array); } catch (Exception ex) { Debug.LogWarning((object)ex); orig.Invoke(newBuffDefs); } } public static void ModSupport() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Invalid comparison between Unknown and I4 //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown VV_VoidFeather = ItemCatalog.FindItemIndex("VV_ITEM_DASHQUILL_ITEM"); if (!WConfig.cfgBuff_Feather.Value) { return; } if ((int)VV_VoidFeather != -1) { FakeVoidFeather.isHidden = false; object obj = <>c.<>9__17_0; if (obj == null) { hook_OnLanded val = delegate(orig_OnLanded orig, CharacterMotor self) { //IL_0037: 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_0072: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.body) && self.body.isPlayerControlled) { self.body.SetBuffCount(FakeFeather.buffIndex, self.body.inventory.GetItemCount(Items.Feather)); self.body.SetBuffCount(FakeVoidFeather.buffIndex, self.body.inventory.GetItemCount(VV_VoidFeather)); if (!NetworkServer.active) { ((Component)self).GetComponent<FeatherTrackerClients>().SetVal(self.body.GetBuffCount(FakeFeather), self.body.GetBuffCount(FakeVoidFeather)); } } }; <>c.<>9__17_0 = val; obj = (object)val; } CharacterMotor.OnLanded += (hook_OnLanded)obj; } else { object obj2 = <>c.<>9__17_1; if (obj2 == null) { hook_OnLanded val2 = delegate(orig_OnLanded orig, CharacterMotor self) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.body) && self.body.isPlayerControlled) { self.body.SetBuffCount(FakeFeather.buffIndex, self.body.inventory.GetItemCount(Items.Feather)); if (!NetworkServer.active) { ((Component)self).GetComponent<FeatherTrackerClients>().SetVal(self.body.GetBuffCount(FakeFeather), self.body.GetBuffCount(FakeVoidFeather)); } } }; <>c.<>9__17_1 = val2; obj2 = (object)val2; } CharacterMotor.OnLanded += (hook_OnLanded)obj2; } object obj3 = <>O.<0>__FeatherRemoveBuffs; if (obj3 == null) { hook_ApplyJumpVelocity val3 = FeatherRemoveBuffs; <>O.<0>__FeatherRemoveBuffs = val3; obj3 = (object)val3; } GenericCharacterMain.ApplyJumpVelocity += (hook_ApplyJumpVelocity)obj3; object obj4 = <>O.<1>__FeatherClient; if (obj4 == null) { hook_ReadBuffs val4 = FeatherClient; <>O.<1>__FeatherClient = val4; obj4 = (object)val4; } CharacterBody.ReadBuffs += (hook_ReadBuffs)obj4; CharacterBody.onBodyStartGlobal += CharacterBody_onBodyStartGlobal; } private static void CharacterBody_onBodyStartGlobal(CharacterBody obj) { if (!NetworkServer.active && obj.isPlayerControlled) { ((Component)obj).gameObject.AddComponent<FeatherTrackerClients>(); } } private static void FeatherClient(orig_ReadBuffs orig, CharacterBody self, NetworkReader reader) { //IL_002d: 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) orig.Invoke(self, reader); if (self.isPlayerControlled) { FeatherTrackerClients component = ((Component)self).GetComponent<FeatherTrackerClients>(); if (Object.op_Implicit((Object)(object)component)) { self.SetBuffCount(FakeFeather.buffIndex, component.amount); self.SetBuffCount(FakeVoidFeather.buffIndex, component.amountVoid); } } } private static void FeatherRemoveBuffs(orig_ApplyJumpVelocity orig, CharacterMotor characterMotor, CharacterBody characterBody, float horizontalBonus, float verticalBonus, bool vault) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(characterMotor, characterBody, horizontalBonus, verticalBonus, vault); if (characterBody.isPlayerControlled && characterMotor.jumpCount + 1 > characterBody.baseJumpCount) { characterBody.SetBuffCount(FakeFeather.buffIndex, characterBody.GetBuffCount(FakeFeather) - 1); characterBody.SetBuffCount(FakeVoidFeather.buffIndex, characterBody.GetBuffCount(FakeVoidFeather) - 1); if (!NetworkServer.active) { ((Component)characterBody).GetComponent<FeatherTrackerClients>().SetVal(characterBody.GetBuffCount(FakeFeather), characterBody.GetBuffCount(FakeVoidFeather)); } } } public static void GetDotDef() { DotController.GetDotDef((DotIndex)1).terminalTimedBuff = null; DotController.GetDotDef((DotIndex)1).terminalTimedBuffDuration = 0f; DotController.GetDotDef((DotIndex)7).terminalTimedBuff = null; DotController.GetDotDef((DotIndex)7).terminalTimedBuffDuration = 0f; DotController.GetDotDef((DotIndex)2).associatedBuff = FakeHellFire; DotController.GetDotDef((DotIndex)3).associatedBuff = FakePercentBurn; } } public class FeatherTrackerClients : MonoBehaviour { public int amount = 0; public int amountVoid = 0; public void SetVal(int one, int two) { amount = one; amountVoid = two; } } public class ConsumedItems { [CompilerGenerated] private static class <>O { public static hook_OnInteractionBegin <0>__UsedKeyGiver; public static hook_OnBeadReset <1>__CharacterMaster_OnBeadReset; } public static ItemDef UsedRustedKey; public static ItemDef UsedEncrustedKey; public static ItemDef UsedPrayerBeads; public static void Start() { //IL_0026: 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_0031: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown CreateItems(); if (WConfig.cfgIconsUsedKey.Value) { object obj = <>O.<0>__UsedKeyGiver; if (obj == null) { hook_OnInteractionBegin val = UsedKeyGiver; <>O.<0>__UsedKeyGiver = val; obj = (object)val; } PurchaseInteraction.OnInteractionBegin += (hook_OnInteractionBegin)obj; } if (WConfig.cfgIconsUsedPrayer.Value) { object obj2 = <>O.<1>__CharacterMaster_OnBeadReset; if (obj2 == null) { hook_OnBeadReset val2 = CharacterMaster_OnBeadReset; <>O.<1>__CharacterMaster_OnBeadReset = val2; obj2 = (object)val2; } CharacterMaster.OnBeadReset += (hook_OnBeadReset)obj2; } } private static void CharacterMaster_OnBeadReset(orig_OnBeadReset orig, CharacterMaster self, bool gainedStats) { orig.Invoke(self, gainedStats); if (gainedStats && NetworkServer.active) { self.inventory.GiveItem(UsedPrayerBeads, 1); } } public static void CreateItems() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Expected O, but got Unknown UsedRustedKey = ScriptableObject.CreateInstance<ItemDef>(); ((Object)UsedRustedKey).name = "TreasureCacheConsumed"; UsedRustedKey.deprecatedTier = (ItemTier)5; UsedRustedKey.pickupModelPrefab = LegacyResourcesAPI.Load<ItemDef>("itemdefs/TreasureCache").pickupModelPrefab; UsedRustedKey.pickupIconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/WQoL/Items/UsedKey.png"); UsedRustedKey.nameToken = "ITEM_TREASURECACHECONSUMED_NAME"; UsedRustedKey.pickupToken = "ITEM_TREASURECACHECONSUMED_DESC"; UsedRustedKey.descriptionToken = "ITEM_TREASURECACHECONSUMED_DESC"; UsedRustedKey.loreToken = ""; UsedRustedKey.hidden = false; UsedRustedKey.canRemove = false; UsedRustedKey.isConsumed = true; UsedRustedKey.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)9 }; CustomItem val = new CustomItem(UsedRustedKey, (ItemDisplayRule[])(object)new ItemDisplayRule[0]); ItemAPI.Add(val); UsedEncrustedKey = ScriptableObject.CreateInstance<ItemDef>(); ((Object)UsedEncrustedKey).name = "TreasureCacheVoidConsumed"; UsedEncrustedKey.deprecatedTier = (ItemTier)5; UsedEncrustedKey.pickupModelPrefab = LegacyResourcesAPI.Load<ItemDef>("itemdefs/TreasureCacheVoid").pickupModelPrefab; UsedEncrustedKey.pickupIconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/WQoL/Items/UsedKeyVoid.png"); UsedEncrustedKey.nameToken = "ITEM_TREASURECACHEVOIDCONSUMED_NAME"; UsedEncrustedKey.pickupToken = "ITEM_TREASURECACHEVOIDCONSUMED_DESC"; UsedEncrustedKey.descriptionToken = "ITEM_TREASURECACHEVOIDCONSUMED_DESC"; UsedEncrustedKey.loreToken = ""; UsedEncrustedKey.hidden = false; UsedEncrustedKey.canRemove = false; UsedEncrustedKey.isConsumed = true; UsedEncrustedKey.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)9 }; CustomItem val2 = new CustomItem(UsedEncrustedKey, (ItemDisplayRule[])(object)new ItemDisplayRule[0]); ItemAPI.Add(val2); ItemDef val3 = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC2/Items/ExtraStatsOnLevelUp/ExtraStatsOnLevelUp.asset").WaitForCompletion(); UsedPrayerBeads = ScriptableObject.CreateInstance<ItemDef>(); ((Object)UsedPrayerBeads).name = "ExtraStatsOnLevelUpConsumed"; UsedPrayerBeads.deprecatedTier = (ItemTier)5; UsedPrayerBeads.pickupModelPrefab = val3.pickupModelPrefab; UsedPrayerBeads.pickupIconSprite = Assets.Bundle.LoadAsset<Sprite>("Assets/WQoL/Items/UsedBeads.png"); UsedPrayerBeads.nameToken = "ITEM_EXTRASTATSONLEVELUP_CONSUMED_NAME"; UsedPrayerBeads.pickupToken = "ITEM_EXTRASTATSONLEVELUP_CONSUMED_PICKUP"; UsedPrayerBeads.descriptionToken = "ITEM_EXTRASTATSONLEVELUP_CONSUMED_DESC"; UsedPrayerBeads.loreToken = "Lore?"; UsedPrayerBeads.hidden = false; UsedPrayerBeads.canRemove = false; UsedPrayerBeads.isConsumed = true; UsedPrayerBeads.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)9 }; val2 = new CustomItem(UsedPrayerBeads, (ItemDisplayRule[])(object)new ItemDisplayRule[0]); ItemAPI.Add(val2); } public static void UsedKeyGiver(orig_OnInteractionBegin orig, PurchaseInteraction self, Interactor activator) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Invalid comparison between Unknown and I4 //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Invalid comparison between Unknown and I4 //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, activator); if (NetworkServer.active && !self.available) { if ((int)self.costType == 12) { ((Component)activator).GetComponent<CharacterBody>().inventory.GiveItem(UsedRustedKey, self.cost); CharacterMasterNotificationQueue.PushItemTransformNotification(((Component)activator).GetComponent<CharacterBody>().master, Items.TreasureCache.itemIndex, UsedRustedKey.itemIndex, (TransformationType)0); } else if ((int)self.costType == 13) { ((Component)activator).GetComponent<CharacterBody>().inventory.GiveItem(UsedEncrustedKey, self.cost); CharacterMasterNotificationQueue.PushItemTransformNotification(((Component)activator).GetComponent<CharacterBody>().master, Items.TreasureCacheVoid.itemIndex, UsedEncrustedKey.itemIndex, (TransformationType)0); } } } } public class WConfig { public static ConfigFile ConfigFile_Server = new ConfigFile(Paths.ConfigPath + "\\Wolfo.WolfoQoL_Server.cfg", true); public static ConfigEntry<bool> cfgIconsUsedKey; public static ConfigEntry<bool> cfgIconsUsedPrayer; public static ConfigEntry<bool> BuffsAffectNectar; public static ConfigEntry<bool> BuffsAffectDeathMark; public static ConfigEntry<bool> cfgBuff_BugFlight; public static ConfigEntry<bool> cfgBuff_Strides; public static ConfigEntry<bool> cfgBuff_SprintArmor; public static ConfigEntry<bool> cfgBuff_Frozen; public static ConfigEntry<bool> cfgBuff_Headstomper; public static ConfigEntry<bool> cfgBuff_Feather; public static ConfigEntry<bool> cfgBuff_ShieldOpalCooldown; public static ConfigEntry<bool> cfgBuff_FrostRelic; public static ConfigEntry<bool> cfgBuff_Shocked; public static void Start() { Debug.Log((object)"WQoL InitConfig"); BuffConfig(); InitConfig(); RiskConfig(); } public static void InitConfig() { cfgIconsUsedKey = ConfigFile_Server.Bind<bool>("Extra Icons", "Consumed Rusted Keys", true, "Just like how Dio leaves a Consumed Dio"); cfgIconsUsedPrayer = ConfigFile_Server.Bind<bool>("Extra Icons", "Consumed Prayer Beads", true, "This should tell you how many stats a player got from their Prayer Beads."); } public static void RiskConfig() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown ModSettingsManager.SetModDescription("Random assortment of Quality of Life. Required by every player."); List<ConfigEntry<bool>> list = new List<ConfigEntry<bool>>(); ConfigEntryBase[] configEntries = ConfigFile_Server.GetConfigEntries(); ConfigEntryBase[] array = configEntries; foreach (ConfigEntryBase val in array) { if (val.SettingType == typeof(bool)) { ConfigEntry<bool> val2 = (ConfigEntry<bool>)(object)val; ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(val2, true)); } else { Debug.LogWarning((object)("Could not add config " + val.Definition.Key + " of type : " + val.SettingType)); } } } public static void BuffConfig() { BuffsAffectNectar = ConfigFile_Server.Bind<bool>("Buffs", "Mod Buffs affect Nectar", false, "Should various buffs added by mod, (Rose Buckler, Head Stomper, Frost Relic) count for Growth Nectar."); cfgBuff_Frozen = ConfigFile_Server.Bind<bool>("Buffs", "Frozen", true, "Icon for; 1 Stack per 0.5s of being frozen, to help visualize how long things are frozen for."); cfgBuff_Feather = ConfigFile_Server.Bind<bool>("Buffs", "Hopoo Feathers", true, "Icon for; Extra jumps granted by Hopoo Feathers, to know how many jumps you have left, useful especially if you have a lot of them.\nAlso works for VanillaVoids : Quill"); cfgBuff_ShieldOpalCooldown = ConfigFile_Server.Bind<bool>("Buffs", "Shield & Opal Cooldown", true, "Icon for; Shield and Opal being on cooldown. This does not come in stacks, so a mod that adds visual buff timers is recommended."); cfgBuff_Headstomper = ConfigFile_Server.Bind<bool>("Buffs", "Headstomper", true, "Ready and Cooldown buff, like Bands or other items."); cfgBuff_FrostRelic = ConfigFile_Server.Bind<bool>("Buffs", "Frost Relic", true, "Icon for; Frost Relic kill stacks."); cfgBuff_Strides = ConfigFile_Server.Bind<bool>("Buffs", "Strides of Heresy", true, "Icon for; Being in Strides of Heresy. Duration not visible by default"); cfgBuff_SprintArmor = ConfigFile_Server.Bind<bool>("Buffs", "Rose Buckler", true, "Icon for; Rose Buckler being active. Weeping Fungus has a buff, why not this."); cfgBuff_BugFlight = ConfigFile_Server.Bind<bool>("Buffs", "Milky Chrysalis", true, "Duration not visible by default, but will tell you when you start descending."); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("Wolfo.WolfoQoL_Server", "WolfoQoL_Extras", "4.0.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class WolfoMain : BaseUnityPlugin { private static readonly Random random = new Random(); public static bool ClientModInstalled = false; public void Awake() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown WConfig.Start(); ClientModInstalled = Chainloader.PluginInfos.ContainsKey("Wolfo.WolfoQoL_Client"); if (!ClientModInstalled) { Debug.LogWarning((object)"WolfoQoL_Server without WolfoQoL_Client"); return; } Texture2D val = Assets.Bundle.LoadAsset<Texture2D>("Assets/WQoL/icon.png"); ModSettingsManager.SetModIcon(Sprite.Create(val, new Rect(0f, 0f, 256f, 256f), new Vector2(0.5f, 0.5f))); BuffTimers.Buffs_NewBuffs(); ConsumedItems.Start(); ((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)ModSupport); MainMenuController.Start += new hook_Start(OneTimeOnlyLateRunner); } internal static void ModSupport() { BuffTimers.ModSupport(); } public void OneTimeOnlyLateRunner(orig_Start orig, MainMenuController self) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown orig.Invoke(self); BuffTimers.GetDotDef(); MainMenuController.Start -= new hook_Start(OneTimeOnlyLateRunner); } } }