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 RiskyTweaks v1.9.6
plugins/RiskyTweaks/RiskyTweaks.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using ArtifactOfPotential; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using EntityStates.Bandit2; using EntityStates.Bandit2.Weapon; using EntityStates.Captain.Weapon; using EntityStates.Chef; using EntityStates.Engi.EngiWeapon; using EntityStates.InfiniteTowerSafeWard; using EntityStates.LunarTeleporter; using EntityStates.Mage.Weapon; using EntityStates.Merc.Weapon; using EntityStates.Missions.Arena.NullWard; using EntityStates.Missions.BrotherEncounter; using EntityStates.MoonElevator; using EntityStates.Toolbot; using EntityStates.Treebot.Weapon; using EntityStates.VoidSurvivor; using IL; using IL.EntityStates.Bandit2.Weapon; using IL.EntityStates.Captain.Weapon; using IL.EntityStates.Engi.EngiWeapon; using IL.EntityStates.FalseSonBoss; using IL.EntityStates.GolemMonster; using IL.EntityStates.LunarWisp; using IL.EntityStates.Mage; using IL.EntityStates.Mage.Weapon; using IL.EntityStates.Seeker; using IL.EntityStates.Treebot.Weapon; using IL.EntityStates.VoidSurvivor.Weapon; using IL.RoR2; using IL.RoR2.Artifacts; using IL.RoR2.CharacterAI; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using On.EntityStates.Bandit2; using On.EntityStates.Bandit2.Weapon; using On.EntityStates.Captain.Weapon; using On.EntityStates.Chef; using On.EntityStates.InfiniteTowerSafeWard; using On.EntityStates.LunarTeleporter; using On.EntityStates.Merc.Weapon; using On.EntityStates.Missions.Arena.NullWard; using On.EntityStates.Missions.BrotherEncounter; using On.EntityStates.Toolbot; using On.EntityStates.VoidSurvivor; using On.RoR2; using On.RoR2.Projectile; using On.RoR2.Skills; using On.RoR2.UI; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.Options; using RiskyTweaks.FireSelect; using RiskyTweaks.Tweaks; using RiskyTweaks.Tweaks.Survivors.Bandit2; using RiskyTweaks.Tweaks.Survivors.Mage; using RiskyTweaks.Tweaks.Survivors.Merc; using RoR2; using RoR2.CharacterAI; using RoR2.Items; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using ShareSuite; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("RiskyTweaks")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+a5d3646587d954bbb76ea1dfb5aa49f99aea861d")] [assembly: AssemblyProduct("RiskyTweaks")] [assembly: AssemblyTitle("RiskyTweaks")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace RiskyTweaks { internal static class CommonHooks { internal static void DisableRemoveBuffGeneric(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(CharacterBody), "RemoveBuff") })) { val.EmitDelegate<Func<BuffIndex, BuffIndex>>((Func<BuffIndex, BuffIndex>)((BuffIndex orig) => (BuffIndex)(-1))); } else { Debug.LogError((object)"RiskyTweaks: DisableRemoveBuffGeneric IL Hook failed"); } } internal static void DisableAddBuffGeneric(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(CharacterBody), "AddBuff") })) { val.EmitDelegate<Func<BuffIndex, BuffIndex>>((Func<BuffIndex, BuffIndex>)((BuffIndex orig) => (BuffIndex)(-1))); } else { Debug.LogError((object)"RiskyTweaks: DisableAddBuffGeneric IL Hook failed"); } } } internal class LoadLanguage { internal static string assemblyDir => Path.GetDirectoryName(RiskyTweaks.pluginInfo.Location); internal static string languageRoot => Path.Combine(assemblyDir, "language"); internal static void fixme(orig_SetFolders orig, Language self, IEnumerable<string> newFolders) { if (Directory.Exists(languageRoot)) { IEnumerable<string> second = Directory.EnumerateDirectories(Path.Combine(languageRoot), self.name); orig.Invoke(self, newFolders.Union(second)); } else { orig.Invoke(self, newFolders); } } } internal static class ModCompat { public static class TeleExpansionCompat { public static bool pluginLoaded; } public static class RiskOfOptionsCompat { public static bool pluginLoaded; internal static void AddOptions() { if (pluginLoaded) { AddOptionsInternal(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void AddOptionsInternal() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(TweakBase<M1AttackSpeed>.Instance.Enabled)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(FireSelectManager.scrollSelection)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(FireSelectManager.nextButton)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(FireSelectManager.prevButton)); if (TweakBase<PrimaryAutoFire>.Instance.Enabled.Value) { ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(PrimaryAutoFire.FireMode.Enabled)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(PrimaryAutoFire.FireMode.defaultButton)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(PrimaryAutoFire.FireMode.spamButton)); } ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(EngiAutoFire.Enabled)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(EngiAutoFire.autoButton)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(EngiAutoFire.holdButton)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CaptainAutoFire.Enabled)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(CaptainAutoFire.defaultButton)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(CaptainAutoFire.autoButton)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(CaptainAutoFire.chargedButton)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(TweakBase<IonSurgeMoveScaling>.Instance.Enabled)); } } public static class ShareSuiteCompat { public static class ItemSettings { public static bool common; public static bool uncommon; public static bool legendary; public static bool boss; public static bool lunar; public static bool voidItem; } public static bool pluginLoaded; internal static void ReadSettings() { if (pluginLoaded) { ReadSettingsInternal(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void ReadSettingsInternal() { ItemSettings.common = ShareSuite.WhiteItemsShared.Value; ItemSettings.uncommon = ShareSuite.GreenItemsShared.Value; ItemSettings.legendary = ShareSuite.RedItemsShared.Value; ItemSettings.boss = ShareSuite.BossItemsShared.Value; ItemSettings.lunar = ShareSuite.LunarItemsShared.Value; ItemSettings.voidItem = ShareSuite.VoidItemsShared.Value; } } public static class ArtifactOfPotentialCompat { public static bool pluginLoaded; public static bool IsArtifactActive() { bool result = false; if (pluginLoaded) { result = IsArtifactActiveInternal(); } return result; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static bool IsArtifactActiveInternal() { return Object.op_Implicit((Object)(object)RunArtifactManager.instance) && RunArtifactManager.instance.IsArtifactEnabled(PotentialArtifact.Potential); } } public static class RiskyArtifactsCompat { internal static class ArtifactDefs { public static ArtifactDef Primacy; } public static bool pluginLoaded; internal static void InitArtifactDefs() { ArtifactDefs.Primacy = ArtifactCatalog.FindArtifactDef("RiskyArtifactOfPrimacy"); } public static bool IsPrimacyActive() { return (Object)(object)ArtifactDefs.Primacy != (Object)null && Object.op_Implicit((Object)(object)RunArtifactManager.instance) && RunArtifactManager.instance.IsArtifactEnabled(ArtifactDefs.Primacy); } } internal static void Init() { RiskOfOptionsCompat.pluginLoaded = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); ShareSuiteCompat.pluginLoaded = Chainloader.PluginInfos.ContainsKey("com.funkfrog_sipondo.sharesuite"); ShareSuiteCompat.ReadSettings(); ArtifactOfPotentialCompat.pluginLoaded = Chainloader.PluginInfos.ContainsKey("zombieseatflesh7.ArtifactOfPotential"); TeleExpansionCompat.pluginLoaded = Chainloader.PluginInfos.ContainsKey("com.Moffein.TeleExpansion"); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(RiskOfOptionsCompat.AddOptions)); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(RiskyArtifactsCompat.InitArtifactDefs)); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Moffein.RiskyTweaks", "RiskyTweaks", "1.9.6")] public class RiskyTweaks : BaseUnityPlugin { public static PluginInfo pluginInfo; private void Awake() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown pluginInfo = ((BaseUnityPlugin)this).Info; Language.SetFolders += new hook_SetFolders(LoadLanguage.fixme); ModCompat.Init(); ((Component)this).gameObject.AddComponent<FireSelectManager>(); FireSelectManager.Init(((BaseUnityPlugin)this).Config); AddToAssembly(); } private void AddToAssembly() { IEnumerable<Type> enumerable = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(TweakBase)) select type; foreach (Type item in enumerable) { TweakBase tweakBase = (TweakBase)Activator.CreateInstance(item); tweakBase.Init(((BaseUnityPlugin)this).Config); } } } public static class SneedUtils { private static SceneDef bazaarSceneDef = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/Base/bazaar/bazaar.asset").WaitForCompletion(); public static bool IsInBazaar() { SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); return Object.op_Implicit((Object)(object)sceneDefForCurrentScene) && (Object)(object)sceneDefForCurrentScene == (Object)(object)bazaarSceneDef; } public static bool SetAddressableEntityStateField(string fullEntityStatePath, string fieldName, string value) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) EntityStateConfiguration val = Addressables.LoadAssetAsync<EntityStateConfiguration>((object)fullEntityStatePath).WaitForCompletion(); for (int i = 0; i < val.serializedFieldsCollection.serializedFields.Length; i++) { if (val.serializedFieldsCollection.serializedFields[i].fieldName == fieldName) { val.serializedFieldsCollection.serializedFields[i].fieldValue.stringValue = value; return true; } } return false; } public static bool GetKeyPressed(ConfigEntry<KeyboardShortcut> entry) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) KeyboardShortcut value = entry.Value; foreach (KeyCode modifier in ((KeyboardShortcut)(ref value)).Modifiers) { if (!Input.GetKey(modifier)) { return false; } } value = entry.Value; return Input.GetKeyDown(((KeyboardShortcut)(ref value)).MainKey); } } } namespace RiskyTweaks.Tweaks { public abstract class TweakBase<T> : TweakBase where T : TweakBase<T> { public static T Instance { get; private set; } public TweakBase() { if (Instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting TweakBase was instantiated twice"); } Instance = this as T; } } public abstract class TweakBase { public abstract string ConfigCategoryString { get; } public abstract string ConfigOptionName { get; } public abstract string ConfigDescriptionString { get; } public ConfigEntry<bool> Enabled { get; private set; } public virtual bool StopLoadOnConfigDisable => true; protected virtual void ReadConfig(ConfigFile config) { Enabled = config.Bind<bool>(ConfigCategoryString, ConfigOptionName, true, ConfigDescriptionString); } internal void Init(ConfigFile config) { ReadConfig(config); if (!StopLoadOnConfigDisable || Enabled.Value) { ApplyChanges(); } } protected virtual void ApplyChanges() { } } } namespace RiskyTweaks.Tweaks.Survivors.VoidSurvivor { public class CrushCorruptBuff : TweakBase<CrushCorruptBuff> { public override string ConfigCategoryString => "Survivors - Void Fiend"; public override string ConfigOptionName => "(Client-Side) Corrupted Crush - Buff Skill"; public override string ConfigDescriptionString => "Corrupted Crush triggers faster and can be retriggered as many times as you want."; protected override void ApplyChanges() { //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) SkillDef val = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidSurvivor/CrushHealth.asset").WaitForCompletion(); val.baseMaxStock = 1; val.baseRechargeInterval = 0f; val.rechargeStock = 1; SneedUtils.SetAddressableEntityStateField("RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.Weapon.ChargeCrushHealth.asset", "baseDuration", "0.3"); } } public class FasterCorruptTransition : TweakBase<FasterCorruptTransition> { public override string ConfigCategoryString => "Survivors - Void Fiend"; public override string ConfigOptionName => "(Client-Side) Corruption - Faster Animation"; public override string ConfigDescriptionString => "Corruption transition animation is faster."; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CorruptionTransitionBase.OnEnter += new hook_OnEnter(CorruptionTransitionBase_OnEnter); } private void CorruptionTransitionBase_OnEnter(orig_OnEnter orig, CorruptionTransitionBase self) { if (self.duration > 0f) { self.duration = 0.5f; } orig.Invoke(self); } } public class PrimarySpread : TweakBase<PrimarySpread> { public override string ConfigCategoryString => "Survivors - Void Fiend"; public override string ConfigOptionName => "(Client-Side) Drown - Remove Spread"; public override string ConfigDescriptionString => "Removes random spread."; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown FireHandBeam.OnEnter += new Manipulator(RemoveBulletSpread); FireCorruptHandBeam.FireBullet += new Manipulator(RemoveBulletSpread); } private void RemoveBulletSpread(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt<BulletAttack>(x, "Fire") })) { val.EmitDelegate<Func<BulletAttack, BulletAttack>>((Func<BulletAttack, BulletAttack>)delegate(BulletAttack bulletAttack) { bulletAttack.minSpread = 0f; bulletAttack.maxSpread = 0f; return bulletAttack; }); } else { Debug.LogError((object)"RiskyTweaks: VoidSurvivor PrimarySpread IL hook failed."); } } } public class UtilityMoveSpeedScaling : TweakBase<UtilityMoveSpeedScaling> { public override string ConfigCategoryString => "Survivors - Void Fiend"; public override string ConfigOptionName => "(Client-Side) Uncorrupted Trespass - Disable Move Speed Scaling"; public override string ConfigDescriptionString => "Disables move speed scaling on Uncorrupted Trespass."; public override bool StopLoadOnConfigDisable => false; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown VoidBlinkBase.GetVelocity += new hook_GetVelocity(VoidBlinkBase_GetVelocity); } private Vector3 VoidBlinkBase_GetVelocity(orig_GetVelocity orig, VoidBlinkBase self) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) if (base.Enabled.Value && Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && !((EntityState)self).characterBody.HasBuff(Buffs.VoidSurvivorCorruptMode)) { ((BaseState)self).moveSpeedStat = 10.15f; } return orig.Invoke(self); } } } namespace RiskyTweaks.Tweaks.Survivors.Treebot { public class SelfDamageTweaks : TweakBase<SelfDamageTweaks> { public override string ConfigCategoryString => "Survivors - REX"; public override string ConfigOptionName => "(Server-Side) Seed Barrage Self-Damage Consistency"; public override string ConfigDescriptionString => "Seed Barrage self-damage is affected by armor, like the other 2 plant skills."; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown FireMortar2.OnEnter += new Manipulator(FireMortar2_OnEnter); } private void FireMortar2_OnEnter(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt<HealthComponent>(x, "TakeDamage") })) { val.EmitDelegate<Func<DamageInfo, DamageInfo>>((Func<DamageInfo, DamageInfo>)delegate(DamageInfo damageInfo) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) damageInfo.damageType &= DamageTypeCombo.op_Implicit((DamageType)(-3)); return damageInfo; }); } else { Debug.LogError((object)"RiskyTweaks: TreeBot SelfDamageTweaks IL Hook failed"); } } } public class UtilityKnockback : TweakBase<UtilityKnockback> { public override string ConfigCategoryString => "Survivors - REX"; public override string ConfigOptionName => "(Server-Side) Utility Knockback Rework"; public override string ConfigDescriptionString => "Reworks Utility knockback to be stronger and more consistent."; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown FireSonicBoom.OnEnter += new Manipulator(FireSonicBoom_OnEnter); } private void FireSonicBoom_OnEnter(ILContext il) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt<BullseyeSearch>(x, "RefreshCandidates") })) { val.EmitDelegate<Func<BullseyeSearch, BullseyeSearch>>((Func<BullseyeSearch, BullseyeSearch>)delegate(BullseyeSearch bullseye) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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) bullseye.searchOrigin -= bullseye.searchDirection; bullseye.maxDistanceFilter += 1f; return bullseye; }); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt<HealthComponent>(x, "TakeDamageForce") })) { val.Index -= 6; val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc, 4); val.EmitDelegate<Func<Vector3, FireSonicBoom, HurtBox, Vector3>>((Func<Vector3, FireSonicBoom, HurtBox, Vector3>)delegate(Vector3 origForce, FireSonicBoom self, HurtBox hurtBox) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)self).GetAimRay(); Vector3 val2 = 2800f * ((Ray)(ref aimRay)).direction; CharacterBody body2 = hurtBox.healthComponent.body; if (Object.op_Implicit((Object)(object)body2.characterMotor) && body2.characterMotor.isGrounded) { val2.y = Mathf.Max(val2.y, 1200f); } if (body2.isChampion && Object.op_Implicit((Object)(object)body2.characterMotor) && body2.characterMotor.isGrounded) { val2.y /= 0.7f; } return val2; }); val.Index += 3; val.Emit(OpCodes.Ldloc, 4); val.EmitDelegate<Func<float, HurtBox, float>>((Func<float, HurtBox, float>)delegate(float origForceMult, HurtBox hurtBox) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (hurtBox.healthComponent.body.bodyIndex == BodyPrefabs.SolusHeartBody.bodyIndex) { return origForceMult; } float num = 1f; CharacterBody body = hurtBox.healthComponent.body; if (Object.op_Implicit((Object)(object)body.characterMotor)) { num = body.characterMotor.mass; } else if (Object.op_Implicit((Object)(object)body.rigidbody)) { num = body.rigidbody.mass; } float num2 = Mathf.Max(num / 100f, 1f); if (body.isChampion && Object.op_Implicit((Object)(object)body.characterMotor) && body.characterMotor.isGrounded) { num2 *= 0.7f; } return num2; }); flag = false; } } if (flag) { Debug.LogError((object)"RiskyTweaks: Treebot UtilityKnockback IL Hook failed"); } } } } namespace RiskyTweaks.Tweaks.Survivors.Toolbot { public class RetoolReload : TweakBase<RetoolReload> { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnEnter <>9__8_0; internal void <ApplyChanges>b__8_0(orig_OnEnter orig, ToolbotStanceSwap self) { orig.Invoke(self); if (((EntityState)self).isAuthority) { GenericSkill primarySkill = ((ToolbotStanceBase)self).GetPrimarySkill1(); if (Object.op_Implicit((Object)(object)primarySkill)) { primarySkill.stock = primarySkill.maxStock; } GenericSkill primarySkill2 = ((ToolbotStanceBase)self).GetPrimarySkill2(); if (Object.op_Implicit((Object)(object)primarySkill2)) { primarySkill2.stock = primarySkill2.maxStock; } } } } public override string ConfigCategoryString => "Survivors - MUL-T"; public override string ConfigOptionName => "(Client-Side) Retool Reload"; public override string ConfigDescriptionString => "Retool resets primary stocks to full."; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { //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__8_0; if (obj == null) { hook_OnEnter val = delegate(orig_OnEnter orig, ToolbotStanceSwap self) { orig.Invoke(self); if (((EntityState)self).isAuthority) { GenericSkill primarySkill = ((ToolbotStanceBase)self).GetPrimarySkill1(); if (Object.op_Implicit((Object)(object)primarySkill)) { primarySkill.stock = primarySkill.maxStock; } GenericSkill primarySkill2 = ((ToolbotStanceBase)self).GetPrimarySkill2(); if (Object.op_Implicit((Object)(object)primarySkill2)) { primarySkill2.stock = primarySkill2.maxStock; } } }; <>c.<>9__8_0 = val; obj = (object)val; } ToolbotStanceSwap.OnEnter += (hook_OnEnter)obj; } } public class ScrapICBM : TweakBase<ScrapICBM> { public override string ConfigCategoryString => "Survivors - MUL-T"; public override string ConfigOptionName => "(Client-Side) Scrap Launcher - ICBM Synergy"; public override string ConfigDescriptionString => "Scrap Launcher synergizes with ICBM."; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown FireGrenadeLauncher.ModifyProjectileAimRay += new hook_ModifyProjectileAimRay(FireGrenadeLauncher_ModifyProjectileAimRay); } private Ray FireGrenadeLauncher_ModifyProjectileAimRay(orig_ModifyProjectileAimRay orig, FireGrenadeLauncher self, Ray aimRay) { //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0139: 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_0145: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && Object.op_Implicit((Object)(object)((EntityState)self).characterBody.inventory)) { int itemCount = ((EntityState)self).characterBody.inventory.GetItemCount(Items.MoreMissile); int num = itemCount - 1; if (itemCount > 0) { float num2 = 1f; if (num > 0) { num2 += 0.5f * (float)num; } ((GenericProjectileBaseState)self).damageCoefficient = ((GenericProjectileBaseState)self).damageCoefficient * num2; Vector3 val = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction); Vector3 val2 = Vector3.Cross(((Ray)(ref aimRay)).direction, val); float num3 = 0f; float num4 = 0f; float num5 = 0f; num5 = Random.Range(1f + num3, 1f + num3) * 3f; num4 = num5 / 2f; Vector3 val3 = Quaternion.AngleAxis((0f - num5) * 0.5f, val2) * ((Ray)(ref aimRay)).direction; Quaternion val4 = Quaternion.AngleAxis(num4, val2); Ray val5 = default(Ray); ((Ray)(ref val5))..ctor(((Ray)(ref aimRay)).origin, val3); for (int i = 0; i < 3; i++) { if (i != 1) { ProjectileManager.instance.FireProjectile(((GenericProjectileBaseState)self).projectilePrefab, ((Ray)(ref val5)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val5)).direction), ((EntityState)self).gameObject, ((BaseState)self).damageStat * ((GenericProjectileBaseState)self).damageCoefficient, ((GenericProjectileBaseState)self).force, ((BaseState)self).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } ((Ray)(ref val5)).direction = val4 * ((Ray)(ref val5)).direction; } } } return orig.Invoke(self, aimRay); } } public class ScrapLauncherAttackSpeed : TweakBase<ScrapLauncherAttackSpeed> { public override string ConfigCategoryString => "Survivors - MUL-T"; public override string ConfigOptionName => "(Client-Side) Scrap Launcher - Attack Speed Scaling"; public override string ConfigDescriptionString => "Scrap Launcher cooldown scales with attack speed."; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { //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) ToolbotWeaponSkillDef val = Addressables.LoadAssetAsync<ToolbotWeaponSkillDef>((object)"RoR2/Base/Toolbot/ToolbotBodyFireGrenadeLauncher.asset").WaitForCompletion(); ((SkillDef)val).attackSpeedBuffsRestockSpeed = true; ((SkillDef)val).attackSpeedBuffsRestockSpeed_Multiplier = 1f; } } public class ScrapLauncherFalloff : TweakBase<ScrapLauncherFalloff> { public override string ConfigCategoryString => "Survivors - MUL-T"; public override string ConfigOptionName => "(Server-Side) Scrap Launcher - Remove Falloff"; public override string ConfigDescriptionString => "Scrap Launcher always deals full damage to enemies in the AoE."; protected override void ApplyChanges() { //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_001d: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Toolbot/ToolbotGrenadeLauncherProjectile.prefab").WaitForCompletion(); ProjectileImpactExplosion component = val.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component).falloffModel = (FalloffModel)0; } } public class ScrapLauncherNoSpread : TweakBase<ScrapLauncherNoSpread> { public override string ConfigCategoryString => "Survivors - MUL-T"; public override string ConfigOptionName => "(Client-Side) Scrap Launcher - Remove Spread"; public override string ConfigDescriptionString => "Removes random spread."; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { SneedUtils.SetAddressableEntityStateField("RoR2/Base/Toolbot/EntityStates.Toolbot.FireGrenadeLauncher.asset", "maxSpread", "0"); } } } namespace RiskyTweaks.Tweaks.Survivors.Seeker { public class MeditateBuff : TweakBase<MeditateBuff> { private static GameObject cleanseEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Seeker/SpiritPunchMuzzleFlashVFX.prefab").WaitForCompletion(); public override string ConfigCategoryString => "Survivors - Seeker"; public override string ConfigOptionName => "(Server-Side) Meditate Buff"; public override string ConfigDescriptionString => "Meditate stuns and cleanses projectiles."; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown SeekerController.CmdTriggerHealPulse += new hook_CmdTriggerHealPulse(SeekerController_CmdTriggerHealPulse); Meditate.Update += new Manipulator(Meditate_Update); } private void Meditate_Update(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt<BlastAttack>(x, "Fire") })) { val.EmitDelegate<Func<BlastAttack, BlastAttack>>((Func<BlastAttack, BlastAttack>)delegate(BlastAttack blast) { ref DamageType damageType = ref blast.damageType.damageType; damageType = (DamageType)((uint)damageType | 0x20u); return blast; }); } else { Debug.LogError((object)"RiskyTweaks: Meditate Stun IL Hook failed."); } } private void SeekerController_CmdTriggerHealPulse(orig_CmdTriggerHealPulse orig, SeekerController self, float value, Vector3 corePosition, float blastRadius, float fxScale) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, value, corePosition, blastRadius, fxScale); if (!NetworkServer.active) { return; } List<ProjectileController> instancesList = InstanceTracker.GetInstancesList<ProjectileController>(); List<GameObject> list = new List<GameObject>(); foreach (ProjectileController item in instancesList) { TeamIndex val = (TeamIndex)((!Object.op_Implicit((Object)(object)self.characterBody.teamComponent)) ? (-1) : ((int)self.characterBody.teamComponent.teamIndex)); if (!item.cannotBeDeleted && item.teamFilter.teamIndex != val) { Vector3 val2 = ((Component)item).transform.position - ((Component)self).transform.position; if (!(((Vector3)(ref val2)).sqrMagnitude >= blastRadius * blastRadius)) { list.Add(((Component)item).gameObject); } } } GameObject[] array = list.ToArray(); for (int i = 0; i < array.Length; i++) { EffectManager.SimpleEffect(cleanseEffect, array[i].transform.position, array[i].transform.rotation, true); Object.Destroy((Object)(object)array[i]); } } } public class RemoveM2FoV : TweakBase<RemoveM2FoV> { public override string ConfigCategoryString => "Survivors - Seeker"; public override string ConfigOptionName => "(Client-Side) Remove M2 FoV Modifier"; public override string ConfigDescriptionString => "Prevents FoV from changing when using Seeker's M2."; public override bool StopLoadOnConfigDisable => false; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown UnseenHand.FixedUpdate += new Manipulator(UnseenHand_FixedUpdate); } private void UnseenHand_FixedUpdate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(EntityState), "get_cameraTargetParams") })) { val.EmitDelegate<Func<CameraTargetParams, CameraTargetParams>>((Func<CameraTargetParams, CameraTargetParams>)((CameraTargetParams orig) => null)); } else { Debug.LogError((object)"RiskyTweaks: Seeker RemoveM2FoV IL Hook failed."); } } } } namespace RiskyTweaks.Tweaks.Survivors.Railgunner { public class PolarFieldBuff : TweakBase<PolarFieldBuff> { private const float reductionFactor = 3f; public override string ConfigCategoryString => "Survivors - Railgunner"; public override string ConfigOptionName => "(Server-Side) Polar Field Damage Reduction"; public override string ConfigDescriptionString => "Projectiles slowed by Polar Field deal less damage."; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown SlowDownProjectiles.OnTriggerEnter += new hook_OnTriggerEnter(SlowDownProjectiles_OnTriggerEnter); SlowDownProjectiles.OnTriggerExit += new hook_OnTriggerExit(SlowDownProjectiles_OnTriggerExit); } private void SlowDownProjectiles_OnTriggerEnter(orig_OnTriggerEnter orig, SlowDownProjectiles self, Collider other) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)self).gameObject).name == "RailgunnerMineAltDetonated(Clone)" && Object.op_Implicit((Object)(object)self.teamFilter)) { TeamFilter component = ((Component)other).GetComponent<TeamFilter>(); if (Object.op_Implicit((Object)(object)component) && component.teamIndex != self.teamFilter.teamIndex) { ProjectileDamage component2 = ((Component)other).GetComponent<ProjectileDamage>(); if (Object.op_Implicit((Object)(object)component2)) { component2.damage /= 3f; } } } orig.Invoke(self, other); } private void SlowDownProjectiles_OnTriggerExit(orig_OnTriggerExit orig, SlowDownProjectiles self, Collider other) { //IL_003b: 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) if (((Object)((Component)self).gameObject).name == "RailgunnerMineAltDetonated(Clone)" && Object.op_Implicit((Object)(object)self.teamFilter)) { TeamFilter component = ((Component)other).GetComponent<TeamFilter>(); if (Object.op_Implicit((Object)(object)component) && component.teamIndex != self.teamFilter.teamIndex) { ProjectileDamage component2 = ((Component)other).GetComponent<ProjectileDamage>(); if (Object.op_Implicit((Object)(object)component2)) { component2.damage *= 3f; } } } orig.Invoke(self, other); } } } namespace RiskyTweaks.Tweaks.Survivors.Merc { public class M1AttackSpeed : TweakBase<M1AttackSpeed> { public override string ConfigCategoryString => "Survivors - Mercenary"; public override string ConfigOptionName => "(Client-Side) Primary Attack Speed Tweak"; public override string ConfigDescriptionString => "Third primary hit doesnt scale with attack speed to allow for Expose combos."; public override bool StopLoadOnConfigDisable => false; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown GroundLight2.OnEnter += new hook_OnEnter(GroundLight2_OnEnter); } private void GroundLight2_OnEnter(orig_OnEnter orig, GroundLight2 self) { if (base.Enabled.Value) { if (self.isComboFinisher) { ((BasicMeleeAttack)self).ignoreAttackSpeed = true; } else { ((BasicMeleeAttack)self).ignoreAttackSpeed = false; } } orig.Invoke(self); } } public class Regen : TweakBase<Regen> { public override string ConfigCategoryString => "Survivors - Mercenary"; public override string ConfigOptionName => "(Server-Side) Regen Buff"; public override string ConfigDescriptionString => "Gives Mercenary standard melee character regen."; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { GameObject val = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/MercBody"); CharacterBody component = val.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { component.baseRegen = 2.5f; component.levelRegen = 0.5f; } } } } namespace RiskyTweaks.Tweaks.Survivors.Mage { public class FasterIceWall : TweakBase<FasterIceWall> { public override string ConfigCategoryString => "Survivors - Artificer"; public override string ConfigOptionName => "(Client-Side) Snapfreeze - Instant Deploy"; public override string ConfigDescriptionString => "Snapfreeze fires as soon as you let go of the button."; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown PrepWall.FixedUpdate += new Manipulator(PrepWall_FixedUpdate); } private void PrepWall_FixedUpdate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(PrepWall), "duration") })) { val.EmitDelegate<Func<float, float>>((Func<float, float>)((float duration) => 0f)); } else { Debug.LogError((object)"RiskyTweaks: FasterIceWall IL hook failed."); } } } public class FlamethrowerGuaranteedBurn : TweakBase<FlamethrowerGuaranteedBurn> { public override string ConfigCategoryString => "Survivors - Artificer"; public override string ConfigOptionName => "(Client-Side) Flamethrower - Guaranteed Burn"; public override string ConfigDescriptionString => "Increases Flamethrower's burn chance to 100% so that it's as strong as it was before SotV's burn nerfs."; protected override void ApplyChanges() { SneedUtils.SetAddressableEntityStateField("RoR2/Base/Mage/EntityStates.Mage.Weapon.Flamethrower.asset", "ignitePercentChance", "100"); } } public class FlamethrowerRange : TweakBase<FlamethrowerRange> { public override string ConfigCategoryString => "Survivors - Artificer"; public override string ConfigOptionName => "(Client-Side) Flamethrower - Increase Range"; public override string ConfigDescriptionString => "Increases Artificer's flamethrower range from 20m to 30m to match CHEF."; protected override void ApplyChanges() { SneedUtils.SetAddressableEntityStateField("RoR2/Base/Mage/EntityStates.Mage.Weapon.Flamethrower.asset", "maxDistance", "30"); } } public class IonSurgeMoveScaling : TweakBase<IonSurgeMoveScaling> { public override string ConfigCategoryString => "Survivors - Artificer"; public override string ConfigOptionName => "(Client-Side) Ion Surge - Disable Movement Speed Scaling"; public override string ConfigDescriptionString => "Makes Ion Surge always go a consistent distance regardless of movement speed."; public override bool StopLoadOnConfigDisable => false; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown FlyUpState.HandleMovements += new Manipulator(FlyUpState_HandleMovements); } private void FlyUpState_HandleMovements(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<BaseState>(x, "moveSpeedStat") })) { int index = val.Index; val.Index = index + 1; val.EmitDelegate<Func<float, float>>((Func<float, float>)((float orig) => base.Enabled.Value ? 7f : orig)); } else { Debug.LogError((object)"RiskyTweaks: IonSurgeMoveScaling IL hook failed."); } } } } namespace RiskyTweaks.Tweaks.Survivors.Loader { public class SprintQoL : TweakBase<SprintQoL> { public override string ConfigCategoryString => "Survivors - Loader"; public override string ConfigOptionName => "(Client-Side) Sprint QoL"; public override string ConfigDescriptionString => "Non-primary skills don't cancel sprinting."; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { //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_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_002e: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) SkillDef val = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Loader/FireHook.asset").WaitForCompletion(); SkillDef val2 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Loader/FireYankHook.asset").WaitForCompletion(); SkillDef val3 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Loader/ChargeFist.asset").WaitForCompletion(); SkillDef val4 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Loader/ChargeZapFist.asset").WaitForCompletion(); val.cancelSprintingOnActivation = false; val2.cancelSprintingOnActivation = false; val3.cancelSprintingOnActivation = false; val4.cancelSprintingOnActivation = false; SkillDef val5 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Loader/GroundSlam.asset").WaitForCompletion(); val5.cancelSprintingOnActivation = false; SkillDef val6 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Loader/ThrowPylon.asset").WaitForCompletion(); val6.cancelSprintingOnActivation = false; } } } namespace RiskyTweaks.Tweaks.Survivors.Huntress { public class Tracking : TweakBase<Tracking> { public ConfigEntry<SortMode> trackingMode; public override string ConfigCategoryString => "Survivors - Huntress"; public override string ConfigOptionName => "(Client-Side) Tracking Tweaks"; public override string ConfigDescriptionString => "Makes Huntress target the enemy closest to your crosshair, and increases the targeting angle."; public override bool StopLoadOnConfigDisable => true; protected override void ReadConfig(ConfigFile config) { base.ReadConfig(config); trackingMode = config.Bind<SortMode>(ConfigCategoryString, ConfigOptionName + " - Tracking Mode", (SortMode)2, "Type of tracking to use. Vanilla is by Distance only."); } protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown HuntressTracker.Start += new hook_Start(HuntressTracker_Start); HuntressTracker.SearchForTarget += new Manipulator(HuntressTracker_SearchForTarget); } private void HuntressTracker_Start(orig_Start orig, HuntressTracker self) { orig.Invoke(self); self.maxTrackingAngle = 45f; } private void HuntressTracker_SearchForTarget(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(BullseyeSearch), "sortMode") })) { val.EmitDelegate<Func<SortMode, SortMode>>((Func<SortMode, SortMode>)((SortMode orig) => trackingMode.Value)); } else { Debug.LogError((object)"RiskyTweaks: Huntress Tracking IL Hook failed"); } } } } namespace RiskyTweaks.Tweaks.Survivors.FalseSon { public class LaserProcCoefficient : TweakBase<LaserProcCoefficient> { public override string ConfigCategoryString => "Survivors - False Son"; public override string ConfigOptionName => "(Client-Side) Laser of the Father - Increase Proc Coefficient"; public override string ConfigDescriptionString => "Increases Laser of the Father proc coefficient to 1."; protected override void ApplyChanges() { SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/FalseSon/EntityStates.FalseSon.LaserFatherCharged.asset", "procCoefficientPerTick", "1"); } } public class SlamHiddenCooldown : TweakBase<SlamHiddenCooldown> { public override string ConfigCategoryString => "Survivors - False Son"; public override string ConfigOptionName => "(Client-Side) Club of the Forsaken - Remove Slam Cooldown"; public override string ConfigDescriptionString => "Removes hidden non-scaling cooldown from Club of the Forsaken's slam."; protected override void ApplyChanges() { SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/FalseSon/EntityStates.FalseSon.ClubSwing.asset", "secondaryAltCooldownDuration", "0"); } } public class SlamProcCoefficient : TweakBase<SlamProcCoefficient> { public override string ConfigCategoryString => "Survivors - False Son"; public override string ConfigOptionName => "(Client-Side) Club of the Forsaken - Reduce Proc Coefficient"; public override string ConfigDescriptionString => "Reduces fully-charged Club of the Forsaken proc coefficient to 1."; protected override void ApplyChanges() { SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/FalseSon/EntityStates.FalseSon.ChargedClubSwing.asset", "unchargedBlastProcCoefficient", "1"); SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/FalseSon/EntityStates.FalseSon.ChargedClubSwing.asset", "blastProcCoefficient", "1"); SneedUtils.SetAddressableEntityStateField("RoR2/DLC2/FalseSon/EntityStates.FalseSon.ClubGroundSlam.asset", "blastProcCoefficient", "1"); } } } namespace RiskyTweaks.Tweaks.Survivors.Engi { public class MobileTurretBuff : TweakBase<MobileTurretBuff> { public override string ConfigCategoryString => "Survivors - Engineer"; public override string ConfigOptionName => "(Server-Side) Mobile Turret Buff"; public override string ConfigDescriptionString => "Mobile Turrets always sprint and have a longer range."; protected override void ApplyChanges() { //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_001d: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiWalkerTurretBody.prefab").WaitForCompletion(); CharacterBody component = val.GetComponent<CharacterBody>(); component.bodyFlags = (BodyFlags)(component.bodyFlags | 1); if (component.baseRegen < 1f) { component.baseRegen = 1f; component.levelRegen = 0.2f; } SneedUtils.SetAddressableEntityStateField("RoR2/Base/Engi/EntityStates.EngiTurret.EngiTurretWeapon.FireBeam.asset", "maxDistance", "45"); Component[] components = (Component[])(object)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiWalkerTurretMaster.prefab").WaitForCompletion().GetComponents<AISkillDriver>(); Component[] array = components; Component[] array2 = array; for (int i = 0; i < array2.Length; i++) { AISkillDriver val2 = (AISkillDriver)array2[i]; if (val2.customName != "Rest") { val2.shouldSprint = true; } if (val2.customName == "ChaseAndFireAtEnemy") { val2.maxDistance = 45f; } } } } } namespace RiskyTweaks.Tweaks.Survivors.Croco { public class BiggerHitbox : TweakBase<BiggerHitbox> { public override string ConfigCategoryString => "Survivors - Acrid"; public override string ConfigOptionName => "(Client-Side) Bigger Melee Hitbox"; public override string ConfigDescriptionString => "Increases melee hitbox size."; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { //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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Croco/CrocoBody.prefab").WaitForCompletion().GetComponent<CharacterBody>(); HitBoxGroup componentInChildren = ((Component)component).GetComponentInChildren<HitBoxGroup>(); if (componentInChildren.groupName == "Slash") { Transform transform = ((Component)componentInChildren.hitBoxes[0]).transform; transform.localScale = new Vector3(40f, 40f, 45f); transform.localPosition = new Vector3(0f, 11f, 15f); } } } public class PoisonDamageCap : TweakBase<PoisonDamageCap> { public override string ConfigCategoryString => "Survivors - Acrid"; public override string ConfigOptionName => "(Server-Side) Remove Poison Damage Cap"; public override string ConfigDescriptionString => "Removes the hidden damage cap of Poison"; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown DotController.AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1 += new Manipulator(DotController_AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1); } private void DotController_AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 50f) })) { val.Index += 2; val.EmitDelegate<Func<float, float>>((Func<float, float>)((float orig) => float.MaxValue)); } else { Debug.LogError((object)"RiskyTweaks: Croco PoisonDamageCap IL Hook failed"); } } } public class Regenerative : TweakBase<Regenerative> { public override string ConfigCategoryString => "Survivors - Acrid"; public override string ConfigOptionName => "(Server-Side) Regenerative is Healing"; public override string ConfigDescriptionString => "Regenerative counts as healing and is no longer affected by difficulty regen modifiers."; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown CharacterBody.RecalculateStats += new Manipulator(CharacterBody_RecalculateStats); HealthComponent.ServerFixedUpdate += new hook_ServerFixedUpdate(HealthComponent_ServerFixedUpdate); } private void CharacterBody_RecalculateStats(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "CrocoRegen") })) { val.EmitDelegate<Func<BuffDef, BuffDef>>((Func<BuffDef, BuffDef>)((BuffDef orig) => null)); } else { Debug.LogError((object)"RiskyTweaks: Croco Regenerative IL hook failed."); } } private void HealthComponent_ServerFixedUpdate(orig_ServerFixedUpdate orig, HealthComponent self, float deltaTime) { //IL_0040: 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) orig.Invoke(self, deltaTime); if (Object.op_Implicit((Object)(object)self.body)) { int buffCount = self.body.GetBuffCount(Buffs.CrocoRegen); if (buffCount > 0) { self.HealFraction(0.1f * deltaTime * (float)buffCount, default(ProcChainMask)); } } } } } namespace RiskyTweaks.Tweaks.Survivors.CHEF { public class GlazeInterrupt : TweakBase<GlazeInterrupt> { public override string ConfigCategoryString => "Survivors - CHEF"; public override string ConfigOptionName => "(Client-Side) Glaze InterruptPriority"; public override string ConfigDescriptionString => "Glaze is no longer interrupted by Sear."; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown Glaze.GetMinimumInterruptPriority += new hook_GetMinimumInterruptPriority(Glaze_GetMinimumInterruptPriority); } private InterruptPriority Glaze_GetMinimumInterruptPriority(orig_GetMinimumInterruptPriority orig, Glaze self) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)((self.grenadeCount < Glaze.grenadeCountMax) ? 3 : 2); } } public class SnappierCleaver : TweakBase<SnappierCleaver> { public override string ConfigCategoryString => "Survivors - CHEF"; public override string ConfigOptionName => "(Server-Side) Snappier Dice"; public override string ConfigDescriptionString => "Dice has a shorter minimum delay before returning."; protected override void ApplyChanges() { //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) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Chef/ChefCleaver.prefab").WaitForCompletion(); CleaverProjectile component = val.GetComponent<CleaverProjectile>(); component.minTravelTime = 0.2f; } } } namespace RiskyTweaks.Tweaks.Survivors.Captain { public class ChargedShotgunFalloff : TweakBase<ChargedShotgunFalloff> { public override string ConfigCategoryString => "Survivors - Captain"; public override string ConfigOptionName => "(Client-Side) Charged Shotgun Falloff"; public override string ConfigDescriptionString => "Vulcan Shotgun has no falloff when fully charged"; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown FireCaptainShotgun.ModifyBullet += new hook_ModifyBullet(FireCaptainShotgun_ModifyBullet); } private void FireCaptainShotgun_ModifyBullet(orig_ModifyBullet orig, FireCaptainShotgun self, BulletAttack bulletAttack) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, bulletAttack); if (((GenericBulletBaseState)self).fireSoundString == "FireCaptainShotgun.tightSoundString") { bulletAttack.falloffModel = (FalloffModel)0; } } } internal class OrbitalHiddenRealms : TweakBase<OrbitalHiddenRealms> { public override string ConfigCategoryString => "Survivors - Captain"; public override string ConfigOptionName => "(Client-Side) Orbital Skills in Hidden Realms"; public override string ConfigDescriptionString => "Allows Orbital Skills to be used in Hidden Realms."; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown Hook val = new Hook((MethodBase)Reflection.GetMethodCached(typeof(CaptainOrbitalSkillDef), "get_isAvailable"), Reflection.GetMethodCached(typeof(OrbitalHiddenRealms), "IsAvailable")); } private static bool IsAvailable(CaptainOrbitalSkillDef self) { return true; } } } namespace RiskyTweaks.Tweaks.Survivors.Bandit2 { public class BlastPierce : TweakBase<BlastPierce> { public override string ConfigCategoryString => "Survivors - Bandit"; public override string ConfigOptionName => "(Client-Side) Blast - Pierce Enemies"; public override string ConfigDescriptionString => "Blast can pierce through multiple enemies."; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown Bandit2FireRifle.ModifyBullet += new hook_ModifyBullet(Bandit2FireRifle_ModifyBullet); } private void Bandit2FireRifle_ModifyBullet(orig_ModifyBullet orig, Bandit2FireRifle self, BulletAttack bulletAttack) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, bulletAttack); bulletAttack.stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask; } } public class BlastSpread : TweakBase<BlastSpread> { public override string ConfigCategoryString => "Survivors - Bandit"; public override string ConfigOptionName => "(Client-Side) Blast - Reduce Spread"; public override string ConfigDescriptionString => "Blast spread is reduced."; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown Bandit2FireRifle.ModifyBullet += new hook_ModifyBullet(Bandit2FireRifle_ModifyBullet); } private void Bandit2FireRifle_ModifyBullet(orig_ModifyBullet orig, Bandit2FireRifle self, BulletAttack bulletAttack) { orig.Invoke(self, bulletAttack); bulletAttack.maxSpread *= 0.5f; bulletAttack.minSpread = 0f; } } public class BuffSuperBleed : TweakBase<BuffSuperBleed> { private bool hookIsApplied = false; public override string ConfigCategoryString => "Survivors - Bandit"; public override string ConfigOptionName => "(Server-Side) Hemorrhage Ignores Armor"; public override string ConfigDescriptionString => "Hemorrhage ignores positive armor."; protected override void ApplyChanges() { AddHook(); } public void AddHook() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown if (!hookIsApplied) { HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess); hookIsApplied = true; } } public void RemoveHook() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown if (hookIsApplied) { HealthComponent.TakeDamageProcess -= new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess); hookIsApplied = false; } } private void HealthComponent_TakeDamageProcess(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) if ((int)damageInfo.dotIndex == 6 && DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 0L && DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)131072)) == 0) { float num = self.body.armor + self.adaptiveArmorValue; if (num > 0f) { damageInfo.damage *= (100f + num) / 100f; } } orig.Invoke(self, damageInfo); } } public class CloakHoldButton : TweakBase<CloakHoldButton> { private const float minCloakDuration = 0.3f; public override string ConfigCategoryString => "Survivors - Bandit"; public override string ConfigOptionName => "(Client-Side) Smokebomb Auto Trigger on Hold"; public override string ConfigDescriptionString => "Smokebomb automatically triggers as soon as it is available if the button is held."; protected override void ApplyChanges() { //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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Bandit2/ThrowSmokebomb.asset").WaitForCompletion().mustKeyPress = false; ThrowSmokebomb.GetMinimumInterruptPriority += new hook_GetMinimumInterruptPriority(ThrowSmokebomb_GetMinimumInterruptPriority); StealthMode.GetMinimumInterruptPriority += new hook_GetMinimumInterruptPriority(StealthMode_GetMinimumInterruptPriority); } private InterruptPriority StealthMode_GetMinimumInterruptPriority(orig_GetMinimumInterruptPriority orig, StealthMode self) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)((((EntityState)self).fixedAge > 0.3f) ? 1 : 7); } private InterruptPriority ThrowSmokebomb_GetMinimumInterruptPriority(orig_GetMinimumInterruptPriority orig, ThrowSmokebomb self) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)((((EntityState)self).fixedAge > 0.3f) ? 2 : 3); } } public class KnifeHitbox : TweakBase<KnifeHitbox> { public override string ConfigCategoryString => "Survivors - Bandit"; public override string ConfigOptionName => "(Client-Side) Knife Hitbox"; public override string ConfigDescriptionString => "Increases knife hitbox size."; protected override void ApplyChanges() { //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_0055: 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_0077: 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) CharacterBody component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/Bandit2Body.prefab").WaitForCompletion().GetComponent<CharacterBody>(); HitBoxGroup componentInChildren = ((Component)component).GetComponentInChildren<HitBoxGroup>(); if (componentInChildren.groupName == "SlashBlade") { Transform transform = ((Component)componentInChildren.hitBoxes[0]).transform; transform.localScale = new Vector3(10.35f, 6f, 7.5f); transform.localPosition += new Vector3(0f, 0f, 1f); } } } public class KnifeLunge : TweakBase<KnifeLunge> { private AnimationCurve knifeVelocity; public override string ConfigCategoryString => "Survivors - Bandit"; public override string ConfigOptionName => "(Client-Side) Knife Lunge"; public override string ConfigDescriptionString => "Lunge forwards when using Serrated Dagger."; protected override void ApplyChanges() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown knifeVelocity = BuildSlashVelocityCurve(); SkillDef val = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Bandit2/SlashBlade.asset").WaitForCompletion(); val.canceledFromSprinting = false; SlashBlade.OnEnter += new hook_OnEnter(SlashBlade_OnEnter); SneedUtils.SetAddressableEntityStateField("RoR2/Base/Bandit2/EntityStates.Bandit2.Weapon.SlashBlade.asset", "ignoreAttackSpeed", "1"); Hook val2 = new Hook((MethodBase)Reflection.GetMethodCached(typeof(SlashBlade), "get_minimumDuration"), Reflection.GetMethodCached(typeof(KnifeLunge), "GetBandit2SlashBladeMinDurationHook")); } private void SlashBlade_OnEnter(orig_OnEnter orig, SlashBlade self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && ((EntityState)self).characterBody.isSprinting) { ((BasicMeleeAttack)self).ignoreAttackSpeed = true; ((BasicMeleeAttack)self).forceForwardVelocity = true; ((BasicMeleeAttack)self).forwardVelocityCurve = knifeVelocity; } } private static float GetBandit2SlashBladeMinDurationHook(SlashBlade self) { return 0.3f; } private AnimationCurve BuildSlashVelocityCurve() { //IL_007a: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown Keyframe val = default(Keyframe); ((Keyframe)(ref val))..ctor(0f, 3f, -8.182907f, -3.3333333f, 0f, 0.058712736f); ((Keyframe)(ref val)).weightedMode = (WeightedMode)0; ((Keyframe)(ref val)).tangentMode = 65; Keyframe val2 = default(Keyframe); ((Keyframe)(ref val2))..ctor(0.3f, 0f, -3.3333333f, -3.3333333f, 1f / 3f, 1f / 3f); ((Keyframe)(ref val2)).weightedMode = (WeightedMode)0; ((Keyframe)(ref val2)).tangentMode = 34; Keyframe[] keys = (Keyframe[])(object)new Keyframe[2] { val, val2 }; return new AnimationCurve { preWrapMode = (WrapMode)8, postWrapMode = (WrapMode)8, keys = keys }; } } public class PrimaryAutoFire : TweakBase<PrimaryAutoFire> { public static class FireMode { public enum Bandit2FireMode { Default, Spam } private static bool initialized = false; public static Bandit2FireMode currentfireMode = Bandit2FireMode.Default; public static ConfigEntry<bool> Enabled; public static ConfigEntry<KeyboardShortcut> defaultButton; public static ConfigEntry<KeyboardShortcut> spamButton; public static List<SkillDef> targetSkills = new List<SkillDef> { (SkillDef)(object)Addressables.LoadAssetAsync<ReloadSkillDef>((object)"RoR2/Base/Bandit2/FireShotgun2.asset").WaitForCompletion(), (SkillDef)(object)Addressables.LoadAssetAsync<ReloadSkillDef>((object)"RoR2/Base/Bandit2/Bandit2Blast.asset").WaitForCompletion() }; private static BodyIndex targetBodyIndex; internal static void Init(ConfigFile config) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown if (!initialized) { initialized = true; ReadConfig(config); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); SkillIcon.Update += new hook_Update(SkillIcon_Update); FireSelectManager.FireModeActions = (FireSelectManager.FireMode)Delegate.Combine(FireSelectManager.FireModeActions, new FireSelectManager.FireMode(FireModeAction)); } } private static void ReadConfig(ConfigFile config) { //IL_003e: 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) Enabled = config.Bind<bool>("Fire Select - Bandit Primary Autofire", "Use Fire Select", true, "Enable firemode selection. Requires Bandit Primary Autofire to be enabled."); Enabled.SettingChanged += Enabled_SettingChanged; defaultButton = config.Bind<KeyboardShortcut>("Fire Select - Bandit Primary Autofire", "Default Button", KeyboardShortcut.Empty, "Button to select Default firemode."); spamButton = config.Bind<KeyboardShortcut>("Fire Select - Bandit Primary Autofire", "Spam Button", KeyboardShortcut.Empty, "Button to select Spam firemode."); } private static void Enabled_SettingChanged(object sender, EventArgs e) { if (!Enabled.Value) { currentfireMode = Bandit2FireMode.Default; } } private static void OnLoad() { //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) targetBodyIndex = BodyCatalog.FindBodyIndex("Bandit2Body"); } private static void SkillIcon_Update(orig_Update orig, SkillIcon self) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Invalid comparison between Unknown and I4 //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) orig.Invoke(self); if (Enabled.Value && Object.op_Implicit((Object)(object)self.targetSkill) && (int)self.targetSkillSlot == 0 && self.targetSkill.characterBody.bodyIndex == targetBodyIndex && targetSkills.Contains(self.targetSkill.skillDef)) { ((Component)self.stockText).gameObject.SetActive(true); ((TMP_Text)self.stockText).fontSize = 12f; ((TMP_Text)self.stockText).SetText(currentfireMode.ToString() + "(" + self.targetSkill.stock + ")", true); } } private static void CycleFireMode() { if (currentfireMode == Bandit2FireMode.Default) { currentfireMode = Bandit2FireMode.Spam; } else { currentfireMode = Bandit2FireMode.Default; } } private static void FireModeAction() { //IL_0017: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) if (Enabled.Value) { float y = Input.mouseScrollDelta.y; KeyboardShortcut value = FireSelectManager.nextButton.Value; bool flag = ((KeyboardShortcut)(ref value)).IsDown(); value = FireSelectManager.prevButton.Value; bool flag2 = ((KeyboardShortcut)(ref value)).IsDown(); if ((FireSelectManager.scrollSelection.Value && y != 0f) || flag || flag2) { CycleFireMode(); } if (SneedUtils.GetKeyPressed(defaultButton)) { currentfireMode = Bandit2FireMode.Default; } else if (SneedUtils.GetKeyPressed(spamButton)) { currentfireMode = Bandit2FireMode.Spam; } } } } public override string ConfigCategoryString => "Survivors - Bandit"; public override string ConfigOptionName => "(Client-Side) Primary Autofire"; public override string ConfigDescriptionString => "Primaries automatically fire when holding down the button."; protected override void ReadConfig(ConfigFile config) { base.ReadConfig(config); FireMode.Init(config); } protected override void ApplyChanges() { //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_001d: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown ReloadSkillDef val = Addressables.LoadAssetAsync<ReloadSkillDef>((object)"RoR2/Base/Bandit2/FireShotgun2.asset").WaitForCompletion(); ((SkillDef)val).mustKeyPress = false; ((SkillDef)val).interruptPriority = (InterruptPriority)1; ReloadSkillDef val2 = Addressables.LoadAssetAsync<ReloadSkillDef>((object)"RoR2/Base/Bandit2/Bandit2Blast.asset").WaitForCompletion(); ((SkillDef)val2).mustKeyPress = false; ((SkillDef)val2).interruptPriority = (InterruptPriority)1; Bandit2FirePrimaryBase.GetMinimumInterruptPriority += new hook_GetMinimumInterruptPriority(Bandit2FirePrimaryBase_GetMinimumInterruptPriority); Bandit2FirePrimaryBase.OnEnter += new hook_OnEnter(Bandit2FirePrimaryBase_OnEnter); } private void Bandit2FirePrimaryBase_OnEnter(orig_OnEnter orig, Bandit2FirePrimaryBase self) { if (FireMode.currentfireMode == FireMode.Bandit2FireMode.Default) { self.minimumBaseDuration = 0.3f; } else { self.minimumBaseDuration = 0.12f; } orig.Invoke(self); } private InterruptPriority Bandit2FirePrimaryBase_GetMinimumInterruptPriority(orig_GetMinimumInterruptPriority orig, Bandit2FirePrimaryBase self) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)self).fixedAge <= self.minimumDuration && ((EntityState)self).inputBank.skill1.wasDown) { return (InterruptPriority)2; } return (InterruptPriority)0; } } public class SpecialHold : TweakBase<SpecialHold> { public override string ConfigCategoryString => "Survivors - Bandit"; public override string ConfigOptionName => "(Client-Side) Special Hold Button"; public override string ConfigDescriptionString => "Revolver skills only fire after releasing the button."; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown BasePrepSidearmRevolverState.FixedUpdate += new Manipulator(BasePrepSidearmRevolverState_FixedUpdate); } private void BasePrepSidearmRevolverState_FixedUpdate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(EntityState), "get_fixedAge") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, BasePrepSidearmRevolverState, float>>((Func<float, BasePrepSidearmRevolverState, float>)((float fixedAge, BasePrepSidearmRevolverState self) => (((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).inputBank) && ((EntityState)self).inputBank.skill4.down) ? (-1f) : fixedAge)); } } } public class SpecialSprint : TweakBase<SpecialSprint> { public override string ConfigCategoryString => "Survivors - Bandit"; public override string ConfigOptionName => "(Client-Side) Special Disable Sprint Cancel"; public override string ConfigDescriptionString => "Sprinting no longer cancels Revolver skills."; protected override void ApplyChanges() { //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_001e: 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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Bandit2/SkullRevolver.asset").WaitForCompletion().canceledFromSprinting = false; Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Bandit2/ResetRevolver.asset").WaitForCompletion().canceledFromSprinting = false; BaseSidearmState.FixedUpdate += new Manipulator(BaseSidearmState_FixedUpdate); } private void BaseSidearmState_FixedUpdate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(CharacterBody), "get_isSprinting") })) { val.EmitDelegate<Func<bool, bool>>((Func<bool, bool>)((bool isSprinting) => false)); } else { Debug.LogError((object)"RiskyTweaks: Bandit SpecialSprint IL Hook failed."); } } } } namespace RiskyTweaks.Tweaks.Stages { public class ArtifactWorldDropChance : TweakBase<ArtifactWorldDropChance> { private static int killCount; public override string ConfigCategoryString => "Stages"; public override string ConfigOptionName => "(Server-Side) Bulwarks Ambry - Anti Softlock"; public override string ConfigDescriptionString => "Artifact Keys are guaranteed to drop after a certain amount of kills."; public override bool StopLoadOnConfigDisable => true; protected override void ApplyChanges() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown Stage.onStageStartGlobal += ResetKillCount; CombatState.OnCharacterDeathGlobal += new hook_OnCharacterDeathGlobal(ArtifactKeyDrop); ArtifactTrialMissionController.OnStartServer += new hook_OnStartServer(ArtifactTrialMissionController_OnStartServer); } private void ArtifactTrialMissionController_OnStartServer(orig_OnStartServer orig, ArtifactTrialMissionController self) { orig.Invoke(self); if (self.chanceForKeyDrop < 0.04f) { self.chanceForKeyDrop = 0.04f; } } private void ResetKillCount(Stage obj) { killCount = 0; } private void ArtifactKeyDrop(orig_OnCharacterDeathGlobal orig, EntityState self, DamageReport damageReport) { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) ArtifactTrialMissionControllerBaseState val = (ArtifactTrialMissionControllerBaseState)(object)((self is ArtifactTrialMissionControllerBaseState) ? self : null); bool flag = Util.CheckRoll(Util.GetExpAdjustedDropChancePercent(val.missionController.chanceForKeyDrop * 100f, ((Component)damageReport.victim).gameObject), 0f, (CharacterMaster)null); int num = Mathf.CeilToInt(1f / val.missionController.chanceForKeyDrop); killCount++; if (killCount > num) { flag = true; } if (flag) { killCount = 0; Debug.LogFormat("Creating artifact key pickup droplet.", Array.Empty<object>()); PickupDropletController.CreatePickupDroplet(val.missionController.GenerateDrop(), damageReport.victimBody.corePosition, Vector3.up * 20f); } } } } namespace RiskyTweaks.Tweaks.Stages.VoidStage { public class FasterHoldout : TweakBase<FasterHoldout> { public override string ConfigCategoryString => "Stages - Void Locus"; public override string ConfigOptionName => "(Server-Side) Faster Holdout"; public override string ConfigDescriptionString => "Reduce time it takes to charge Void Signals."; protected override void ApplyChanges() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (ModCompat.TeleExpansionCompat.pluginLoaded) { Debug.LogWarning((object)"RiskyTweaks: Skipped Void Locus FasterHoldout because TeleExpansion is loaded."); return; } GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/DeepVoidPortalBattery/DeepVoidPortalBattery.prefab").WaitForCompletion(); HoldoutZoneController component = val.GetComponent<HoldoutZoneController>(); if (Object.op_Implicit((Object)(object)component)) { component.baseChargeDuration = 40f; } } } public class NerfFog : TweakBase<NerfFog> { public override string ConfigCategoryString => "Stages - Void Locus"; public override string ConfigOptionName => "(Server-Side) Nerf Fog"; public override string ConfigDescriptionString => "Nerfs fog damage settings to be consistent with Void Fields."; protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown VoidStageMissionController.RequestFog += new hook_RequestFog(VoidStageMissionController_RequestFog); } private FogRequest VoidStageMissionController_RequestFog(orig_RequestFog orig, VoidStageMissionController self, IZone zone) { if (Object.op_Implicit((Object)(object)self.fogDamageController)) { self.fogDamageController.healthFractionPerSecond = 0.025f; self.fogDamageController.healthFractionRampCoefficientPerSecond = 0f; } return orig.Invoke(self, zone); } } public class PillarsDropItems : TweakBase<PillarsDropItems> { private static Vector3 rewardPositionOffset = new Vector3(0f, 3f, 0f); public static float whiteChance = 45f; public static float greenChance = 40f; public static float redChance = 5f; public static float voidChance = 10f; public override string ConfigCategoryString => "Stages - Void Locus"; public override string ConfigOptionName => "(Server-Side) Signals Drop Items"; public override string ConfigDescriptionString => "Signals drop items for the team on completion."; protected override void ReadConfig(ConfigFile config) { base.ReadConfig(config); whiteChance = config.Bind<float>(ConfigCategoryString, ConfigOptionName + " - Tier1 Chance", 45f, "Chance to drop white items.").Value; greenChance = config.Bind<float>(ConfigCategoryString, ConfigOptionName + " - Tier2 Chance", 40f, "Chance to drop green items.").Value; redChance = config.Bind<float>(ConfigCategoryString, ConfigOptionName + " - Tier3 Chance", 5f, "Chance to drop red items.").Value; voidChance = config.Bind<float>(ConfigCategoryString, ConfigOptionName + " - Void Chance", 10f, "Chance to drop Void items.").Value; } protected override void ApplyChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HoldoutZoneController.OnDisable += new hook_OnDisable(HoldoutZoneController_OnDisable); } private void HoldoutZoneController_OnDisable(orig_OnDisable orig, HoldoutZoneController self) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_0078: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected I4, but got Unknown //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: 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) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!NetworkServer.active) { return; } SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); if (!Object.op_Implicit((Object)(object)sceneDefForCurrentScene) || !sceneDefForCurrentScene.baseSceneName.Equals("voidstage")) { return; } PickupDropTable val = SelectItem(); UniquePickup val2 = val.Gen