Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of ZetSizeController v1.3.0
plugins/ZetSizeController/ZetSizeController.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.CodeDom.Compiler; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Linq; 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.Configuration; using BepInEx.Logging; using EntityStates; using HG.BlendableTypes; using IL.EntityStates; using IL.RoR2; using IL.RoR2.CameraModes; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On.RoR2; using On.RoR2.CharacterAI; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using TPDespair.ZetSizeController.Properties; using UnityEngine; 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("ZetSizeController")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ZetSizeController")] [assembly: AssemblyTitle("ZetSizeController")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace TPDespair.ZetSizeController { public static class Configuration { public static ConfigEntry<bool> IgnoreSizeLimit { get; set; } public static ConfigEntry<bool> IgnoreSizeExponent { get; set; } public static ConfigEntry<float> AbsoluteSizeLimit { get; set; } public static ConfigEntry<bool> AllowStatHook { get; set; } public static ConfigEntry<bool> ModifyCamera { get; set; } public static ConfigEntry<bool> ModifyInteraction { get; set; } public static ConfigEntry<bool> ModifyOverlap { get; set; } public static ConfigEntry<bool> ModifyAnimation { get; set; } public static ConfigEntry<int> ShrinkifactEnable { get; set; } public static ConfigEntry<float> ShrinkifactMult { get; set; } public static ConfigEntry<bool> ShrinkifactExtend { get; set; } public static ConfigEntry<bool> ShrinkifactPlayer { get; set; } public static ConfigEntry<bool> ShrinkifactMonster { get; set; } public static ConfigEntry<float> ShrinkifactHealth { get; set; } public static ConfigEntry<float> ShrinkifactDamage { get; set; } public static ConfigEntry<float> ShrinkifactMovement { get; set; } public static ConfigEntry<int> TitanifactEnable { get; set; } public static ConfigEntry<float> TitanifactMult { get; set; } public static ConfigEntry<bool> TitanifactExtend { get; set; } public static ConfigEntry<bool> TitanifactPlayer { get; set; } public static ConfigEntry<bool> TitanifactMonster { get; set; } public static ConfigEntry<float> TitanifactHealth { get; set; } public static ConfigEntry<float> TitanifactDamage { get; set; } public static ConfigEntry<float> TitanifactMovement { get; set; } public static ConfigEntry<int> SplitifactEnable { get; set; } public static ConfigEntry<float> SplitifactChance { get; set; } public static ConfigEntry<float> SplitifactMult { get; set; } public static ConfigEntry<int> SplitifactMaxSmallFly { get; set; } public static ConfigEntry<int> SplitifactMaxLesser { get; set; } public static ConfigEntry<int> SplitifactMaxGreater { get; set; } public static ConfigEntry<int> SplitifactMaxChampion { get; set; } public static ConfigEntry<float> PlayerSizeIncrease { get; set; } public static ConfigEntry<float> PlayerSizeMult { get; set; } public static ConfigEntry<float> PlayerSizeExponent { get; set; } public static ConfigEntry<float> PlayerSizeLimit { get; set; } public static ConfigEntry<bool> PlayerSizeLimitExtendable { get; set; } public static ConfigEntry<float> LesserSizeIncrease { get; set; } public static ConfigEntry<float> LesserSizeMult { get; set; } public static ConfigEntry<float> LesserSizeExponent { get; set; } public static ConfigEntry<float> LesserSizeLimit { get; set; } public static ConfigEntry<float> GreaterSizeIncrease { get; set; } public static ConfigEntry<float> GreaterSizeMult { get; set; } public static ConfigEntry<float> GreaterSizeExponent { get; set; } public static ConfigEntry<float> GreaterSizeLimit { get; set; } public static ConfigEntry<float> ChampionSizeIncrease { get; set; } public static ConfigEntry<float> ChampionSizeMult { get; set; } public static ConfigEntry<float> ChampionSizeExponent { get; set; } public static ConfigEntry<float> ChampionSizeLimit { get; set; } public static ConfigEntry<float> ModifierMult { get; set; } public static ConfigEntry<float> CoreItemModifierLimit { get; set; } public static ConfigEntry<float> KnurlSizeIncrease { get; set; } public static ConfigEntry<float> PearlSizeIncrease { get; set; } public static ConfigEntry<float> StoneFluxSizeIncrease { get; set; } public static ConfigEntry<float> NectarSizeIncrease { get; set; } public static ConfigEntry<float> BossSizeIncrease { get; set; } public static ConfigEntry<float> EliteSizeIncrease { get; set; } public static ConfigEntry<float> EliteCountSizeIncrease { get; set; } public static ConfigEntry<float> EliteCountExponent { get; set; } public static ConfigEntry<float> HeadhunterSizeIncrease { get; set; } public static ConfigEntry<float> HeadhunterExponent { get; set; } public static ConfigEntry<float> GlassModifierLimit { get; set; } public static ConfigEntry<float> GlassSizeMult { get; set; } public static ConfigEntry<float> TonicSizeMult { get; set; } public static ConfigEntry<float> PlayerLevelSizeIncrease { get; set; } public static ConfigEntry<float> PlayerLevelSizeExponent { get; set; } public static ConfigEntry<float> PlayerLevelSizeLimit { get; set; } public static ConfigEntry<float> MonsterLevelSizeIncrease { get; set; } public static ConfigEntry<float> MonsterLevelSizeExponent { get; set; } public static ConfigEntry<float> MonsterLevelSizeLimit { get; set; } public static ConfigEntry<float> ItemScoreSizeIncrease { get; set; } public static ConfigEntry<float> ItemScoreSizeExponent { get; set; } public static ConfigEntry<float> ItemScoreSizeLimit { get; set; } public static ConfigEntry<float> ItemScoreT1Effect { get; set; } public static ConfigEntry<float> ItemScoreT2Effect { get; set; } public static ConfigEntry<float> ItemScoreT3Effect { get; set; } public static ConfigEntry<float> ItemScoreBossEffect { get; set; } public static ConfigEntry<float> ItemScoreLunarEffect { get; set; } internal static void Init(ConfigFile Config) { IgnoreSizeLimit = Config.Bind<bool>("1a-General", "ignoreSizeLimit", false, "Set all sizeclass limits to extreme values."); IgnoreSizeExponent = Config.Bind<bool>("1a-General", "ignoreSizeExponent", false, "Set all sizeclass exponents to 1."); AbsoluteSizeLimit = Config.Bind<float>("1a-General", "absoluteSizeLimit", 4f, "Prevent anything from scaling past value. Overwritten by ignoreSizeLimit."); AllowStatHook = Config.Bind<bool>("1c-Effects", "allowStatHook", true, "Allows changing stat values. Used for artifact effects."); ModifyCamera = Config.Bind<bool>("1c-Effects", "modifyCamera", true, "Modify camera to scale with size."); ModifyInteraction = Config.Bind<bool>("1c-Effects", "modifyInteraction", true, "Modify interaction range to scale with size."); ModifyOverlap = Config.Bind<bool>("1c-Effects", "modifyOverlap", true, "Modify overlap attacks for some monsters to scale better with size."); ModifyAnimation = Config.Bind<bool>("1c-Effects", "modifyAnimation", true, "Modify movement animation speed to scale with size."); ShrinkifactEnable = Config.Bind<int>("2a-Artifacts - Shrink", "shrinkifactEnable", 1, "Artifact of Miniaturization. 0 = Disabled, 1 = Artifact Available, 2 = Always Active"); ShrinkifactMult = Config.Bind<float>("2a-Artifacts - Shrink", "shrinkifactMult", 0.65f, "Size multiplier of Artifact of Miniaturization. Unaffected by sizeclass exponent."); ShrinkifactExtend = Config.Bind<bool>("2a-Artifacts - Shrink", "shrinkifactExtend", true, "Artifact of Miniaturization modifies minimum size limits."); ShrinkifactPlayer = Config.Bind<bool>("2a-Artifacts - Shrink", "shrinkifactPlayer", true, "Artifact of Miniaturization applies to players."); ShrinkifactMonster = Config.Bind<bool>("2a-Artifacts - Shrink", "shrinkifactMonster", true, "Artifact of Miniaturization applies to monsters."); ShrinkifactHealth = Config.Bind<float>("2a-Artifacts - Shrink", "shrinkifactHealth", 1f, "Artifact of Miniaturization health multiplier."); ShrinkifactDamage = Config.Bind<float>("2a-Artifacts - Shrink", "shrinkifactDamage", 1f, "Artifact of Miniaturization damage multiplier."); ShrinkifactMovement = Config.Bind<float>("2a-Artifacts - Shrink", "shrinkifactMovement", 1f, "Artifact of Miniaturization movement speed multiplier."); TitanifactEnable = Config.Bind<int>("2b-Artifacts - Grow", "titanifactEnable", 1, "Artifact of the Giants. 0 = Disabled, 1 = Artifact Available, 2 = Always Active"); TitanifactMult = Config.Bind<float>("2b-Artifacts - Grow", "titanifactMult", 1.5f, "Size multiplier of Artifact of the Giants. Unaffected by sizeclass exponent."); TitanifactExtend = Config.Bind<bool>("2b-Artifacts - Grow", "titanifactExtend", true, "Artifact of the Giants modifies maximum size limits."); TitanifactPlayer = Config.Bind<bool>("2b-Artifacts - Grow", "titanifactPlayer", false, "Artifact of the Giants applies to players."); TitanifactMonster = Config.Bind<bool>("2b-Artifacts - Grow", "titanifactMonster", true, "Artifact of the Giants applies to monsters."); TitanifactHealth = Config.Bind<float>("2b-Artifacts - Grow", "titanifactHealth", 1.5f, "Artifact of the Giants health multiplier."); TitanifactDamage = Config.Bind<float>("2b-Artifacts - Grow", "titanifactDamage", 1.5f, "Artifact of the Giants damage multiplier."); TitanifactMovement = Config.Bind<float>("2b-Artifacts - Grow", "titanifactMovement", 1f, "Artifact of the Giants movement speed multiplier."); SplitifactEnable = Config.Bind<int>("2c-Artifacts - Split", "splitifactEnable", 1, "Artifact of Fragmentation. 0 = Disabled, 1 = Artifact Available, 2 = Always Active"); SplitifactChance = Config.Bind<float>("2c-Artifacts - Split", "splitifactChance", 0.5f, "Chance that any monster will be selected for splitting. 0.5 = 50% chance that a monster will be made larger and split on death."); SplitifactMult = Config.Bind<float>("2c-Artifacts - Split", "splitifactMult", 1.5f, "Size multiplier per remaining split for Artifact of Fragmentation. Unaffected by sizeclass exponent."); SplitifactMaxSmallFly = Config.Bind<int>("2c-Artifacts - Split", "splitifactMaxSmallFly", 1, "Maximum amount of splits for small flying monsters. Lowest between this value and sizeclass value is chosen."); SplitifactMaxLesser = Config.Bind<int>("2c-Artifacts - Split", "splitifactMaxLesser", 2, "Maximum amount of splits for lesser monsters."); SplitifactMaxGreater = Config.Bind<int>("2c-Artifacts - Split", "splitifactMaxGreater", 1, "Maximum amount of splits for greater monsters."); SplitifactMaxChampion = Config.Bind<int>("2c-Artifacts - Split", "splitifactMaxChampion", 0, "Maximum amount of splits for champion monsters."); PlayerSizeIncrease = Config.Bind<float>("3a-Size - Player", "playerSizeIncrease", 0f, "Size increase of players."); PlayerSizeMult = Config.Bind<float>("3a-Size - Player", "playerSizeMult", 1f, "Size multiplier on players."); PlayerSizeExponent = Config.Bind<float>("3a-Size - Player", "playerSizeExponent", 0.65f, "Apply exponent to final player size."); PlayerSizeLimit = Config.Bind<float>("3a-Size - Player", "playerSizeLimit", 2f, "Maximum size of players. Higher values can make skill usage on some characters awkward."); PlayerSizeLimitExtendable = Config.Bind<bool>("3a-Size - Player", "playerSizeLimitExtendable", true, "Whether player size limit is increased by Titanifact if applicable."); LesserSizeIncrease = Config.Bind<float>("3b-Size - Lesser", "lesserSizeIncrease", 0f, "Size increase of lesser monsters."); LesserSizeMult = Config.Bind<float>("3b-Size - Lesser", "lesserSizeMult", 1f, "Size multiplier on lesser monsters."); LesserSizeExponent = Config.Bind<float>("3b-Size - Lesser", "lesserSizeExponent", 0.65f, "Apply exponent to final lesser monster size."); LesserSizeLimit = Config.Bind<float>("3b-Size - Lesser", "lesserSizeLimit", 3f, "Maximum size of lesser monsters."); GreaterSizeIncrease = Config.Bind<float>("3c-Size - Greater", "greaterSizeIncrease", 0f, "Size increase of greater monsters."); GreaterSizeMult = Config.Bind<float>("3c-Size - Greater", "greaterSizeMult", 1f, "Size multiplier on greater monsters."); GreaterSizeExponent = Config.Bind<float>("3c-Size - Greater", "greaterSizeExponent", 0.5f, "Apply exponent to final greater monster size."); GreaterSizeLimit = Config.Bind<float>("3c-Size - Greater", "greaterSizeLimit", 2f, "Maximum size of greater monsters."); ChampionSizeIncrease = Config.Bind<float>("3d-Size - Champion", "championSizeIncrease", 0f, "Size increase of champion monsters."); ChampionSizeMult = Config.Bind<float>("3d-Size - Champion", "championSizeMult", 1f, "Size multiplier on champion monsters."); ChampionSizeExponent = Config.Bind<float>("3d-Size - Champion", "championSizeExponent", 0.5f, "Apply exponent to final champion monster size."); ChampionSizeLimit = Config.Bind<float>("3d-Size - Champion", "championSizeLimit", 2f, "Maximum size of champion monsters."); ModifierMult = Config.Bind<float>("4a-Modifiers - General", "modifierMult", 1f, "Multiply increase modifier effects in modifiers sections. Multiplies item effects after limits."); CoreItemModifierLimit = Config.Bind<float>("4b-Modifiers - Core", "coreItemEffectLimit", 5f, "Maximum modifier effect multiplier for : Knurl, Pearls, Nectar, StoneFlux. 5 = SQRT(25), item effect caps out at 25 items for each core item."); KnurlSizeIncrease = Config.Bind<float>("4b-Modifiers - Core", "knurlSizeIncrease", 0.1f, "Size increase from Titanic Knurl. Value multiplied by SQRT of item count."); PearlSizeIncrease = Config.Bind<float>("4b-Modifiers - Core", "pearlSizeIncrease", 0.1f, "Size increase from Pearl(x1) and Irradiant Pearl(x2.5). Value multiplied by SQRT of item count."); StoneFluxSizeIncrease = Config.Bind<float>("4b-Modifiers - Core", "stoneFluxSizeIncrease", 0.2f, "Size increase from Stone Flux Pauldron. Value multiplied by SQRT of item count."); NectarSizeIncrease = Config.Bind<float>("4b-Modifiers - Core", "nectarSizeIncrease", 0.1f, "Size increase from GrowthNectar. Value multiplied by SQRT of item count."); BossSizeIncrease = Config.Bind<float>("4b-Modifiers - Core", "bossSizeIncrease", 0.2f, "Size increase from being in a boss group."); EliteSizeIncrease = Config.Bind<float>("4b-Modifiers - Core", "eliteSizeIncrease", 0.1f, "Size increase from having any elite buff."); EliteCountSizeIncrease = Config.Bind<float>("4b-Modifiers - Core", "eliteCountSizeIncrease", 0.1f, "Size increase per elite buff. Value multiplied by EliteCountExponent of buff count."); EliteCountExponent = Config.Bind<float>("4b-Modifiers - Core", "eliteCountExponent", 0.5f, "Exponent applied to buff count for EliteCountSizeIncrease."); HeadhunterSizeIncrease = Config.Bind<float>("4b-Modifiers - Core", "headhunterSizeIncrease", 0.1f, "Size increase per elite buff. Value multiplied by HeadhunterExponent of buff count."); HeadhunterExponent = Config.Bind<float>("4b-Modifiers - Core", "headhunterExponent", 0.5f, "Exponent applied to buff count for HeadhunterSizeIncrease."); GlassModifierLimit = Config.Bind<float>("4b-Modifiers - Core", "glassEffectLimit", 0.25f, "Minimum modifier effect for : ShapedGlass."); GlassSizeMult = Config.Bind<float>("4b-Modifiers - Core", "glassSizeMult", 0.9f, "Size multiplier per Shaped Glass. Unaffected by modifierMult. Ignores sizeclass exponent."); TonicSizeMult = Config.Bind<float>("4b-Modifiers - Core", "tonicSizeMult", 1.25f, "Size multiplier from Spinel Tonic. Unaffected by modifierMult. Ignores sizeclass exponent."); PlayerLevelSizeIncrease = Config.Bind<float>("4c-Modifiers - LevelScaling", "playerLevelSizeIncrease", 0f, "Size increase from levels for players. 0 to disable. 0.01 would be the default if enabled."); PlayerLevelSizeExponent = Config.Bind<float>("4c-Modifiers - LevelScaling", "playerLevelSizeExponent", 1f, "Exponent applied to player level for size increase."); PlayerLevelSizeLimit = Config.Bind<float>("4c-Modifiers - LevelScaling", "playerLevelSizeLimit", 0.5f, "Limit for size increase from player level."); MonsterLevelSizeIncrease = Config.Bind<float>("4c-Modifiers - LevelScaling", "monsterLevelSizeIncrease", 0f, "Size increase from levels for monsters. 0 to disable. 0.02 would be the default if enabled."); MonsterLevelSizeExponent = Config.Bind<float>("4c-Modifiers - LevelScaling", "monsterLevelSizeExponent", 0.65f, "Exponent applied to monster level for size increase."); MonsterLevelSizeLimit = Config.Bind<float>("4c-Modifiers - LevelScaling", "monsterLevelSizeLimit", 0.5f, "Limit for size increase from monster level."); ItemScoreSizeIncrease = Config.Bind<float>("4d-Modifiers - ItemScoreScaling", "itemScoreSizeIncrease", 0f, "Size increase from itemscore. 0 to disable. 0.01 would be the default if enabled."); ItemScoreSizeExponent = Config.Bind<float>("4d-Modifiers - ItemScoreScaling", "itemScoreSizeExponent", 0.65f, "Exponent applied to itemscore for size increase."); ItemScoreSizeLimit = Config.Bind<float>("4d-Modifiers - ItemScoreScaling", "itemScoreSizeLimit", 0.5f, "Limit for size increase from itemscore."); ItemScoreT1Effect = Config.Bind<float>("4d-Modifiers - ItemScoreScaling", "itemScoreT1Effect", 1f, "Amount of added itemscore per T1 item."); ItemScoreT2Effect = Config.Bind<float>("4d-Modifiers - ItemScoreScaling", "itemScoreT2Effect", 2f, "Amount of added itemscore per T2 item."); ItemScoreT3Effect = Config.Bind<float>("4d-Modifiers - ItemScoreScaling", "itemScoreT3Effect", 6f, "Amount of added itemscore per T3 item."); ItemScoreBossEffect = Config.Bind<float>("4d-Modifiers - ItemScoreScaling", "itemScoreBossEffect", 4f, "Amount of added itemscore per Boss item."); ItemScoreLunarEffect = Config.Bind<float>("4d-Modifiers - ItemScoreScaling", "itemScoreLunarEffect", 4f, "Amount of added itemscore per Lunar item."); } } public enum SizeClass { None, Player, Lesser, Greater, Champion } public static class SizeManager { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__21_1; public static Func<Vector3, CameraRigController, Vector3> <>9__21_2; public static Manipulator <>9__21_0; public static Func<Instruction, bool> <>9__22_1; public static Func<Instruction, bool> <>9__22_2; public static Func<float, CameraRigController, float> <>9__22_3; public static Manipulator <>9__22_0; public static Func<Instruction, bool> <>9__23_1; public static Func<Instruction, bool> <>9__23_2; public static Func<Instruction, bool> <>9__23_3; public static Func<InteractionDriver, float, float> <>9__23_5; public static Manipulator <>9__23_0; public static Func<Instruction, bool> <>9__24_1; public static Func<Instruction, bool> <>9__24_2; public static Func<Instruction, bool> <>9__24_3; public static Func<Instruction, bool> <>9__24_4; public static Func<Instruction, bool> <>9__24_5; public static Func<float, CharacterBody, float> <>9__24_6; public static Manipulator <>9__24_0; public static Func<Instruction, bool> <>9__25_1; public static Func<Instruction, bool> <>9__25_2; public static Func<Instruction, bool> <>9__25_3; public static Func<Instruction, bool> <>9__25_4; public static Func<Instruction, bool> <>9__25_5; public static Func<float, CharacterBody, float> <>9__25_6; public static Manipulator <>9__25_0; public static Func<Instruction, bool> <>9__26_1; public static Func<Instruction, bool> <>9__26_2; public static Func<Instruction, bool> <>9__26_3; public static Func<Instruction, bool> <>9__26_4; public static Func<Instruction, bool> <>9__26_5; public static Func<float, CharacterBody, float> <>9__26_6; public static Manipulator <>9__26_0; public static Func<Instruction, bool> <>9__27_1; public static Func<Vector3, OverlapAttack, Vector3> <>9__27_2; public static Manipulator <>9__27_0; public static Func<Instruction, bool> <>9__28_1; public static Func<Vector3, OverlapAttack, Vector3> <>9__28_2; public static Manipulator <>9__28_0; public static Func<EntityState, float> <>9__29_1; public static Func<Instruction, bool> <>9__29_2; public static Func<Instruction, bool> <>9__29_3; public static Func<Instruction, bool> <>9__29_4; public static Func<Instruction, bool> <>9__29_5; public static Func<Instruction, bool> <>9__29_6; public static Manipulator <>9__29_0; internal void <CameraDistanceHook>b__21_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 13) })) { val.Index += 1; val.Emit(OpCodes.Ldloc, 13); val.Emit(OpCodes.Ldloc, 1); val.EmitDelegate<Func<Vector3, CameraRigController, Vector3>>((Func<Vector3, CameraRigController, Vector3>)delegate(Vector3 direction, CameraRigController camRig) { //IL_0022: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) CharacterBody targetBody = camRig.targetBody; return Object.op_Implicit((Object)(object)targetBody) ? (direction * targetBody.currentScale) : direction; }); val.Emit(OpCodes.Stloc, 13); } else { ZetSizeControllerPlugin.LogWarn("CameraDistanceHook Failed"); } } internal bool <CameraDistanceHook>b__21_1(Instruction x) { return ILPatternMatchingExt.MatchStloc(x, 13); } internal Vector3 <CameraDistanceHook>b__21_2(Vector3 direction, CameraRigController camRig) { //IL_0022: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) CharacterBody targetBody = camRig.targetBody; if (Object.op_Implicit((Object)(object)targetBody)) { return direction * targetBody.currentScale; } return direction; } internal void <CameraVerticalOffsetHook>b__22_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdflda<CharacterCameraParamsData>(x, "pivotVerticalOffset"), (Instruction x) => ILPatternMatchingExt.MatchLdfld<BlendableFloat>(x, "value") })) { val.Index += 2; val.Emit(OpCodes.Ldloc, 0); val.EmitDelegate<Func<float, CameraRigController, float>>((Func<float, CameraRigController, float>)delegate(float vertical, CameraRigController camRig) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) CharacterBody targetBody = camRig.targetBody; if (Object.op_Implicit((Object)(object)targetBody)) { float currentScale = targetBody.currentScale; float num = Mathf.Abs(targetBody.corePosition.y - targetBody.footPosition.y); float num2 = num / currentScale; float num3 = num2 * (currentScale - 1f); return vertical * currentScale + num3; } return vertical; }); } else { ZetSizeControllerPlugin.LogWarn("CameraVerticalOffsetHook Failed"); } } internal bool <CameraVerticalOffsetHook>b__22_1(Instruction x) { return ILPatternMatchingExt.MatchLdflda<CharacterCameraParamsData>(x, "pivotVerticalOffset"); } internal bool <CameraVerticalOffsetHook>b__22_2(Instruction x) { return ILPatternMatchingExt.MatchLdfld<BlendableFloat>(x, "value"); } internal float <CameraVerticalOffsetHook>b__22_3(float vertical, CameraRigController camRig) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) CharacterBody targetBody = camRig.targetBody; if (Object.op_Implicit((Object)(object)targetBody)) { float currentScale = targetBody.currentScale; float num = Mathf.Abs(targetBody.corePosition.y - targetBody.footPosition.y); float num2 = num / currentScale; float num3 = num2 * (currentScale - 1f); return vertical * currentScale + num3; } return vertical; } internal void <InteractionDriverHook>b__23_0(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_00ad: 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_00f2: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass23_0 CS$<>8__locals4 = new <>c__DisplayClass23_0(); ILCursor val = new ILCursor(il); CS$<>8__locals4.rangeIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<InteractionDriver>(x, "get_interactor"), (Instruction x) => ILPatternMatchingExt.MatchLdfld<Interactor>(x, "maxInteractionDistance"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref CS$<>8__locals4.rangeIndex) })) { val.Index += 4; val.Emit(OpCodes.Ldarg, 0); val.Emit(OpCodes.Ldloc, CS$<>8__locals4.rangeIndex); val.EmitDelegate<Func<InteractionDriver, float, float>>((Func<InteractionDriver, float, float>)delegate(InteractionDriver driver, float range) { CharacterBody characterBody = driver.characterBody; if (Object.op_Implicit((Object)(object)characterBody)) { range *= GetInteractionRangeMult(characterBody); } return range; }); val.Emit(OpCodes.Stloc, CS$<>8__locals4.rangeIndex); } else { ZetSizeControllerPlugin.LogWarn("InteractionHook Failed"); } } internal bool <InteractionDriverHook>b__23_1(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <InteractionDriverHook>b__23_2(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<InteractionDriver>(x, "get_interactor"); } internal bool <InteractionDriverHook>b__23_3(Instruction x) { return ILPatternMatchingExt.MatchLdfld<Interactor>(x, "maxInteractionDistance"); } internal float <InteractionDriverHook>b__23_5(InteractionDriver driver, float range) { CharacterBody characterBody = driver.characterBody; if (Object.op_Implicit((Object)(object)characterBody)) { range *= GetInteractionRangeMult(characterBody); } return range; } internal void <PickupPickerHook>b__24_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[5] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<PickupPickerController>(x, "cutoffDistance"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<PickupPickerController>(x, "cutoffDistance"), (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { val.Index += 5; val.Emit(OpCodes.Ldloc, 1); val.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float cutoff, CharacterBody body) { if (Object.op_Implicit((Object)(object)body)) { float interactionRangeMult = GetInteractionRangeMult(body); cutoff *= interactionRangeMult * interactionRangeMult; } return cutoff; }); } else { ZetSizeControllerPlugin.LogWarn("PickupPickerHook Failed"); } } internal bool <PickupPickerHook>b__24_1(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <PickupPickerHook>b__24_2(Instruction x) { return ILPatternMatchingExt.MatchLdfld<PickupPickerController>(x, "cutoffDistance"); } internal bool <PickupPickerHook>b__24_3(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <PickupPickerHook>b__24_4(Instruction x) { return ILPatternMatchingExt.MatchLdfld<PickupPickerController>(x, "cutoffDistance"); } internal bool <PickupPickerHook>b__24_5(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal float <PickupPickerHook>b__24_6(float cutoff, CharacterBody body) { if (Object.op_Implicit((Object)(object)body)) { float interactionRangeMult = GetInteractionRangeMult(body); cutoff *= interactionRangeMult * interactionRangeMult; } return cutoff; } internal void <TieredPickupPickerHook>b__25_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[5] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<TieredPickupPickerController>(x, "cutoffDistance"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<TieredPickupPickerController>(x, "cutoffDistance"), (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { val.Index += 5; val.Emit(OpCodes.Ldloc, 1); val.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float cutoff, CharacterBody body) { if (Object.op_Implicit((Object)(object)body)) { float interactionRangeMult = GetInteractionRangeMult(body); cutoff *= interactionRangeMult * interactionRangeMult; } return cutoff; }); } else { ZetSizeControllerPlugin.LogWarn("TieredPickupPickerHook Failed"); } } internal bool <TieredPickupPickerHook>b__25_1(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <TieredPickupPickerHook>b__25_2(Instruction x) { return ILPatternMatchingExt.MatchLdfld<TieredPickupPickerController>(x, "cutoffDistance"); } internal bool <TieredPickupPickerHook>b__25_3(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <TieredPickupPickerHook>b__25_4(Instruction x) { return ILPatternMatchingExt.MatchLdfld<TieredPickupPickerController>(x, "cutoffDistance"); } internal bool <TieredPickupPickerHook>b__25_5(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal float <TieredPickupPickerHook>b__25_6(float cutoff, CharacterBody body) { if (Object.op_Implicit((Object)(object)body)) { float interactionRangeMult = GetInteractionRangeMult(body); cutoff *= interactionRangeMult * interactionRangeMult; } return cutoff; } internal void <DroneScrapperPickerHook>b__26_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[5] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<DroneScrapperPickerController>(x, "cutoffDistance"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<DroneScrapperPickerController>(x, "cutoffDistance"), (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { val.Index += 5; val.Emit(OpCodes.Ldloc, 1); val.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float cutoff, CharacterBody body) { if (Object.op_Implicit((Object)(object)body)) { float interactionRangeMult = GetInteractionRangeMult(body); cutoff *= interactionRangeMult * interactionRangeMult; } return cutoff; }); } else { ZetSizeControllerPlugin.LogWarn("DroneScrapperPickerHook Failed"); } } internal bool <DroneScrapperPickerHook>b__26_1(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <DroneScrapperPickerHook>b__26_2(Instruction x) { return ILPatternMatchingExt.MatchLdfld<DroneScrapperPickerController>(x, "cutoffDistance"); } internal bool <DroneScrapperPickerHook>b__26_3(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <DroneScrapperPickerHook>b__26_4(Instruction x) { return ILPatternMatchingExt.MatchLdfld<DroneScrapperPickerController>(x, "cutoffDistance"); } internal bool <DroneScrapperPickerHook>b__26_5(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal float <DroneScrapperPickerHook>b__26_6(float cutoff, CharacterBody body) { if (Object.op_Implicit((Object)(object)body)) { float interactionRangeMult = GetInteractionRangeMult(body); cutoff *= interactionRangeMult * interactionRangeMult; } return cutoff; } internal void <OverlapAttackPositionHook>b__27_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 4) })) { val.Emit(OpCodes.Ldarg, 0); val.EmitDelegate<Func<Vector3, OverlapAttack, Vector3>>((Func<Vector3, OverlapAttack, Vector3>)delegate(Vector3 position, OverlapAttack attack) { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_002c: 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) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_0087: 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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) GameObject attacker = attack.attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { Vector3 val2 = position - component.corePosition; if (component.bodyIndex == BeetleBodyIndex || component.bodyIndex == BeetleCrystalBodyIndex) { ((Vector3)(ref val2))..ctor(val2.x, val2.y * 0.5f, val2.z); } position = component.corePosition + val2; } } return position; }); } else { ZetSizeControllerPlugin.LogWarn("OverlapAttackPositionHook Failed"); } } internal bool <OverlapAttackPositionHook>b__27_1(Instruction x) { return ILPatternMatchingExt.MatchStloc(x, 4); } internal Vector3 <OverlapAttackPositionHook>b__27_2(Vector3 position, OverlapAttack attack) { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_002c: 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) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_0087: 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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) GameObject attacker = attack.attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { Vector3 val = position - component.corePosition; if (component.bodyIndex == BeetleBodyIndex || component.bodyIndex == BeetleCrystalBodyIndex) { ((Vector3)(ref val))..ctor(val.x, val.y * 0.5f, val.z); } position = component.corePosition + val; } } return position; } internal void <OverlapAttackScaleHook>b__28_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 5) })) { val.Emit(OpCodes.Ldarg, 0); val.EmitDelegate<Func<Vector3, OverlapAttack, Vector3>>((Func<Vector3, OverlapAttack, Vector3>)delegate(Vector3 scale, OverlapAttack attack) { //IL_00af: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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) //IL_0039: 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_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) //IL_0051: 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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) GameObject attacker = attack.attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { if (component.bodyIndex == BeetleBodyIndex || component.bodyIndex == BeetleCrystalBodyIndex) { ((Vector3)(ref scale))..ctor(scale.x * 1.25f, scale.y * 2.5f, scale.z * 1.25f); } if (component.bodyIndex == ImpBodyIndex || component.bodyIndex == LemurianBodyIndex) { scale *= 1.75f; } } } return scale; }); } else { ZetSizeControllerPlugin.LogWarn("OverlapAttackScaleHook Failed"); } } internal bool <OverlapAttackScaleHook>b__28_1(Instruction x) { return ILPatternMatchingExt.MatchStloc(x, 5); } internal Vector3 <OverlapAttackScaleHook>b__28_2(Vector3 scale, OverlapAttack attack) { //IL_00af: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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) //IL_0039: 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_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) //IL_0051: 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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) GameObject attacker = attack.attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { if (component.bodyIndex == BeetleBodyIndex || component.bodyIndex == BeetleCrystalBodyIndex) { ((Vector3)(ref scale))..ctor(scale.x * 1.25f, scale.y * 2.5f, scale.z * 1.25f); } if (component.bodyIndex == ImpBodyIndex || component.bodyIndex == LemurianBodyIndex) { scale *= 1.75f; } } } return scale; } internal void <AnimationHook>b__29_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); VariableDefinition val2 = new VariableDefinition(((MemberReference)il.Body.Method).Module.TypeSystem.Single); il.Body.Variables.Add(val2); val.Index = 0; val.Emit(OpCodes.Ldarg, 0); val.EmitDelegate<Func<EntityState, float>>((Func<EntityState, float>)delegate(EntityState entityState) { CharacterBody characterBody = entityState.characterBody; return Object.op_Implicit((Object)(object)characterBody) ? Mathf.Clamp(1f / characterBody.currentScale, 0.125f, 4f) : 1f; }); val.Emit(OpCodes.Stloc, val2); if (!val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(AnimationParameters).GetField("walkSpeed")) })) { ZetSizeControllerPlugin.LogWarn("AnimationHook:walkSpeed Failed"); return; } if (val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<EntityState>(x, "get_characterBody"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_moveSpeed") })) { val.Index += 2; val.Emit(OpCodes.Ldloc, val2); val.Emit(OpCodes.Mul); } else { ZetSizeControllerPlugin.LogWarn("AnimationHook:Body.moveSpeed Failed"); } if (val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<EntityState>(x, "get_characterMotor"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMotor>(x, "get_walkSpeed") })) { val.Index += 2; val.Emit(OpCodes.Ldloc, val2); val.Emit(OpCodes.Mul); } else { ZetSizeControllerPlugin.LogWarn("AnimationHook:Motor.walkSpeed Failed"); } } internal float <AnimationHook>b__29_1(EntityState entityState) { CharacterBody characterBody = entityState.characterBody; if (Object.op_Implicit((Object)(object)characterBody)) { return Mathf.Clamp(1f / characterBody.currentScale, 0.125f, 4f); } return 1f; } internal bool <AnimationHook>b__29_2(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, typeof(AnimationParameters).GetField("walkSpeed")); } internal bool <AnimationHook>b__29_3(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<EntityState>(x, "get_characterBody"); } internal bool <AnimationHook>b__29_4(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_moveSpeed"); } internal bool <AnimationHook>b__29_5(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<EntityState>(x, "get_characterMotor"); } internal bool <AnimationHook>b__29_6(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMotor>(x, "get_walkSpeed"); } } [CompilerGenerated] private sealed class <>c__DisplayClass23_0 { public int rangeIndex; internal bool <InteractionDriverHook>b__4(Instruction x) { return ILPatternMatchingExt.MatchStloc(x, ref rangeIndex); } } private static readonly List<string> LesserBodyNames = new List<string> { "BackupDroneBody", "BeetleBody", "BeetleCrystalBody", "ClayBody", "Drone1Body", "Drone2Body", "EmergencyDroneBody", "EquipmentDroneBody", "FlameDroneBody", "FlyingVerminBody", "GipBody", "HermitCrabBody", "ImpBody", "JellyfishBody", "LemurianBody", "LunarExploderBody", "MiniMushroomBody", "MinorConstructAttachableBody", "MinorConstructBody", "MinorConstructOnKillBody", "MissileDroneBody", "MoffeinClayManBody", "SquidTurretBody", "Turret1Body", "UrchinTurretBody", "VerminBody", "VoidBarnacleBody", "VoidInfestorBody", "VultureBody", "WispBody", "WispSoulBody" }; private static readonly List<BodyIndex> LesserBodyIndexes = new List<BodyIndex>(); private static readonly List<string> GreaterBodyNames = new List<string> { "ArchWispBody", "BeetleGuardAllyBody", "BeetleGuardBody", "BeetleGuardCrystalBody", "BellBody", "BisonBody", "BomberBody", "ClayBruiserBody", "ClayGrenadierBody", "DroneCommanderBody", "EngiBeamTurretBody", "EngiTurretBody", "EngiWalkerTurretBody", "GeepBody", "GolemBody", "GreaterWispBody", "GupBody", "LemurianBruiserBody", "LunarGolemBody", "LunarKnightBody", "LunarWispBody", "MajorConstructBody", "MegaDroneBody", "NullifierBody", "ParentBody", "RoboBallGreenBuddyBody", "RoboBallMiniBody", "RoboBallRedBuddyBody", "ScavBody", "ShopkeeperBody", "VoidJailerBody" }; private static readonly List<BodyIndex> GreaterBodyIndexes = new List<BodyIndex>(); private static readonly List<string> ChampionBodyNames = new List<string> { "AncientWispBody", "BeetleQueen2Body", "BrotherBody", "BrotherGlassBody", "BrotherHurtBody", "ClayBossBody", "DireseekerBody", "ElectricWormBody", "GrandParentBody", "GravekeeperBody", "ImpBossBody", "MagmaWormBody", "MegaConstructBody", "MoffeinAncientWispBody", "RoboBallBossBody", "ScavLunar1Body", "ScavLunar2Body", "ScavLunar3Body", "ScavLunar4Body", "SuperRoboBallBossBody", "TitanBody", "TitanGoldBody", "VagrantBody", "VoidMegaCrabBody" }; private static readonly List<BodyIndex> ChampionBodyIndexes = new List<BodyIndex>(); private static BodyIndex BeetleBodyIndex = (BodyIndex)(-1); private static BodyIndex BeetleCrystalBodyIndex = (BodyIndex)(-1); private static BodyIndex ImpBodyIndex = (BodyIndex)(-1); private static BodyIndex LemurianBodyIndex = (BodyIndex)(-1); private static BuffIndex HeadhunterBuff = (BuffIndex)(-1); private static ItemTier LunarVoidTier = (ItemTier)1000; private static ItemIndex RelicMassIndex = (ItemIndex)(-1); internal static void Init() { ((ResourceAvailability)(ref BodyCatalog.availability)).CallWhenAvailable((Action)PopulateBodyIndexes); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(PopulateIndexes)); if (Configuration.ModifyCamera.Value) { CameraDistanceHook(); CameraVerticalOffsetHook(); } if (Configuration.ModifyInteraction.Value) { InteractionDriverHook(); PickupPickerHook(); TieredPickupPickerHook(); DroneScrapperPickerHook(); } if (Configuration.ModifyOverlap.Value) { OverlapAttackPositionHook(); OverlapAttackScaleHook(); } if (Configuration.ModifyAnimation.Value) { AnimationHook(); } } private static void PopulateBodyIndexes() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Invalid comparison between Unknown and I4 //IL_0030: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Invalid comparison between Unknown and I4 //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Invalid comparison between Unknown and I4 //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) foreach (string lesserBodyName in LesserBodyNames) { BodyIndex val = BodyCatalog.FindBodyIndex(lesserBodyName); if ((int)val != -1 && !LesserBodyIndexes.Contains(val)) { LesserBodyIndexes.Add(val); } } foreach (string greaterBodyName in GreaterBodyNames) { BodyIndex val = BodyCatalog.FindBodyIndex(greaterBodyName); if ((int)val != -1 && !GreaterBodyIndexes.Contains(val)) { GreaterBodyIndexes.Add(val); } } foreach (string championBodyName in ChampionBodyNames) { BodyIndex val = BodyCatalog.FindBodyIndex(championBodyName); if ((int)val != -1 && !ChampionBodyIndexes.Contains(val)) { ChampionBodyIndexes.Add(val); } } BeetleBodyIndex = BodyCatalog.FindBodyIndex("BeetleBody"); BeetleCrystalBodyIndex = BodyCatalog.FindBodyIndex("BeetleCrystalBody"); ImpBodyIndex = BodyCatalog.FindBodyIndex("ImpBody"); LemurianBodyIndex = BodyCatalog.FindBodyIndex("LemurianBody"); ZetSizeControllerPlugin.LogWarn("PopulateBodyIndexes : Lesser[" + LesserBodyIndexes.Count + "] Greater[" + GreaterBodyIndexes.Count + "] Champion[" + ChampionBodyIndexes.Count + "]"); } private static void PopulateIndexes() { //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_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Invalid comparison between Unknown and I4 //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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Invalid comparison between Unknown and I4 //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_0039: Unknown result type (might be due to invalid IL or missing references) //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) BuffIndex val = BuffCatalog.FindBuffIndex("ZetHeadHunter"); if ((int)val != -1) { HeadhunterBuff = val; } ItemIndex val2 = ItemCatalog.FindItemIndex("RelicOfMass"); if ((int)val2 != -1) { RelicMassIndex = val2; } ItemTierDef val3 = ItemTierCatalog.FindTierDef("VoidLunarTierDef"); if (Object.op_Implicit((Object)(object)val3)) { LunarVoidTier = val3.tier; } } public static float GetScaleMult(CharacterBody body) { //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Invalid comparison between Unknown and I4 //IL_02b8: Unknown result type (might be due to invalid IL or missing references) SizeClass sizeClass = GetSizeClass(body); float value; float num2; float value2; float num; float num3; switch (sizeClass) { case SizeClass.Player: num = Configuration.PlayerSizeIncrease.Value; value = Configuration.PlayerSizeMult.Value; num2 = Configuration.PlayerSizeExponent.Value; value2 = Configuration.PlayerSizeLimit.Value; num3 = 0.5f; break; case SizeClass.Lesser: num = Configuration.LesserSizeIncrease.Value; value = Configuration.LesserSizeMult.Value; num2 = Configuration.LesserSizeExponent.Value; value2 = Configuration.LesserSizeLimit.Value; num3 = 0.5f; break; case SizeClass.Greater: num = Configuration.GreaterSizeIncrease.Value; value = Configuration.GreaterSizeMult.Value; num2 = Configuration.GreaterSizeExponent.Value; value2 = Configuration.GreaterSizeLimit.Value; num3 = 0.35f; break; case SizeClass.Champion: num = Configuration.ChampionSizeIncrease.Value; value = Configuration.ChampionSizeMult.Value; num2 = Configuration.ChampionSizeExponent.Value; value2 = Configuration.ChampionSizeLimit.Value; num3 = 0.25f; break; default: return 1f; } value2 = Mathf.Min(Configuration.AbsoluteSizeLimit.Value, value2); if (Configuration.IgnoreSizeLimit.Value) { value2 = 999f; num3 = 0.1f; } if (Configuration.IgnoreSizeExponent.Value) { num2 = 1f; } float num4 = 1f; float value3 = Configuration.ModifierMult.Value; Inventory inventory = body.inventory; int itemCountEffective; if (Object.op_Implicit((Object)(object)inventory)) { float value4 = Configuration.CoreItemModifierLimit.Value; itemCountEffective = inventory.GetItemCountEffective(Items.Knurl); if (itemCountEffective > 0) { num += value3 * Configuration.KnurlSizeIncrease.Value * Mathf.Min(value4, Mathf.Sqrt((float)itemCountEffective)); } itemCountEffective = 10 * inventory.GetItemCountEffective(Items.Pearl); itemCountEffective += 25 * inventory.GetItemCountEffective(Items.ShinyPearl); if (itemCountEffective > 0) { num += value3 * Configuration.PearlSizeIncrease.Value * Mathf.Min(value4, Mathf.Sqrt((float)itemCountEffective / 10f)); } itemCountEffective = inventory.GetItemCountEffective(Items.HalfSpeedDoubleHealth); if (itemCountEffective > 0) { num += value3 * Configuration.StoneFluxSizeIncrease.Value * Mathf.Min(value4, Mathf.Sqrt((float)itemCountEffective)); } itemCountEffective = inventory.GetItemCountEffective(Items.BoostAllStats); if (itemCountEffective > 0) { num += value3 * Configuration.NectarSizeIncrease.Value * Mathf.Min(value4, Mathf.Sqrt((float)itemCountEffective)); } if ((int)RelicMassIndex != -1) { itemCountEffective = inventory.GetItemCountEffective(RelicMassIndex); if (itemCountEffective > 0) { num += value3 * Configuration.StoneFluxSizeIncrease.Value * Mathf.Min(value4, Mathf.Sqrt((float)itemCountEffective)); } } itemCountEffective = inventory.GetItemCountEffective(ZetSizeControllerContent.Items.ZetSplitTracker); if (itemCountEffective > 1) { num4 *= Mathf.Pow(Configuration.SplitifactMult.Value, (float)(itemCountEffective - 1)); } itemCountEffective = inventory.GetItemCountEffective(Items.LunarDagger); if (itemCountEffective > 0) { num4 *= Mathf.Max(Configuration.GlassModifierLimit.Value, Mathf.Pow(Configuration.GlassSizeMult.Value, (float)itemCountEffective)); } num += value3 * GetItemScoreScaling(inventory); } if (body.isBoss) { num += value3 * Configuration.BossSizeIncrease.Value; } itemCountEffective = body.eliteBuffCount; if (itemCountEffective > 0) { num += value3 * Configuration.EliteSizeIncrease.Value; num += value3 * Configuration.EliteCountSizeIncrease.Value * Mathf.Pow((float)itemCountEffective, Configuration.EliteCountExponent.Value); } itemCountEffective = body.GetBuffCount(HeadhunterBuff); if (itemCountEffective > 0) { num += value3 * Configuration.HeadhunterSizeIncrease.Value * Mathf.Pow((float)itemCountEffective, Configuration.HeadhunterExponent.Value); } if (body.HasBuff(Buffs.TonicBuff)) { num4 *= Configuration.TonicSizeMult.Value; } num += value3 * GetLevelScaling(sizeClass == SizeClass.Player, body.level); if (num < 0f) { num = -0.01f * Util.ConvertAmplificationPercentageIntoReductionPercentage(Mathf.Abs(num) * 100f); } float num5 = Mathf.Max(0.1f, value * (1f + num)); if (num5 > 1f) { num5 = Mathf.Pow(num5, num2); } if (ZetShrinkifact.Enabled) { if (sizeClass == SizeClass.Player) { if (Configuration.ShrinkifactPlayer.Value) { num4 *= Configuration.ShrinkifactMult.Value; if (Configuration.ShrinkifactExtend.Value) { num3 *= Configuration.ShrinkifactMult.Value; } } } else if (Configuration.ShrinkifactMonster.Value) { num4 *= Configuration.ShrinkifactMult.Value; if (Configuration.ShrinkifactExtend.Value) { num3 *= Configuration.ShrinkifactMult.Value; } } } if (ZetTitanifact.Enabled) { if (sizeClass == SizeClass.Player) { if (Configuration.TitanifactPlayer.Value) { num4 *= Configuration.TitanifactMult.Value; if (Configuration.TitanifactExtend.Value && Configuration.PlayerSizeLimitExtendable.Value) { value2 *= Configuration.TitanifactMult.Value; } } } else if (Configuration.TitanifactMonster.Value) { num4 *= Configuration.TitanifactMult.Value; if (Configuration.TitanifactExtend.Value) { value2 *= Configuration.TitanifactMult.Value; } } } num3 = Mathf.Max(num3, 0.1f); num5 *= num4; return Mathf.Clamp(num5, num3, Mathf.Max(num3, value2)); } private static float GetItemScoreScaling(Inventory inventory) { //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Invalid comparison between Unknown and I4 //IL_00f4: Unknown result type (might be due to invalid IL or missing references) float value = Configuration.ItemScoreSizeIncrease.Value; if (value > 0f) { float num = 0f; float value2 = Configuration.ItemScoreT1Effect.Value; float value3 = Configuration.ItemScoreT2Effect.Value; float value4 = Configuration.ItemScoreT3Effect.Value; float value5 = Configuration.ItemScoreBossEffect.Value; float value6 = Configuration.ItemScoreLunarEffect.Value; num += value2 * (float)inventory.GetTotalItemCountOfTier((ItemTier)0); num += value2 * (float)inventory.GetTotalItemCountOfTier((ItemTier)6); num += value3 * (float)inventory.GetTotalItemCountOfTier((ItemTier)1); num += value3 * (float)inventory.GetTotalItemCountOfTier((ItemTier)7); num += value4 * (float)inventory.GetTotalItemCountOfTier((ItemTier)2); num += value4 * (float)inventory.GetTotalItemCountOfTier((ItemTier)8); num += value5 * (float)inventory.GetTotalItemCountOfTier((ItemTier)4); num += value5 * (float)inventory.GetTotalItemCountOfTier((ItemTier)9); num += value6 * (float)inventory.GetTotalItemCountOfTier((ItemTier)3); if ((int)LunarVoidTier != 1000) { num += value6 * (float)inventory.GetTotalItemCountOfTier(LunarVoidTier); } if (num > 0f) { value *= Mathf.Pow(num, Configuration.ItemScoreSizeExponent.Value); return Mathf.Min(value, Configuration.ItemScoreSizeLimit.Value); } } return 0f; } private static float GetLevelScaling(bool isPlayer, float level) { if (level > 1.99f) { float value; float value2; float num; if (isPlayer) { num = Mathf.Abs(Configuration.PlayerLevelSizeIncrease.Value); if (num == 0f) { return 0f; } value = Configuration.PlayerLevelSizeExponent.Value; value2 = Configuration.PlayerLevelSizeLimit.Value; } else { num = Mathf.Abs(Configuration.MonsterLevelSizeIncrease.Value); if (num == 0f) { return 0f; } value = Configuration.MonsterLevelSizeExponent.Value; value2 = Configuration.MonsterLevelSizeLimit.Value; } num *= Mathf.Pow(level - 1f, value); return Mathf.Min(num, value2); } return 0f; } public static float GetInteractionRangeMult(CharacterBody body) { return 1f + Mathf.Max(0f, body.currentScale - 1f) / 2f; } public static SizeClass GetSizeClass(CharacterBody body) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Invalid comparison between Unknown and I4 //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Invalid comparison between Unknown and I4 //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Invalid comparison between Unknown and I4 if (body.isPlayerControlled) { return SizeClass.Player; } if (LesserBodyIndexes.Contains(body.bodyIndex)) { return SizeClass.Lesser; } if (GreaterBodyIndexes.Contains(body.bodyIndex)) { return SizeClass.Greater; } if (ChampionBodyIndexes.Contains(body.bodyIndex)) { return SizeClass.Champion; } if ((int)body.hullClassification == 2) { return SizeClass.Champion; } if ((int)body.hullClassification == 1) { return SizeClass.Greater; } if ((int)body.hullClassification == 0) { return SizeClass.Lesser; } return SizeClass.None; } private static void CameraDistanceHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__21_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 13) })) { val2.Index += 1; val2.Emit(OpCodes.Ldloc, 13); val2.Emit(OpCodes.Ldloc, 1); val2.EmitDelegate<Func<Vector3, CameraRigController, Vector3>>((Func<Vector3, CameraRigController, Vector3>)delegate(Vector3 direction, CameraRigController camRig) { //IL_0022: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) CharacterBody targetBody = camRig.targetBody; return Object.op_Implicit((Object)(object)targetBody) ? (direction * targetBody.currentScale) : direction; }); val2.Emit(OpCodes.Stloc, 13); } else { ZetSizeControllerPlugin.LogWarn("CameraDistanceHook Failed"); } }; <>c.<>9__21_0 = val; obj = (object)val; } CameraModePlayerBasic.UpdateInternal += (Manipulator)obj; } private static void CameraVerticalOffsetHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__22_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdflda<CharacterCameraParamsData>(x, "pivotVerticalOffset"), (Instruction x) => ILPatternMatchingExt.MatchLdfld<BlendableFloat>(x, "value") })) { val2.Index += 2; val2.Emit(OpCodes.Ldloc, 0); val2.EmitDelegate<Func<float, CameraRigController, float>>((Func<float, CameraRigController, float>)delegate(float vertical, CameraRigController camRig) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) CharacterBody targetBody = camRig.targetBody; if (Object.op_Implicit((Object)(object)targetBody)) { float currentScale = targetBody.currentScale; float num = Mathf.Abs(targetBody.corePosition.y - targetBody.footPosition.y); float num2 = num / currentScale; float num3 = num2 * (currentScale - 1f); return vertical * currentScale + num3; } return vertical; }); } else { ZetSizeControllerPlugin.LogWarn("CameraVerticalOffsetHook Failed"); } }; <>c.<>9__22_0 = val; obj = (object)val; } CameraModePlayerBasic.CalculateTargetPivotPosition += (Manipulator)obj; } private static void InteractionDriverHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__23_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_00ad: 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_00f2: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); int rangeIndex = -1; if (val2.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<InteractionDriver>(x, "get_interactor"), (Instruction x) => ILPatternMatchingExt.MatchLdfld<Interactor>(x, "maxInteractionDistance"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref rangeIndex) })) { val2.Index += 4; val2.Emit(OpCodes.Ldarg, 0); val2.Emit(OpCodes.Ldloc, rangeIndex); val2.EmitDelegate<Func<InteractionDriver, float, float>>((Func<InteractionDriver, float, float>)delegate(InteractionDriver driver, float range) { CharacterBody characterBody = driver.characterBody; if (Object.op_Implicit((Object)(object)characterBody)) { range *= GetInteractionRangeMult(characterBody); } return range; }); val2.Emit(OpCodes.Stloc, rangeIndex); } else { ZetSizeControllerPlugin.LogWarn("InteractionHook Failed"); } }; <>c.<>9__23_0 = val; obj = (object)val; } InteractionDriver.FindBestInteractableObject += (Manipulator)obj; } private static void PickupPickerHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__24_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func<Instruction, bool>[5] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<PickupPickerController>(x, "cutoffDistance"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<PickupPickerController>(x, "cutoffDistance"), (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { val2.Index += 5; val2.Emit(OpCodes.Ldloc, 1); val2.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float cutoff, CharacterBody body) { if (Object.op_Implicit((Object)(object)body)) { float interactionRangeMult = GetInteractionRangeMult(body); cutoff *= interactionRangeMult * interactionRangeMult; } return cutoff; }); } else { ZetSizeControllerPlugin.LogWarn("PickupPickerHook Failed"); } }; <>c.<>9__24_0 = val; obj = (object)val; } PickupPickerController.FixedUpdateServer += (Manipulator)obj; } private static void TieredPickupPickerHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__25_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func<Instruction, bool>[5] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<TieredPickupPickerController>(x, "cutoffDistance"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<TieredPickupPickerController>(x, "cutoffDistance"), (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { val2.Index += 5; val2.Emit(OpCodes.Ldloc, 1); val2.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float cutoff, CharacterBody body) { if (Object.op_Implicit((Object)(object)body)) { float interactionRangeMult = GetInteractionRangeMult(body); cutoff *= interactionRangeMult * interactionRangeMult; } return cutoff; }); } else { ZetSizeControllerPlugin.LogWarn("TieredPickupPickerHook Failed"); } }; <>c.<>9__25_0 = val; obj = (object)val; } TieredPickupPickerController.FixedUpdateServer += (Manipulator)obj; } private static void DroneScrapperPickerHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__26_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func<Instruction, bool>[5] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<DroneScrapperPickerController>(x, "cutoffDistance"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<DroneScrapperPickerController>(x, "cutoffDistance"), (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { val2.Index += 5; val2.Emit(OpCodes.Ldloc, 1); val2.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float cutoff, CharacterBody body) { if (Object.op_Implicit((Object)(object)body)) { float interactionRangeMult = GetInteractionRangeMult(body); cutoff *= interactionRangeMult * interactionRangeMult; } return cutoff; }); } else { ZetSizeControllerPlugin.LogWarn("DroneScrapperPickerHook Failed"); } }; <>c.<>9__26_0 = val; obj = (object)val; } DroneScrapperPickerController.FixedUpdateServer += (Manipulator)obj; } private static void OverlapAttackPositionHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__27_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 4) })) { val2.Emit(OpCodes.Ldarg, 0); val2.EmitDelegate<Func<Vector3, OverlapAttack, Vector3>>((Func<Vector3, OverlapAttack, Vector3>)delegate(Vector3 position, OverlapAttack attack) { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_002c: 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) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_0087: 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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) GameObject attacker = attack.attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { Vector3 val3 = position - component.corePosition; if (component.bodyIndex == BeetleBodyIndex || component.bodyIndex == BeetleCrystalBodyIndex) { ((Vector3)(ref val3))..ctor(val3.x, val3.y * 0.5f, val3.z); } position = component.corePosition + val3; } } return position; }); } else { ZetSizeControllerPlugin.LogWarn("OverlapAttackPositionHook Failed"); } }; <>c.<>9__27_0 = val; obj = (object)val; } OverlapAttack.Fire += (Manipulator)obj; } private static void OverlapAttackScaleHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__28_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 5) })) { val2.Emit(OpCodes.Ldarg, 0); val2.EmitDelegate<Func<Vector3, OverlapAttack, Vector3>>((Func<Vector3, OverlapAttack, Vector3>)delegate(Vector3 scale, OverlapAttack attack) { //IL_00af: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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) //IL_0039: 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_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) //IL_0051: 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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) GameObject attacker = attack.attacker; if (Object.op_Implicit((Object)(object)attacker)) { CharacterBody component = attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { if (component.bodyIndex == BeetleBodyIndex || component.bodyIndex == BeetleCrystalBodyIndex) { ((Vector3)(ref scale))..ctor(scale.x * 1.25f, scale.y * 2.5f, scale.z * 1.25f); } if (component.bodyIndex == ImpBodyIndex || component.bodyIndex == LemurianBodyIndex) { scale *= 1.75f; } } } return scale; }); } else { ZetSizeControllerPlugin.LogWarn("OverlapAttackScaleHook Failed"); } }; <>c.<>9__28_0 = val; obj = (object)val; } OverlapAttack.Fire += (Manipulator)obj; } private static void AnimationHook() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__29_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); VariableDefinition val3 = new VariableDefinition(((MemberReference)il.Body.Method).Module.TypeSystem.Single); il.Body.Variables.Add(val3); val2.Index = 0; val2.Emit(OpCodes.Ldarg, 0); val2.EmitDelegate<Func<EntityState, float>>((Func<EntityState, float>)delegate(EntityState entityState) { CharacterBody characterBody = entityState.characterBody; return Object.op_Implicit((Object)(object)characterBody) ? Mathf.Clamp(1f / characterBody.currentScale, 0.125f, 4f) : 1f; }); val2.Emit(OpCodes.Stloc, val3); if (!val2.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(AnimationParameters).GetField("walkSpeed")) })) { ZetSizeControllerPlugin.LogWarn("AnimationHook:walkSpeed Failed"); } else { if (val2.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<EntityState>(x, "get_characterBody"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_moveSpeed") })) { val2.Index += 2; val2.Emit(OpCodes.Ldloc, val3); val2.Emit(OpCodes.Mul); } else { ZetSizeControllerPlugin.LogWarn("AnimationHook:Body.moveSpeed Failed"); } if (val2.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<EntityState>(x, "get_characterMotor"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterMotor>(x, "get_walkSpeed") })) { val2.Index += 2; val2.Emit(OpCodes.Ldloc, val3); val2.Emit(OpCodes.Mul); } else { ZetSizeControllerPlugin.LogWarn("AnimationHook:Motor.walkSpeed Failed"); } } }; <>c.<>9__29_0 = val; obj = (object)val; } BaseCharacterMain.UpdateAnimationParameters += (Manipulator)obj; } } internal static class StatHooks { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__1_8; public static Func<Instruction, bool> <>9__1_9; public static Func<Instruction, bool> <>9__1_10; public static Func<Instruction, bool> <>9__1_4; public static Func<Instruction, bool> <>9__1_5; public static Func<CharacterBody, float, float> <>9__1_7; public static Manipulator <>9__1_0; public static Func<Instruction, bool> <>9__2_6; public static Func<Instruction, bool> <>9__2_7; public static Func<Instruction, bool> <>9__2_8; public static Func<Instruction, bool> <>9__2_3; public static Func<CharacterBody, float, float> <>9__2_5; public static Manipulator <>9__2_0; public static Func<Instruction, bool> <>9__3_6; public static Func<Instruction, bool> <>9__3_7; public static Func<Instruction, bool> <>9__3_8; public static Func<Instruction, bool> <>9__3_3; public static Func<CharacterBody, float, float> <>9__3_5; public static Manipulator <>9__3_0; public static Func<Instruction, bool> <>9__4_1; public static Func<float, CharacterBody, float> <>9__4_2; public static Manipulator <>9__4_0; public static hook_RecalculateStats <>9__5_0; internal void <MovespeedHook>b__1_0(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass1_0 CS$<>8__locals11 = new <>c__DisplayClass1_0(); ILCursor val = new ILCursor(il); CS$<>8__locals11.BaseSpeedLocIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseMoveSpeed"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelMoveSpeed") }) && !val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref CS$<>8__locals11.BaseSpeedLocIndex) })) { ZetSizeControllerPlugin.LogWarn("MovementSpeedHook Failed - Could not find BaseSpeedLocIndex"); return; } CS$<>8__locals11.MultSpeedLocIndex = -1; CS$<>8__locals11.DivSpeedLocIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[6] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, CS$<>8__locals11.BaseSpeedLocIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref CS$<>8__locals11.MultSpeedLocIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref CS$<>8__locals11.DivSpeedLocIndex), (Instruction x) => ILPatternMatchingExt.MatchDiv(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, CS$<>8__locals11.BaseSpeedLocIndex) })) { val.Index += 1; val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldarg, 0); val.Emit(OpCodes.Ldloc, CS$<>8__locals11.BaseSpeedLocIndex); val.EmitDelegate<Func<CharacterBody, float, float>>((Func<CharacterBody, float, float>)delegate(CharacterBody self, float value) { bool enabled = ZetShrinkifact.Enabled; bool enabled2 = ZetTitanifact.Enabled; if (enabled || enabled2) { if (self.HasBuff(ZetSizeControllerContent.Buffs.ZetMonsterSizeClass)) { if (enabled && Configuration.ShrinkifactMonster.Value) { value *= Configuration.ShrinkifactMovement.Value; } if (enabled2 && Configuration.TitanifactMonster.Value) { value *= Configuration.TitanifactMovement.Value; } } else if (self.HasBuff(ZetSizeControllerContent.Buffs.ZetPlayerSizeClass)) { if (enabled && Configuration.ShrinkifactPlayer.Value) { value *= Configuration.ShrinkifactMovement.Value; } if (enabled2 && Configuration.TitanifactPlayer.Value) { value *= Configuration.TitanifactMovement.Value; } } } return value; }); val.Emit(OpCodes.Stloc, CS$<>8__locals11.BaseSpeedLocIndex); val.Emit(OpCodes.Ldloc, CS$<>8__locals11.BaseSpeedLocIndex); } else { ZetSizeControllerPlugin.LogWarn("MovementSpeedHook Failed"); } } internal bool <MovespeedHook>b__1_8(Instruction x) { return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseMoveSpeed"); } internal bool <MovespeedHook>b__1_9(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <MovespeedHook>b__1_10(Instruction x) { return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelMoveSpeed"); } internal bool <MovespeedHook>b__1_4(Instruction x) { return ILPatternMatchingExt.MatchDiv(x); } internal bool <MovespeedHook>b__1_5(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal float <MovespeedHook>b__1_7(CharacterBody self, float value) { bool enabled = ZetShrinkifact.Enabled; bool enabled2 = ZetTitanifact.Enabled; if (enabled || enabled2) { if (self.HasBuff(ZetSizeControllerContent.Buffs.ZetMonsterSizeClass)) { if (enabled && Configuration.ShrinkifactMonster.Value) { value *= Configuration.ShrinkifactMovement.Value; } if (enabled2 && Configuration.TitanifactMonster.Value) { value *= Configuration.TitanifactMovement.Value; } } else if (self.HasBuff(ZetSizeControllerContent.Buffs.ZetPlayerSizeClass)) { if (enabled && Configuration.ShrinkifactPlayer.Value) { value *= Configuration.ShrinkifactMovement.Value; } if (enabled2 && Configuration.TitanifactPlayer.Value) { value *= Configuration.TitanifactMovement.Value; } } } return value; } internal void <DamageHook>b__2_0(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass2_0 CS$<>8__locals8 = new <>c__DisplayClass2_0(); ILCursor val = new ILCursor(il); CS$<>8__locals8.BaseDamageLocIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseDamage"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelDamage") }) && !val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref CS$<>8__locals8.BaseDamageLocIndex) })) { ZetSizeControllerPlugin.LogWarn("DamageHook Failed - Could not find BaseDamageLocIndex"); return; } CS$<>8__locals8.MultDamageLocIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, CS$<>8__locals8.BaseDamageLocIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref CS$<>8__locals8.MultDamageLocIndex), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, CS$<>8__locals8.BaseDamageLocIndex) })) { val.Index += 4; val.Emit(OpCodes.Ldarg, 0); val.Emit(OpCodes.Ldloc, CS$<>8__locals8.BaseDamageLocIndex); val.EmitDelegate<Func<CharacterBody, float, float>>((Func<CharacterBody, float, float>)delegate(CharacterBody self, float value) { bool enabled = ZetShrinkifact.Enabled; bool enabled2 = ZetTitanifact.Enabled; if (enabled || enabled2) { if (self.HasBuff(ZetSizeControllerContent.Buffs.ZetMonsterSizeClass)) { if (enabled && Configuration.ShrinkifactMonster.Value) { value *= Configuration.ShrinkifactDamage.Value; } if (enabled2 && Configuration.TitanifactMonster.Value) { value *= Configuration.TitanifactDamage.Value; } } else if (self.HasBuff(ZetSizeControllerContent.Buffs.ZetPlayerSizeClass)) { if (enabled && Configuration.ShrinkifactPlayer.Value) { value *= Configuration.ShrinkifactDamage.Value; } if (enabled2 && Configuration.TitanifactPlayer.Value) { value *= Configuration.TitanifactDamage.Value; } } } return value; }); val.Emit(OpCodes.Stloc, CS$<>8__locals8.BaseDamageLocIndex); } else { ZetSizeControllerPlugin.LogWarn("DamageHook Failed"); } } internal bool <DamageHook>b__2_6(Instruction x) { return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseDamage"); } internal bool <DamageHook>b__2_7(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <DamageHook>b__2_8(Instruction x) { return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelDamage"); } internal bool <DamageHook>b__2_3(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal float <DamageHook>b__2_5(CharacterBody self, float value) { bool enabled = ZetShrinkifact.Enabled; bool enabled2 = ZetTitanifact.Enabled; if (enabled || enabled2) { if (self.HasBuff(ZetSizeControllerContent.Buffs.ZetMonsterSizeClass)) { if (enabled && Configuration.ShrinkifactMonster.Value) { value *= Configuration.ShrinkifactDamage.Value; } if (enabled2 && Configuration.TitanifactMonster.Value) { value *= Configuration.TitanifactDamage.Value; } } else if (self.HasBuff(ZetSizeControllerContent.Buffs.ZetPlayerSizeClass)) { if (enabled && Configuration.ShrinkifactPlayer.Value) { value *= Configuration.ShrinkifactDamage.Value; } if (enabled2 && Configuration.TitanifactPlayer.Value) { value *= Configuration.TitanifactDamage.Value; } } } return value; } internal void <HealthHook>b__3_0(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass3_0 CS$<>8__locals8 = new <>c__DisplayClass3_0(); ILCursor val = new ILCursor(il); CS$<>8__locals8.BaseHealthLocIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseMaxHealth"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelMaxHealth") }) && !val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref CS$<>8__locals8.B