Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of Brynza API v1.6.0
patchers/BrynzaPatcher.dll
Decompiled 5 days agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using Microsoft.CodeAnalysis; using Mono.Cecil; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BrynzaPatcher")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+ae494137538e5e5c0d5fe63b93b7937e38f5424e")] [assembly: AssemblyProduct("BrynzaPatcher")] [assembly: AssemblyTitle("BrynzaPatcher")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BrynzaAPI { internal static class Ror2Patcher { [CompilerGenerated] private sealed class <get_TargetDLLs>d__1 : IEnumerable<string>, IEnumerable, IEnumerator<string>, IEnumerator, IDisposable { private int <>1__state; private string <>2__current; private int <>l__initialThreadId; string IEnumerator<string>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <get_TargetDLLs>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = "RoR2.dll"; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<string> IEnumerable<string>.GetEnumerator() { if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; return this; } return new <get_TargetDLLs>d__1(0); } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<string>)this).GetEnumerator(); } } public static IEnumerable<string> TargetDLLs { [IteratorStateMachine(typeof(<get_TargetDLLs>d__1))] get { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <get_TargetDLLs>d__1(-2); } } public static void Patch(AssemblyDefinition assembly) { PatchGenericSkill(assembly); PatchCharacterMotor(assembly); PatchProjectileExplosion(assembly); PatchBulletAttack(assembly); PatchBlastAttack(assembly); PatchCharacterBody(assembly); PatchCharacterModel(assembly); PatchRow(assembly); PatchDamageInfo(assembly); PatchLoadoutPanelController(assembly); PatchAimAnimator(assembly); PatchEffectDef(assembly); } private static void PatchCharacterBody(AssemblyDefinition assembly) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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 TypeDefinition type = assembly.MainModule.GetType("RoR2", "CharacterBody"); TypeDefinition type2 = assembly.MainModule.GetType("RoR2.Run/FixedTimeStamp"); if (type != null) { type.Fields.Add(new FieldDefinition("bapi_baseWallJumpCount", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(int)))); type.Fields.Add(new FieldDefinition("bapi_maxWallJumpCount", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(int)))); type.Fields.Add(new FieldDefinition("bapi_clientBuffs", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(int[])))); type.Fields.Add(new FieldDefinition("bapi_lastJumpTime", (FieldAttributes)6, assembly.MainModule.ImportReference((TypeReference)(object)type2))); } } private static void PatchAimAnimator(AssemblyDefinition assembly) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("RoR2", "AimAnimator"); if (type != null) { type.Fields.Add(new FieldDefinition("bapi_pitchClipCycleStart", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(float)))); type.Fields.Add(new FieldDefinition("bapi_yawClipCycleStart", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(float)))); } } private static void PatchEffectDef(AssemblyDefinition assembly) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("RoR2", "EffectData"); if (type != null) { type.Fields.Add(new FieldDefinition("bapi_scale", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(Vector3?)))); } } private static void PatchCharacterModel(AssemblyDefinition assembly) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("RoR2.CharacterModel/RendererInfo"); if (type != null) { type.Fields.Add(new FieldDefinition("bapi_dontFadeCloseOn", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); } } private static void PatchEntityStateMachine(AssemblyDefinition assembly) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("RoR2", "EntityStateMachine"); if (type != null) { type.Methods.Add(new MethodDefinition("bapi_SetStateToMain", (MethodAttributes)6, assembly.MainModule.ImportReference(typeof(void)))); } } private static void PatchSkillDef(AssemblyDefinition assembly) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("RoR2.Skills", "SkillDef"); if (type != null) { type.Methods.Add(new MethodDefinition("bapi_CanApplyAmmoPack", (MethodAttributes)64, assembly.MainModule.ImportReference(typeof(bool)))); } } private static void PatchBulletAttack(AssemblyDefinition assembly) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("RoR2", "BulletAttack"); if (type != null) { type.Fields.Add(new FieldDefinition("bapi_ignoredHealthComponentList", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(List<object>)))); type.Fields.Add(new FieldDefinition("bapi_ignoreHitTargets", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type.Fields.Add(new FieldDefinition("bapi_forceMassIsOne", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type.Fields.Add(new FieldDefinition("bapi_forceAlwaysApply", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type.Fields.Add(new FieldDefinition("bapi_forceDisableAirControlUntilCollision", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type.Fields.Add(new FieldDefinition("bapi_bonusForce", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(Vector3)))); type.Fields.Add(new FieldDefinition("bapi_noWeaponIfOwner", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); } } private static void PatchBlastAttack(AssemblyDefinition assembly) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: 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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("RoR2", "BlastAttack"); TypeDefinition type2 = assembly.MainModule.GetType("RoR2.BlastAttack/BlastAttackDamageInfo"); if (type != null) { type.Fields.Add(new FieldDefinition("bapi_forceMassIsOne", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type.Fields.Add(new FieldDefinition("bapi_forceAlwaysApply", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type.Fields.Add(new FieldDefinition("bapi_forceDisableAirControlUntilCollision", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type2.Fields.Add(new FieldDefinition("bapi_forceMassIsOne", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type2.Fields.Add(new FieldDefinition("bapi_forceAlwaysApply", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type2.Fields.Add(new FieldDefinition("bapi_forceDisableAirControlUntilCollision", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); } } private static void PatchDamageInfo(AssemblyDefinition assembly) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("RoR2", "DamageInfo"); if (type != null) { type.Fields.Add(new FieldDefinition("bapi_forceMassIsOne", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type.Fields.Add(new FieldDefinition("bapi_forceAlwaysApply", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type.Fields.Add(new FieldDefinition("bapi_forceDisableAirControlUntilCollision", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); } } private static void PatchProjectileExplosion(AssemblyDefinition assembly) { } private static void PatchGenericSkill(AssemblyDefinition assembly) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("RoR2", "GenericSkill"); if (type != null) { type.Fields.Add(new FieldDefinition("bapi_extraSkills", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(List<object>)))); type.Fields.Add(new FieldDefinition("bapi_linkedSkill", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(object)))); type.Fields.Add(new FieldDefinition("bapi_section", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(string)))); } } private static void PatchRow(AssemblyDefinition assembly) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("RoR2.UI.LoadoutPanelController/Row"); if (type != null) { type.Fields.Add(new FieldDefinition("bapi_section", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(string)))); } } private static void PatchLoadoutPanelController(AssemblyDefinition assembly) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("RoR2.UI", "LoadoutPanelController"); if (type != null) { type.Fields.Add(new FieldDefinition("bapi_sections", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(List<string>)))); } } private static void PatchSkillLocator(AssemblyDefinition assembly) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("RoR2", "SkillLocator"); if (type != null) { type.Fields.Add(new FieldDefinition("bapi_bonusSkills", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(List<object>)))); } } private static void PatchCharacterMotor(AssemblyDefinition assembly) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("RoR2", "CharacterMotor"); if (type != null) { type.Fields.Add(new FieldDefinition("bapi_velocityOverride", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(Vector3)))); type.Fields.Add(new FieldDefinition("bapi_keepVelocityOnMoving", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type.Fields.Add(new FieldDefinition("bapi_consistentAcceleration", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(float)))); type.Fields.Add(new FieldDefinition("bapi_fluidMaxDistanceDelta", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type.Fields.Add(new FieldDefinition("bapi_strafe", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type.Fields.Add(new FieldDefinition("bapi_bunnyHop", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); type.Fields.Add(new FieldDefinition("bapi_wallJumpCount", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(int)))); type.Fields.Add(new FieldDefinition("bapi_airControlFromVelocityAdd", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(float)))); } } private static void PatchConfigEntry(ref AssemblyDefinition assembly) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown TypeDefinition type = assembly.MainModule.GetType("BepInEx.Configuration", "ConfigEntryBase"); if (type != null) { type.Fields.Add(new FieldDefinition("bapi_isServerConfig", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool)))); } } } }
plugins/BrynzaAPI.dll
Decompiled 5 days 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.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using BrynzaAPI.Interop; using EntityStates; using Grumpy; using HG.Coroutines; using HG.Reflection; using HarmonyLib; using IL.EntityStates; using IL.RoR2; using IL.RoR2.CameraModes; using IL.RoR2.Projectile; using IL.RoR2.Skills; using IL.RoR2.UI; using KinematicCharacterController; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using MonoMod.Utils; using On.EntityStates; using On.RoR2; using On.RoR2.UI; using ProjectilesConfigurator; using R2API; using R2API.AddressReferencedAssets; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using Rewired; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.CameraModes; using RoR2.ConVar; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2BepInExPack.Utilities; using Unity; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BrynzaAPI")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+5b984f431d6e137e4342863a9417caaafb784d64")] [assembly: AssemblyProduct("BrynzaAPI")] [assembly: AssemblyTitle("BrynzaAPI")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BrynzaAPI { [Serializable] [BepInPlugin("com.brynzananas.brynzaapi", "Brynza API", "1.6.0")] [BepInDependency("com.bepis.r2api", "5.1.5")] [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.*/)] public class BrynzaAPI : BaseUnityPlugin { public delegate void OnHitGroundServerDelegate(CharacterMotor characterMotor, ref HitGroundInfo hitGroundInfo); public delegate bool ExtraKeepVelocityOnMoving(CharacterMotor characterMotor); public delegate bool ExtraStrafe(CharacterMotor characterMotor); public delegate bool ExtraBunnyHop(CharacterMotor characterMotor); public delegate float ExtraAirControlFromVelocityAdd(CharacterMotor characterMotor); public delegate void TestDelegate(); [HarmonyPatch] private class Patches { [HarmonyPatch(/*Could not decode attribute arguments.*/)] [HarmonyILManipulator] private static void ConfigFile_Reload(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 4), (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "#") })) { val.Emit(OpCodes.Ldloc, 4); val.EmitDelegate<Action<string>>((Action<string>)GetDefaultValue); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 8), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 7) })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc, 8); val.EmitDelegate<Action<ConfigFile, ConfigDefinition>>((Action<ConfigFile, ConfigDefinition>)SetDefaultValue); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 2 failed!")); } } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!")); } static void GetDefaultValue(string line) { if (line.Contains("# Default value:")) { pendingDefaultValue = line.Replace("# Default value: ", ""); } } static void SetDefaultValue(ConfigFile configFile, ConfigDefinition configDefinition) { if (pendingDefaultValue != null) { if (defaultConfigValues.ContainsKey(configFile)) { Dictionary<ConfigDefinition, string> dictionary = defaultConfigValues[configFile]; if (!dictionary.ContainsKey(configDefinition)) { dictionary[configDefinition] = pendingDefaultValue; } } else { Dictionary<ConfigDefinition, string> value = new Dictionary<ConfigDefinition, string> { { configDefinition, pendingDefaultValue } }; defaultConfigValues.Add(configFile, value); } } } } } public class ExtraStatHookEventArgs : EventArgs { public int wallJumpAdd = 0; public float wallJumpMult = 1f; } public delegate void ExtraStatHookEventHandler(CharacterBody sender, ExtraStatHookEventArgs args); public struct ModMetaData { public string Guid; public string Name; } public delegate void OnConfigApplied(int configId, INetworkConfig networkConfig); public interface INetworkConfig { int id { get; set; } OnConfigApplied OnConfigApplied { get; set; } Type parameterType { get; } object Value { get; set; } } public class NetworkConfig<T> : INetworkConfig { public NetworkConfig<bool> enableConfig; public ConfigEntry<T> configEntry; private T configValue; private OnConfigApplied onConfigApplied; public int configId; public T Value { get { if (enableConfig != null && !enableConfig.Value) { return DefaultValue; } if (takeServerConfigValues) { return configValue; } return configEntry.Value; } set { configValue = value; } } public T DefaultValue => (T)((ConfigEntryBase)configEntry).DefaultValue; public Type parameterType => typeof(T); public OnConfigApplied OnConfigApplied { get { return onConfigApplied; } set { onConfigApplied = value; } } public int id { get { return configId; } set { configId = value; } } object INetworkConfig.Value { get { return Value; } set { Value = (T)value; } } } public class RequestSyncConfigsNetMessage : INetMessage, ISerializableObject { public void Deserialize(NetworkReader reader) { } public void OnReceived() { SetConfigValues(); } public void Serialize(NetworkWriter writer) { } } public class SyncConfigsNetMessage : INetMessage, ISerializableObject { private int configId; private string input; public SyncConfigsNetMessage(int id, string input) { configId = id; this.input = input; } public SyncConfigsNetMessage() { } public void Deserialize(NetworkReader reader) { configId = reader.ReadInt32(); input = reader.ReadString(); } public void OnReceived() { INetworkConfig networkConfig = networkConfigs[configId]; if (networkConfig.parameterType == typeof(float)) { NetworkConfig<float> networkConfig2 = networkConfig as NetworkConfig<float>; networkConfig2.Value = float.Parse(input); if (!NetworkServer.active) { ConfigEntry<float> configEntry = networkConfig2.configEntry; configEntry.Value += 1f; ConfigEntry<float> configEntry2 = networkConfig2.configEntry; configEntry2.Value -= 1f; } } if (networkConfig.parameterType == typeof(int)) { NetworkConfig<int> networkConfig3 = networkConfig as NetworkConfig<int>; networkConfig3.Value = int.Parse(input); if (!NetworkServer.active) { ConfigEntry<int> configEntry3 = networkConfig3.configEntry; configEntry3.Value += 1; ConfigEntry<int> configEntry4 = networkConfig3.configEntry; configEntry4.Value -= 1; } } if (networkConfig.parameterType == typeof(bool)) { NetworkConfig<bool> networkConfig4 = networkConfig as NetworkConfig<bool>; networkConfig4.Value = bool.Parse(input); if (!NetworkServer.active) { networkConfig4.configEntry.Value = !networkConfig4.configEntry.Value; networkConfig4.configEntry.Value = !networkConfig4.configEntry.Value; } } networkConfig.OnConfigApplied?.Invoke(configId, networkConfig); } public void Serialize(NetworkWriter writer) { writer.Write(configId); writer.Write(input); } } [CompilerGenerated] private static class <>O { public static Manipulator <0>__SkillDef_OnFixedUpdate; public static Manipulator <1>__SkillDef_OnExecute; public static Manipulator <2>__CrosshairManager_UpdateCrosshair1; public static Manipulator <3>__CameraModePlayerBasic_UpdateInternal; public static Manipulator <4>__CameraModePlayerBasic_CollectLookInputInternal; public static hook_HandleMovements <5>__GenericCharacterMain_HandleMovements; public static Manipulator <6>__GenericSkill_Awake; public static Manipulator <7>__CharacterMotor_PreMove; public static Manipulator <8>__ProjectileExplosion_DetonateServer; public static Manipulator <9>__GenericCharacterMain_ApplyJumpVelocity; public static hook_OnCharacterHitGroundServer <10>__GlobalEventManager_OnCharacterHitGroundServer; public static hook_OnEnable <11>__CharacterSelectController_OnEnable; public static Manipulator <12>__FogDamageController_MyFixedUpdate; public static Manipulator <13>__HealthComponent_TakeDamageProcess; public static Manipulator <14>__GenericCharacterMain_ProcessJump_bool; public static Manipulator <15>__CharacterMotor_OnLanded; public static Manipulator <16>__CharacterBody_RecalculateStats; public static hook_ProcessHit <17>__BulletAttack_ProcessHit; public static Manipulator <18>__Row_FromSkillSlot; public static hook_DestroyRows <19>__LoadoutPanelController_DestroyRows; public static hook_FinishSetup <20>__Row_FinishSetup; public static Manipulator <21>__Row_FromSkin; public static hook_UpdateRendererMaterials <22>__CharacterModel_UpdateRendererMaterials; public static Manipulator <23>__CharacterModel_UpdateMaterials; public static Manipulator <24>__BlastAttack_HandleHits; public static Manipulator <25>__BlastAttack_PerformDamageServer; public static hook_Write <26>__BlastAttackDamageInfo_Write; public static hook_Read <27>__BlastAttackDamageInfo_Read; public static EventHandler <28>__ConfigEntry_SettingChanged; } [CompilerGenerated] private sealed class <AddLanguageTokens>d__77 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BrynzaAPI <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <AddLanguageTokens>d__77(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if (LanguageTokensToAddOnLoad.languageTokensToAddOnLoad.Count > 0) { LanguageTokensToAddOnLoad.languageTokensToAddOnLoad[0].Dispose(); <>2__current = null; <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const string ModGuid = "com.brynzananas.brynzaapi"; public const string ModName = "Brynza API"; public const string ModVer = "1.6.0"; public static FixedConditionalWeakTable<CharacterMotor, List<OnHitGroundServerDelegate>> onHitGroundServerDictionary = new FixedConditionalWeakTable<CharacterMotor, List<OnHitGroundServerDelegate>>(); public static bool riskOfOptionsLoaded = false; public static ConfigFile ConfigMain; public static Dictionary<string, List<INetworkConfig>> modConfigs = new Dictionary<string, List<INetworkConfig>>(); public static List<GameObject> activeSniperHurtboxTrackers = new List<GameObject>(); [Obsolete] private static Vector3 worldCrosshairPositionOverride = Vector3.zero; public static Dictionary<string, string> _tokenKeywords = new Dictionary<string, string>(); private static string[] tokenKeywordsKeys = new string[0]; public static HGButton loadoutSectionButton; public static GameObject loadoutSectionHolder; public const string LoadoutMainSectionToken = "LOADOUT_SECTION_MAIN"; public static Dictionary<ConfigFile, Dictionary<ConfigDefinition, string>> defaultConfigValues = new Dictionary<ConfigFile, Dictionary<ConfigDefinition, string>>(); private static List<ExtraKeepVelocityOnMoving> GetExtraKeepVelocityOnMovingDelegates = new List<ExtraKeepVelocityOnMoving>(); private static List<ExtraStrafe> GetExtraStrafeDelegates = new List<ExtraStrafe>(); public static List<ExtraBunnyHop> GetExtraBunnyHopDelegates = new List<ExtraBunnyHop>(); private static List<ExtraAirControlFromVelocityAdd> GetExtraAirControlFromVelocityAddDelegates = new List<ExtraAirControlFromVelocityAdd>(); private Harmony harmonyPatcher; private bool hooksEnabled = false; private static string pendingDefaultValue; private static ExtraStatHookEventArgs ExtraStatMods; public static float strafeMultiplier = 15f; public static List<INetworkConfig> networkConfigs = new List<INetworkConfig>(); public static bool proejctilesConfiguratorEnabled { get; private set; } private static bool takeServerConfigValues { get { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) int result; if (!Object.op_Implicit((Object)(object)Run.instance)) { Scene activeScene = SceneManager.GetActiveScene(); result = ((((Scene)(ref activeScene)).name == "lobby") ? 1 : 0); } else { result = 1; } return (byte)result != 0; } } public static Dictionary<string, string> tokenKeywords { get { return _tokenKeywords; } set { tokenKeywordsKeys = value.Keys.ToArray(); _tokenKeywords = value; } } public static BaseUnityPlugin instance { get; private set; } public static ManualLogSource Log { get; private set; } public static event Action<GameObject> onSniperHurtboxAdded; public static event Action<GameObject> onSniperHurtboxRemoved; public static event ExtraKeepVelocityOnMoving GetExtraKeepVelocityOnMoving { add { GetExtraKeepVelocityOnMovingDelegates.Add(value); } remove { GetExtraKeepVelocityOnMovingDelegates.Remove(value); } } public static event ExtraStrafe GetExtraStrafe { add { GetExtraStrafeDelegates.Add(value); } remove { GetExtraStrafeDelegates.Remove(value); } } public static event ExtraBunnyHop GetExtraBunnyHop { add { GetExtraBunnyHopDelegates.Add(value); } remove { GetExtraBunnyHopDelegates.Remove(value); } } public static event ExtraAirControlFromVelocityAdd GetExtraAirControlFromVelocityAdd { add { GetExtraAirControlFromVelocityAddDelegates.Add(value); } remove { GetExtraAirControlFromVelocityAddDelegates.Remove(value); } } private static event ExtraStatHookEventHandler _getExtraStatCoefficients; public static event ExtraStatHookEventHandler GetExtraStatCoefficients { add { _getExtraStatCoefficients += value; } remove { _getExtraStatCoefficients -= value; } } public static bool InvokeExtraKeepVelocityOnMovingDelegates(CharacterMotor characterMotor) { foreach (ExtraKeepVelocityOnMoving getExtraKeepVelocityOnMovingDelegate in GetExtraKeepVelocityOnMovingDelegates) { if (getExtraKeepVelocityOnMovingDelegate(characterMotor)) { return true; } } return false; } public static bool InvokeExtraStrafeDelegates(CharacterMotor characterMotor) { foreach (ExtraStrafe getExtraStrafeDelegate in GetExtraStrafeDelegates) { if (getExtraStrafeDelegate(characterMotor)) { return true; } } return false; } public static bool InvokeExtraBunnyHopDelegates(CharacterMotor characterMotor) { foreach (ExtraBunnyHop getExtraBunnyHopDelegate in GetExtraBunnyHopDelegates) { if (getExtraBunnyHopDelegate(characterMotor)) { return true; } } return false; } public static float InvokeExtraAirControlFromVelocityAddDelegates(CharacterMotor characterMotor) { float num = 0f; foreach (ExtraAirControlFromVelocityAdd getExtraAirControlFromVelocityAddDelegate in GetExtraAirControlFromVelocityAddDelegates) { num += getExtraAirControlFromVelocityAddDelegate(characterMotor); } return num; } public void Awake() { //IL_0049: 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_007d: 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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) instance = (BaseUnityPlugin)(object)this; Log = ((BaseUnityPlugin)this).Logger; ConfigMain = ((BaseUnityPlugin)this).Config; proejctilesConfiguratorEnabled = Chainloader.PluginInfos.ContainsKey("com.brynzananas.projectilesconfigurator"); if (proejctilesConfiguratorEnabled) { ModCompatibilities.ProjectilesConfiguratorCompatibility.Init(); } Assets.BunnyHopBuff = Utils.CreateBuff("bapiBunnyHop", null, Color.white, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreGrowthNectar: true); Assets.StrafeBuff = Utils.CreateBuff("bapiStrafing", null, Color.white, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreGrowthNectar: true); Assets.KeepVelocityBuff = Utils.CreateBuff("bapiKeepVelocity", null, Color.white, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreGrowthNectar: true); Assets.AirControlFromVelocityAddBuff = Utils.CreateBuff("bapiAirControlFromVelocityAdd", null, Color.white, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreGrowthNectar: true); NetworkingAPI.RegisterMessageType<SyncConfigsNetMessage>(); NetworkingAPI.RegisterMessageType<RequestSyncConfigsNetMessage>(); NetworkingAPI.RegisterMessageType<RocketJumpComponent.RocketJumpMessage>(); riskOfOptionsLoaded = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); loadoutSectionButton = ((Component)PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/CharacterSelectUIMain.prefab").WaitForCompletion(), "LoadoutSectionButton", false).transform.Find("SafeArea/LeftHandPanel (Layer: Main)/SurvivorInfoPanel, Active (Layer: Secondary)/SubheaderPanel (Overview, Skills, Loadout)/GenericMenuButton (Overview)")).gameObject.GetComponent<HGButton>(); RectTransform component = ((Component)loadoutSectionButton).gameObject.GetComponent<RectTransform>(); component.sizeDelta = new Vector2(64f, 64f); ((UnityEventBase)((Button)loadoutSectionButton).onClick).RemoveAllListeners(); Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Main"); Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Основной", "ru"); Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "主要", "zh-CN"); Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Principale", "fr"); Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Wichtigsten", "de"); Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Principale", "it"); Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "メイン", "ja"); Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "주요", "ko"); Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Principal", "pt-BR"); Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Ana", "tr"); Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Principal", "es"); SetHooks(); } public void OnDestroy() { UnsetHooks(); } private void SetHooks() { //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_0032: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0069: 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_0074: Expected O, but got Unknown //IL_008a: 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_0095: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //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_00f8: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Expected O, but got Unknown //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Expected O, but got Unknown //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Expected O, but got Unknown //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Expected O, but got Unknown //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Expected O, but got Unknown //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Expected O, but got Unknown //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Expected O, but got Unknown //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Expected O, but got Unknown //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Expected O, but got Unknown //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Expected O, but got Unknown //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Expected O, but got Unknown //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Expected O, but got Unknown //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Expected O, but got Unknown //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Expected O, but got Unknown //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Expected O, but got Unknown //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Expected O, but got Unknown //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Expected O, but got Unknown //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Expected O, but got Unknown //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Expected O, but got Unknown //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Expected O, but got Unknown //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Expected O, but got Unknown //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Expected O, but got Unknown //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Expected O, but got Unknown //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Expected O, but got Unknown //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Expected O, but got Unknown //IL_04fc: Unknown result type (might be due to invalid IL or missing references) //IL_0506: Expected O, but got Unknown //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Expected O, but got Unknown //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Expected O, but got Unknown //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Expected O, but got Unknown //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Expected O, but got Unknown //IL_0575: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Expected O, but got Unknown //IL_049c: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Expected O, but got Unknown if (!hooksEnabled) { hooksEnabled = true; object obj = <>O.<0>__SkillDef_OnFixedUpdate; if (obj == null) { Manipulator val = SkillDef_OnFixedUpdate; <>O.<0>__SkillDef_OnFixedUpdate = val; obj = (object)val; } SkillDef.OnFixedUpdate += (Manipulator)obj; object obj2 = <>O.<1>__SkillDef_OnExecute; if (obj2 == null) { Manipulator val2 = SkillDef_OnExecute; <>O.<1>__SkillDef_OnExecute = val2; obj2 = (object)val2; } SkillDef.OnExecute += (Manipulator)obj2; object obj3 = <>O.<2>__CrosshairManager_UpdateCrosshair1; if (obj3 == null) { Manipulator val3 = CrosshairManager_UpdateCrosshair1; <>O.<2>__CrosshairManager_UpdateCrosshair1 = val3; obj3 = (object)val3; } CrosshairManager.UpdateCrosshair += (Manipulator)obj3; object obj4 = <>O.<3>__CameraModePlayerBasic_UpdateInternal; if (obj4 == null) { Manipulator val4 = CameraModePlayerBasic_UpdateInternal; <>O.<3>__CameraModePlayerBasic_UpdateInternal = val4; obj4 = (object)val4; } CameraModePlayerBasic.UpdateInternal += (Manipulator)obj4; object obj5 = <>O.<4>__CameraModePlayerBasic_CollectLookInputInternal; if (obj5 == null) { Manipulator val5 = CameraModePlayerBasic_CollectLookInputInternal; <>O.<4>__CameraModePlayerBasic_CollectLookInputInternal = val5; obj5 = (object)val5; } CameraModePlayerBasic.CollectLookInputInternal += (Manipulator)obj5; object obj6 = <>O.<5>__GenericCharacterMain_HandleMovements; if (obj6 == null) { hook_HandleMovements val6 = GenericCharacterMain_HandleMovements; <>O.<5>__GenericCharacterMain_HandleMovements = val6; obj6 = (object)val6; } GenericCharacterMain.HandleMovements += (hook_HandleMovements)obj6; object obj7 = <>O.<6>__GenericSkill_Awake; if (obj7 == null) { Manipulator val7 = GenericSkill_Awake; <>O.<6>__GenericSkill_Awake = val7; obj7 = (object)val7; } GenericSkill.Awake += (Manipulator)obj7; object obj8 = <>O.<7>__CharacterMotor_PreMove; if (obj8 == null) { Manipulator val8 = CharacterMotor_PreMove; <>O.<7>__CharacterMotor_PreMove = val8; obj8 = (object)val8; } CharacterMotor.PreMove += (Manipulator)obj8; object obj9 = <>O.<8>__ProjectileExplosion_DetonateServer; if (obj9 == null) { Manipulator val9 = ProjectileExplosion_DetonateServer; <>O.<8>__ProjectileExplosion_DetonateServer = val9; obj9 = (object)val9; } ProjectileExplosion.DetonateServer += (Manipulator)obj9; object obj10 = <>O.<9>__GenericCharacterMain_ApplyJumpVelocity; if (obj10 == null) { Manipulator val10 = GenericCharacterMain_ApplyJumpVelocity; <>O.<9>__GenericCharacterMain_ApplyJumpVelocity = val10; obj10 = (object)val10; } GenericCharacterMain.ApplyJumpVelocity += (Manipulator)obj10; object obj11 = <>O.<10>__GlobalEventManager_OnCharacterHitGroundServer; if (obj11 == null) { hook_OnCharacterHitGroundServer val11 = GlobalEventManager_OnCharacterHitGroundServer; <>O.<10>__GlobalEventManager_OnCharacterHitGroundServer = val11; obj11 = (object)val11; } GlobalEventManager.OnCharacterHitGroundServer += (hook_OnCharacterHitGroundServer)obj11; ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); Run.Start += new hook_Start(Run_Start); RoR2Application.OnLoad += new hook_OnLoad(RoR2Application_OnLoad); object obj12 = <>O.<11>__CharacterSelectController_OnEnable; if (obj12 == null) { hook_OnEnable val12 = CharacterSelectController_OnEnable; <>O.<11>__CharacterSelectController_OnEnable = val12; obj12 = (object)val12; } CharacterSelectController.OnEnable += (hook_OnEnable)obj12; object obj13 = <>O.<12>__FogDamageController_MyFixedUpdate; if (obj13 == null) { Manipulator val13 = FogDamageController_MyFixedUpdate; <>O.<12>__FogDamageController_MyFixedUpdate = val13; obj13 = (object)val13; } FogDamageController.MyFixedUpdate += (Manipulator)obj13; object obj14 = <>O.<13>__HealthComponent_TakeDamageProcess; if (obj14 == null) { Manipulator val14 = HealthComponent_TakeDamageProcess; <>O.<13>__HealthComponent_TakeDamageProcess = val14; obj14 = (object)val14; } HealthComponent.TakeDamageProcess += (Manipulator)obj14; object obj15 = <>O.<14>__GenericCharacterMain_ProcessJump_bool; if (obj15 == null) { Manipulator val15 = GenericCharacterMain_ProcessJump_bool; <>O.<14>__GenericCharacterMain_ProcessJump_bool = val15; obj15 = (object)val15; } GenericCharacterMain.ProcessJump_bool += (Manipulator)obj15; object obj16 = <>O.<15>__CharacterMotor_OnLanded; if (obj16 == null) { Manipulator val16 = CharacterMotor_OnLanded; <>O.<15>__CharacterMotor_OnLanded = val16; obj16 = (object)val16; } CharacterMotor.OnLanded += (Manipulator)obj16; object obj17 = <>O.<16>__CharacterBody_RecalculateStats; if (obj17 == null) { Manipulator val17 = CharacterBody_RecalculateStats; <>O.<16>__CharacterBody_RecalculateStats = val17; obj17 = (object)val17; } CharacterBody.RecalculateStats += (Manipulator)obj17; object obj18 = <>O.<17>__BulletAttack_ProcessHit; if (obj18 == null) { hook_ProcessHit val18 = BulletAttack_ProcessHit; <>O.<17>__BulletAttack_ProcessHit = val18; obj18 = (object)val18; } BulletAttack.ProcessHit += (hook_ProcessHit)obj18; object obj19 = <>O.<18>__Row_FromSkillSlot; if (obj19 == null) { Manipulator val19 = Row_FromSkillSlot; <>O.<18>__Row_FromSkillSlot = val19; obj19 = (object)val19; } Row.FromSkillSlot += (Manipulator)obj19; object obj20 = <>O.<19>__LoadoutPanelController_DestroyRows; if (obj20 == null) { hook_DestroyRows val20 = LoadoutPanelController_DestroyRows; <>O.<19>__LoadoutPanelController_DestroyRows = val20; obj20 = (object)val20; } LoadoutPanelController.DestroyRows += (hook_DestroyRows)obj20; object obj21 = <>O.<20>__Row_FinishSetup; if (obj21 == null) { hook_FinishSetup val21 = Row_FinishSetup; <>O.<20>__Row_FinishSetup = val21; obj21 = (object)val21; } Row.FinishSetup += (hook_FinishSetup)obj21; object obj22 = <>O.<21>__Row_FromSkin; if (obj22 == null) { Manipulator val22 = Row_FromSkin; <>O.<21>__Row_FromSkin = val22; obj22 = (object)val22; } Row.FromSkin += (Manipulator)obj22; Hook val23 = new Hook((MethodBase)typeof(LoadoutPanelController).GetMethod("Rebuild", BindingFlags.Instance | BindingFlags.NonPublic), typeof(BrynzaAPI).GetMethod("LoadoutPanelController_Rebuild", BindingFlags.Static | BindingFlags.NonPublic), new HookConfig { Priority = int.MaxValue }); Hook val24 = new Hook((MethodBase)typeof(LoadoutPanelController).GetMethod("Awake", BindingFlags.Instance | BindingFlags.NonPublic), typeof(BrynzaAPI).GetMethod("LoadoutPanelController_Awake", BindingFlags.Static | BindingFlags.NonPublic), new HookConfig { Priority = int.MaxValue }); object obj23 = <>O.<22>__CharacterModel_UpdateRendererMaterials; if (obj23 == null) { hook_UpdateRendererMaterials val25 = CharacterModel_UpdateRendererMaterials; <>O.<22>__CharacterModel_UpdateRendererMaterials = val25; obj23 = (object)val25; } CharacterModel.UpdateRendererMaterials += (hook_UpdateRendererMaterials)obj23; object obj24 = <>O.<23>__CharacterModel_UpdateMaterials; if (obj24 == null) { Manipulator val26 = CharacterModel_UpdateMaterials; <>O.<23>__CharacterModel_UpdateMaterials = val26; obj24 = (object)val26; } CharacterModel.UpdateMaterials += (Manipulator)obj24; BulletAttack.DefaultHitCallbackImplementation += new Manipulator(BulletAttack_DefaultHitCallbackImplementation); NetworkExtensions.Write_NetworkWriter_DamageInfo += new hook_Write_NetworkWriter_DamageInfo(NetworkExtensions_Write_NetworkWriter_DamageInfo); NetworkExtensions.ReadDamageInfo += new hook_ReadDamageInfo(NetworkExtensions_ReadDamageInfo); object obj25 = <>O.<24>__BlastAttack_HandleHits; if (obj25 == null) { Manipulator val27 = BlastAttack_HandleHits; <>O.<24>__BlastAttack_HandleHits = val27; obj25 = (object)val27; } BlastAttack.HandleHits += (Manipulator)obj25; object obj26 = <>O.<25>__BlastAttack_PerformDamageServer; if (obj26 == null) { Manipulator val28 = BlastAttack_PerformDamageServer; <>O.<25>__BlastAttack_PerformDamageServer = val28; obj26 = (object)val28; } BlastAttack.PerformDamageServer += (Manipulator)obj26; object obj27 = <>O.<26>__BlastAttackDamageInfo_Write; if (obj27 == null) { hook_Write val29 = BlastAttackDamageInfo_Write; <>O.<26>__BlastAttackDamageInfo_Write = val29; obj27 = (object)val29; } BlastAttackDamageInfo.Write += (hook_Write)obj27; object obj28 = <>O.<27>__BlastAttackDamageInfo_Read; if (obj28 == null) { hook_Read val30 = BlastAttackDamageInfo_Read; <>O.<27>__BlastAttackDamageInfo_Read = val30; obj28 = (object)val30; } BlastAttackDamageInfo.Read += (hook_Read)obj28; AimAnimator.UpdateAnimatorParameters += new Manipulator(AimAnimator_UpdateAnimatorParameters); PlayerCharacterMasterController.PollButtonInput += new Manipulator(PlayerCharacterMasterController_PollButtonInput); CharacterBody.TriggerJumpEventGlobally += new hook_TriggerJumpEventGlobally(CharacterBody_TriggerJumpEventGlobally); CharacterBody.Awake += new hook_Awake(CharacterBody_Awake); EffectData.Copy += new hook_Copy(EffectData_Copy); EffectData.Reset += new hook_Reset(EffectData_Reset); EffectData.Serialize += new hook_Serialize(EffectData_Serialize); EffectData.Deserialize += new hook_Deserialize(EffectData_Deserialize); EffectComponent.Reset += new Manipulator(EffectComponent_Reset); RoR2Application.onLoadFinished = (Action)Delegate.Combine(RoR2Application.onLoadFinished, new Action(OnRoR2Loaded)); harmonyPatcher = new Harmony("com.brynzananas.brynzaapi"); harmonyPatcher.CreateClassProcessor(typeof(Patches)).Patch(); } } private void EffectComponent_Reset(ILContext il) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown ILCursor c = new ILCursor(il); ilhook(1); ilhook(2); static Vector3 GetScale(EffectComponent effectComponent) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) return effectComponent.effectData.GetScale().Value; } static bool HasScale(EffectComponent effectComponent) { return effectComponent.effectData != null && effectComponent.effectData.GetScale().HasValue; } void ilhook(int i) { //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) int num3 = default(int); int num2 = default(int); int num = default(int); if (c.TryGotoNext((MoveType)0, new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num3), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchNewobj<Vector3>(x) })) { Instruction next = c.Next; Instruction next2 = c.Next.Next.Next.Next.Next; c.Emit(OpCodes.Ldarg_0); c.EmitDelegate<Func<EffectComponent, bool>>((Func<EffectComponent, bool>)HasScale); c.Emit(OpCodes.Brfalse_S, next); c.Emit(OpCodes.Ldarg_0); c.EmitDelegate<Func<EffectComponent, Vector3>>((Func<EffectComponent, Vector3>)GetScale); c.Emit(OpCodes.Br_S, next2); c.Goto(next2, (MoveType)0, false); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook " + i + " failed!")); } } } private void EffectData_Deserialize(orig_Deserialize orig, EffectData self, NetworkReader reader) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, reader); if (reader.ReadBoolean()) { self.SetScale(reader.ReadVector3()); } } private void EffectData_Serialize(orig_Serialize orig, EffectData self, NetworkWriter writer) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, writer); bool hasValue = self.GetScale().HasValue; writer.Write(hasValue); if (hasValue) { writer.Write(self.GetScale().Value); } } private void EffectData_Reset(orig_Reset orig, EffectData self) { orig.Invoke(self); self.SetScale(null); } private void EffectData_Copy(orig_Copy orig, EffectData src, EffectData dest) { orig.Invoke(src, dest); dest.SetScale(src.GetScale()); } private void CharacterBody_Awake(orig_Awake orig, CharacterBody self) { orig.Invoke(self); self.SetClientBuffs(BuffCatalog.GetPerBuffBuffer<int>()); } private void UnsetHooks() { //IL_002a: 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) //IL_0035: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Expected O, but got Unknown //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Expected O, but got Unknown //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Expected O, but got Unknown //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Expected O, but got Unknown //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Expected O, but got Unknown //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Expected O, but got Unknown //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Expected O, but got Unknown //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown //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_02bd: Expected O, but got Unknown //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Expected O, but got Unknown //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Expected O, but got Unknown //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Expected O, but got Unknown //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Expected O, but got Unknown //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Expected O, but got Unknown //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Expected O, but got Unknown //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Expected O, but got Unknown //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Expected O, but got Unknown //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Expected O, but got Unknown //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Expected O, but got Unknown //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Expected O, but got Unknown //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Expected O, but got Unknown //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Expected O, but got Unknown //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Expected O, but got Unknown //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Expected O, but got Unknown //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Expected O, but got Unknown //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Expected O, but got Unknown //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Expected O, but got Unknown //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Expected O, but got Unknown //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Expected O, but got Unknown if (hooksEnabled) { hooksEnabled = false; object obj = <>O.<0>__SkillDef_OnFixedUpdate; if (obj == null) { Manipulator val = SkillDef_OnFixedUpdate; <>O.<0>__SkillDef_OnFixedUpdate = val; obj = (object)val; } SkillDef.OnFixedUpdate -= (Manipulator)obj; object obj2 = <>O.<1>__SkillDef_OnExecute; if (obj2 == null) { Manipulator val2 = SkillDef_OnExecute; <>O.<1>__SkillDef_OnExecute = val2; obj2 = (object)val2; } SkillDef.OnExecute -= (Manipulator)obj2; object obj3 = <>O.<2>__CrosshairManager_UpdateCrosshair1; if (obj3 == null) { Manipulator val3 = CrosshairManager_UpdateCrosshair1; <>O.<2>__CrosshairManager_UpdateCrosshair1 = val3; obj3 = (object)val3; } CrosshairManager.UpdateCrosshair -= (Manipulator)obj3; object obj4 = <>O.<3>__CameraModePlayerBasic_UpdateInternal; if (obj4 == null) { Manipulator val4 = CameraModePlayerBasic_UpdateInternal; <>O.<3>__CameraModePlayerBasic_UpdateInternal = val4; obj4 = (object)val4; } CameraModePlayerBasic.UpdateInternal -= (Manipulator)obj4; object obj5 = <>O.<4>__CameraModePlayerBasic_CollectLookInputInternal; if (obj5 == null) { Manipulator val5 = CameraModePlayerBasic_CollectLookInputInternal; <>O.<4>__CameraModePlayerBasic_CollectLookInputInternal = val5; obj5 = (object)val5; } CameraModePlayerBasic.CollectLookInputInternal -= (Manipulator)obj5; object obj6 = <>O.<5>__GenericCharacterMain_HandleMovements; if (obj6 == null) { hook_HandleMovements val6 = GenericCharacterMain_HandleMovements; <>O.<5>__GenericCharacterMain_HandleMovements = val6; obj6 = (object)val6; } GenericCharacterMain.HandleMovements -= (hook_HandleMovements)obj6; object obj7 = <>O.<6>__GenericSkill_Awake; if (obj7 == null) { Manipulator val7 = GenericSkill_Awake; <>O.<6>__GenericSkill_Awake = val7; obj7 = (object)val7; } GenericSkill.Awake -= (Manipulator)obj7; object obj8 = <>O.<7>__CharacterMotor_PreMove; if (obj8 == null) { Manipulator val8 = CharacterMotor_PreMove; <>O.<7>__CharacterMotor_PreMove = val8; obj8 = (object)val8; } CharacterMotor.PreMove -= (Manipulator)obj8; object obj9 = <>O.<8>__ProjectileExplosion_DetonateServer; if (obj9 == null) { Manipulator val9 = ProjectileExplosion_DetonateServer; <>O.<8>__ProjectileExplosion_DetonateServer = val9; obj9 = (object)val9; } ProjectileExplosion.DetonateServer -= (Manipulator)obj9; object obj10 = <>O.<9>__GenericCharacterMain_ApplyJumpVelocity; if (obj10 == null) { Manipulator val10 = GenericCharacterMain_ApplyJumpVelocity; <>O.<9>__GenericCharacterMain_ApplyJumpVelocity = val10; obj10 = (object)val10; } GenericCharacterMain.ApplyJumpVelocity -= (Manipulator)obj10; object obj11 = <>O.<10>__GlobalEventManager_OnCharacterHitGroundServer; if (obj11 == null) { hook_OnCharacterHitGroundServer val11 = GlobalEventManager_OnCharacterHitGroundServer; <>O.<10>__GlobalEventManager_OnCharacterHitGroundServer = val11; obj11 = (object)val11; } GlobalEventManager.OnCharacterHitGroundServer -= (hook_OnCharacterHitGroundServer)obj11; ContentManager.collectContentPackProviders -= new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); Run.Start -= new hook_Start(Run_Start); RoR2Application.OnLoad -= new hook_OnLoad(RoR2Application_OnLoad); object obj12 = <>O.<11>__CharacterSelectController_OnEnable; if (obj12 == null) { hook_OnEnable val12 = CharacterSelectController_OnEnable; <>O.<11>__CharacterSelectController_OnEnable = val12; obj12 = (object)val12; } CharacterSelectController.OnEnable -= (hook_OnEnable)obj12; object obj13 = <>O.<12>__FogDamageController_MyFixedUpdate; if (obj13 == null) { Manipulator val13 = FogDamageController_MyFixedUpdate; <>O.<12>__FogDamageController_MyFixedUpdate = val13; obj13 = (object)val13; } FogDamageController.MyFixedUpdate -= (Manipulator)obj13; object obj14 = <>O.<13>__HealthComponent_TakeDamageProcess; if (obj14 == null) { Manipulator val14 = HealthComponent_TakeDamageProcess; <>O.<13>__HealthComponent_TakeDamageProcess = val14; obj14 = (object)val14; } HealthComponent.TakeDamageProcess -= (Manipulator)obj14; object obj15 = <>O.<14>__GenericCharacterMain_ProcessJump_bool; if (obj15 == null) { Manipulator val15 = GenericCharacterMain_ProcessJump_bool; <>O.<14>__GenericCharacterMain_ProcessJump_bool = val15; obj15 = (object)val15; } GenericCharacterMain.ProcessJump_bool -= (Manipulator)obj15; object obj16 = <>O.<15>__CharacterMotor_OnLanded; if (obj16 == null) { Manipulator val16 = CharacterMotor_OnLanded; <>O.<15>__CharacterMotor_OnLanded = val16; obj16 = (object)val16; } CharacterMotor.OnLanded -= (Manipulator)obj16; object obj17 = <>O.<16>__CharacterBody_RecalculateStats; if (obj17 == null) { Manipulator val17 = CharacterBody_RecalculateStats; <>O.<16>__CharacterBody_RecalculateStats = val17; obj17 = (object)val17; } CharacterBody.RecalculateStats -= (Manipulator)obj17; object obj18 = <>O.<17>__BulletAttack_ProcessHit; if (obj18 == null) { hook_ProcessHit val18 = BulletAttack_ProcessHit; <>O.<17>__BulletAttack_ProcessHit = val18; obj18 = (object)val18; } BulletAttack.ProcessHit -= (hook_ProcessHit)obj18; object obj19 = <>O.<18>__Row_FromSkillSlot; if (obj19 == null) { Manipulator val19 = Row_FromSkillSlot; <>O.<18>__Row_FromSkillSlot = val19; obj19 = (object)val19; } Row.FromSkillSlot -= (Manipulator)obj19; object obj20 = <>O.<19>__LoadoutPanelController_DestroyRows; if (obj20 == null) { hook_DestroyRows val20 = LoadoutPanelController_DestroyRows; <>O.<19>__LoadoutPanelController_DestroyRows = val20; obj20 = (object)val20; } LoadoutPanelController.DestroyRows -= (hook_DestroyRows)obj20; object obj21 = <>O.<20>__Row_FinishSetup; if (obj21 == null) { hook_FinishSetup val21 = Row_FinishSetup; <>O.<20>__Row_FinishSetup = val21; obj21 = (object)val21; } Row.FinishSetup -= (hook_FinishSetup)obj21; object obj22 = <>O.<21>__Row_FromSkin; if (obj22 == null) { Manipulator val22 = Row_FromSkin; <>O.<21>__Row_FromSkin = val22; obj22 = (object)val22; } Row.FromSkin -= (Manipulator)obj22; object obj23 = <>O.<22>__CharacterModel_UpdateRendererMaterials; if (obj23 == null) { hook_UpdateRendererMaterials val23 = CharacterModel_UpdateRendererMaterials; <>O.<22>__CharacterModel_UpdateRendererMaterials = val23; obj23 = (object)val23; } CharacterModel.UpdateRendererMaterials -= (hook_UpdateRendererMaterials)obj23; object obj24 = <>O.<23>__CharacterModel_UpdateMaterials; if (obj24 == null) { Manipulator val24 = CharacterModel_UpdateMaterials; <>O.<23>__CharacterModel_UpdateMaterials = val24; obj24 = (object)val24; } CharacterModel.UpdateMaterials -= (Manipulator)obj24; BulletAttack.DefaultHitCallbackImplementation -= new Manipulator(BulletAttack_DefaultHitCallbackImplementation); NetworkExtensions.Write_NetworkWriter_DamageInfo -= new hook_Write_NetworkWriter_DamageInfo(NetworkExtensions_Write_NetworkWriter_DamageInfo); NetworkExtensions.ReadDamageInfo -= new hook_ReadDamageInfo(NetworkExtensions_ReadDamageInfo); object obj25 = <>O.<24>__BlastAttack_HandleHits; if (obj25 == null) { Manipulator val25 = BlastAttack_HandleHits; <>O.<24>__BlastAttack_HandleHits = val25; obj25 = (object)val25; } BlastAttack.HandleHits -= (Manipulator)obj25; object obj26 = <>O.<25>__BlastAttack_PerformDamageServer; if (obj26 == null) { Manipulator val26 = BlastAttack_PerformDamageServer; <>O.<25>__BlastAttack_PerformDamageServer = val26; obj26 = (object)val26; } BlastAttack.PerformDamageServer -= (Manipulator)obj26; object obj27 = <>O.<26>__BlastAttackDamageInfo_Write; if (obj27 == null) { hook_Write val27 = BlastAttackDamageInfo_Write; <>O.<26>__BlastAttackDamageInfo_Write = val27; obj27 = (object)val27; } BlastAttackDamageInfo.Write -= (hook_Write)obj27; object obj28 = <>O.<27>__BlastAttackDamageInfo_Read; if (obj28 == null) { hook_Read val28 = BlastAttackDamageInfo_Read; <>O.<27>__BlastAttackDamageInfo_Read = val28; obj28 = (object)val28; } BlastAttackDamageInfo.Read -= (hook_Read)obj28; AimAnimator.UpdateAnimatorParameters -= new Manipulator(AimAnimator_UpdateAnimatorParameters); PlayerCharacterMasterController.PollButtonInput -= new Manipulator(PlayerCharacterMasterController_PollButtonInput); CharacterBody.TriggerJumpEventGlobally -= new hook_TriggerJumpEventGlobally(CharacterBody_TriggerJumpEventGlobally); CharacterBody.Awake -= new hook_Awake(CharacterBody_Awake); EffectData.Copy -= new hook_Copy(EffectData_Copy); EffectData.Reset -= new hook_Reset(EffectData_Reset); EffectData.Serialize -= new hook_Serialize(EffectData_Serialize); EffectData.Deserialize -= new hook_Deserialize(EffectData_Deserialize); EffectComponent.Reset -= new Manipulator(EffectComponent_Reset); RoR2Application.onLoadFinished = (Action)Delegate.Remove(RoR2Application.onLoadFinished, new Action(OnRoR2Loaded)); } } private void OnRoR2Loaded() { ((MonoBehaviour)this).StartCoroutine(AddLanguageTokens()); } [IteratorStateMachine(typeof(<AddLanguageTokens>d__77))] private IEnumerator AddLanguageTokens() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <AddLanguageTokens>d__77(0) { <>4__this = this }; } private void CharacterBody_TriggerJumpEventGlobally(orig_TriggerJumpEventGlobally orig, CharacterBody self) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); self.SetLastJumpTime(FixedTimeStamp.now); } private void PlayerCharacterMasterController_PollButtonInput(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 16), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 6) })) { int index = val.Index; val.Index = index + 1; Instruction next = val.Next; Instruction next2 = val.Next.Next; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<PlayerCharacterMasterController, bool>>((Func<PlayerCharacterMasterController, bool>)GetFlag); val.Emit(OpCodes.Brfalse_S, next); val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldloc, 13); val.Emit(OpCodes.Ldc_I4, 18); val.Emit(OpCodes.Callvirt, (MethodBase)AccessTools.Method(typeof(Player), "GetButton", new Type[1] { typeof(int) }, (Type[])null)); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!")); } static bool GetFlag(PlayerCharacterMasterController playerCharacterMasterController) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return CharacterBodyAPI.HasModdedBodyFlag(playerCharacterMasterController.body, Assets.SprintAllTime); } } private void AimAnimator_UpdateAnimatorParameters(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<AimAnimator>(x, "pitchClipCycleEnd"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0f) })) { int index = val.Index; val.Index = index + 1; val.Remove(); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<AimAnimator, float>>((Func<AimAnimator, float>)SetPitch); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!")); } if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0f), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<AimAnimator>(x, "yawClipCycleEnd") })) { val.Remove(); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<AimAnimator, float>>((Func<AimAnimator, float>)SetYaw); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 2 failed!")); } static float SetPitch(AimAnimator aimAnimator) { return aimAnimator.GetPitchClipCycleStart(); } static float SetYaw(AimAnimator aimAnimator) { return aimAnimator.GetYawClipCycleStart(); } } private static void BlastAttackDamageInfo_Write(orig_Write orig, ref BlastAttackDamageInfo self, NetworkWriter writer) { orig.Invoke(ref self, writer); writer.Write(self.GetForceMassIsOne()); writer.Write(self.GetForceAlwaysApply()); writer.Write(self.GetForceDisableAirControlUntilCollision()); } private static void BlastAttackDamageInfo_Read(orig_Read orig, ref BlastAttackDamageInfo self, NetworkReader reader) { orig.Invoke(ref self, reader); self.SetForceMassIsOne(reader.ReadBoolean()); self.SetForceAlwaysApply(reader.ReadBoolean()); self.SetForceDisableAirControlUntilCollision(reader.ReadBoolean()); } private static void BlastAttack_PerformDamageServer(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_005c: 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) ILCursor val = new ILCursor(il); ILLabel val2 = null; int locid = 9; if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchNewobj<DamageInfo>(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locid) })) { val.Emit(OpCodes.Ldloc, locid); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<<>A{00000008}<DamageInfo, BlastAttackDamageInfo>>((<>A{00000008}<DamageInfo, BlastAttackDamageInfo>)SetBlastAttackForce1); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!")); } static void SetBlastAttackForce1(DamageInfo damageInfo, ref BlastAttackDamageInfo blastAttackDamageInfo) { damageInfo.SetForceMassIsOne(blastAttackDamageInfo.GetForceMassIsOne()); damageInfo.SetForceAlwaysApply(blastAttackDamageInfo.GetForceAlwaysApply()); damageInfo.SetForceDisableAirControlUntilCollision(blastAttackDamageInfo.GetForceDisableAirControlUntilCollision()); } } private static void BlastAttack_HandleHits(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_005c: 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) ILCursor val = new ILCursor(il); ILLabel val2 = null; int locid = 9; if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloca(x, ref locid), (Instruction x) => ILPatternMatchingExt.MatchInitobj<BlastAttackDamageInfo>(x) })) { val.Emit(OpCodes.Ldloca, locid); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<<>A{00000001}<BlastAttackDamageInfo, BlastAttack>>((<>A{00000001}<BlastAttackDamageInfo, BlastAttack>)SetBlastAttackForce1); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!")); } static void SetBlastAttackForce1(ref BlastAttackDamageInfo blastAttackDamageInfo, BlastAttack blastAttack) { blastAttackDamageInfo.SetForceMassIsOne(blastAttack.GetForceMassIsOne()); blastAttackDamageInfo.SetForceAlwaysApply(blastAttack.GetForceAlwaysApply()); blastAttackDamageInfo.SetForceDisableAirControlUntilCollision(blastAttack.GetForceDisableAirControlUntilCollision()); } } private static void BulletAttack_Fire(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILLabel iLLabel = null; if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<BulletAttack>(x, "weapon"), (Instruction x) => ILPatternMatchingExt.MatchCall<Object>(x, "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref iLLabel) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<BulletAttack, bool>>((Func<BulletAttack, bool>)GetNoWeaponIfOwner); val.Emit(OpCodes.Brtrue_S, (object)iLLabel); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!")); } static bool GetNoWeaponIfOwner(BulletAttack bulletAttack) { return bulletAttack.GetNoWeaponIfOwner(); } } private static void HealthComponent_TakeDamageForce_DamageInfo_bool_bool(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int locId = 3; if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[6] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locId), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld<DamageInfo>(x, "force"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 2), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 3), (Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterMotor>(x, "ApplyForce") })) { Instruction next = val.Next.Next.Next.Next.Next.Next.Next; Instruction next2 = val.Next.Next; int index = val.Index; val.Index = index + 1; val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<DamageInfo, bool>>((Func<DamageInfo, bool>)HasIsMassIsOne); val.Emit(OpCodes.Brfalse_S, next2); val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldarg_2); val.Emit(OpCodes.Ldarg_3); val.EmitDelegate<Action<CharacterMotor, DamageInfo, bool, bool>>((Action<CharacterMotor, DamageInfo, bool, bool>)ApplyForce); val.Emit(OpCodes.Br, next); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } static void ApplyForce(CharacterMotor characterMotor, DamageInfo damageInfo, bool awlaysApply, bool disableAirControlUntilCollision) { //IL_0003: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) PhysForceInfo val2 = default(PhysForceInfo); ((PhysForceInfo)(ref val2)).disableAirControlUntilCollision = disableAirControlUntilCollision; ((PhysForceInfo)(ref val2)).ignoreGroundStick = awlaysApply; val2.force = damageInfo.force; ((PhysForceInfo)(ref val2)).massIsOne = damageInfo.GetForceMassIsOne(); PhysForceInfo val3 = val2; characterMotor.ApplyForceImpulse(ref val3); } static bool HasIsMassIsOne(DamageInfo damageInfo) { return damageInfo.GetForceMassIsOne(); } } private DamageInfo NetworkExtensions_ReadDamageInfo(orig_ReadDamageInfo orig, NetworkReader reader) { DamageInfo val = orig.Invoke(reader); val.SetForceMassIsOne(reader.ReadBoolean()); val.SetForceAlwaysApply(reader.ReadBoolean()); val.SetForceDisableAirControlUntilCollision(reader.ReadBoolean()); return val; } private void NetworkExtensions_Write_NetworkWriter_DamageInfo(orig_Write_NetworkWriter_DamageInfo orig, NetworkWriter writer, DamageInfo damageInfo) { orig.Invoke(writer, damageInfo); writer.Write(damageInfo.GetForceMassIsOne()); writer.Write(damageInfo.GetForceAlwaysApply()); writer.Write(damageInfo.GetForceDisableAirControlUntilCollision()); } private void BulletAttack_DefaultHitCallbackImplementation(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_005c: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int locId = 3; if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchNewobj<DamageInfo>(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locId) })) { val.Emit(OpCodes.Ldloc, locId); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Action<DamageInfo, BulletAttack>>((Action<DamageInfo, BulletAttack>)SetForceBooleans); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld<DamageInfo>(x, "force") })) { val.Emit(OpCodes.Ldloc, locId); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Action<DamageInfo, BulletAttack>>((Action<DamageInfo, BulletAttack>)SetBonusForce); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } static void SetBonusForce(DamageInfo damageInfo, BulletAttack bulletAttack) { //IL_0002: 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_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) damageInfo.force += bulletAttack.GetBonusForce(); } static void SetForceBooleans(DamageInfo damageInfo, BulletAttack bulletAttack) { damageInfo.SetForceMassIsOne(bulletAttack.GetForceMassIsOne()); damageInfo.SetForceAlwaysApply(bulletAttack.GetForceAlwaysApply()); damageInfo.SetForceDisableAirControlUntilCollision(bulletAttack.GetForceDisableAirControlUntilCollision()); } } private static void CharacterModel_UpdateMaterials(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0077: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterModel>(x, "fade") })) { Instruction next = val.Next; Instruction next2 = val.Next.Next.Next; val.Emit(OpCodes.Ldloc, 6); val.EmitDelegate<Func<RendererInfo, bool>>((Func<RendererInfo, bool>)FixFading); val.Emit(OpCodes.Brfalse_S, next); val.Emit(OpCodes.Ldc_R4, 1f); val.Emit(OpCodes.Br_S, next2); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } static bool FixFading(RendererInfo rendererInfo) { //IL_0010: 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) if (rendererInfo.GetDontFadeWhenNearCamera()) { return true; } Material val2 = (Object.op_Implicit((Object)(object)rendererInfo.renderer) ? rendererInfo.renderer.material : null); if (!Object.op_Implicit((Object)(object)val2) || !val2.HasInt("_FadeCloseOn")) { return false; } return val2.GetInt("_FadeCloseOn") == 0; } } private static void CharacterModel_UpdateRendererMaterials(orig_UpdateRendererMaterials orig, CharacterModel self, Renderer renderer, Material defaultMaterial, bool ignoreOverlays) { ParticleSystemRenderer val = (ParticleSystemRenderer)(object)((renderer is ParticleSystemRenderer) ? renderer : null); bool flag = false; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.trailMaterial)) { flag = true; } orig.Invoke(self, renderer, defaultMaterial, ignoreOverlays); if (flag) { val.trailMaterial = defaultMaterial; } } private static void Util_BuildPrefabTransformPath(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); ILLabel val6 = default(ILLabel); string text3 = default(string); string text2 = default(string); MethodReference val5 = default(MethodReference); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[7] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Object), "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val6), (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, ref text3), (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, ref text2), (Instruction x) => ILPatternMatchingExt.MatchNewobj(x, ref val5), (Instruction x) => ILPatternMatchingExt.MatchThrow(x) })) { val.RemoveRange(15); ILLabel val4 = default(ILLabel); int num = default(int); MethodReference val3 = default(MethodReference); string text = default(string); MethodReference val2 = default(MethodReference); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[12] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 1), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Object), "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val4), (Instruction x) => ILPatternMatchingExt.MatchLdloca(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchCall(x, ref val3), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 2), (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, ref text), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 2), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCall<string>(x, "Format"), (Instruction x) => ILPatternMatchingExt.MatchNewobj(x, ref val2), (Instruction x) => ILPatternMatchingExt.MatchThrow(x) })) { val.RemoveRange(12); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 2 failed!")); } } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!")); } } private static void GeneratedNetworkCode__ReadPhysForceInfo_None(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) //IL_004a: 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.MatchStfld<PhysForceInfo>(x, "force") })) { val.Emit(OpCodes.Ldloca, 0); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<<>A{00000001}<PhysForceInfo, NetworkReader>>((<>A{00000001}<PhysForceInfo, NetworkReader>)Pissbox); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } static void Pissbox(ref PhysForceInfo physForceInfo, NetworkReader networkReader) { ((PhysForceInfo)(ref physForceInfo)).ignoreGroundStick = networkReader.ReadBoolean(); ((PhysForceInfo)(ref physForceInfo)).disableAirControlUntilCollision = networkReader.ReadBoolean(); } } private static void GeneratedNetworkCode__WritePhysForceInfo_None(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) //IL_0049: 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<NetworkWriter>(x, "Write") })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Action<NetworkWriter, PhysForceInfo>>((Action<NetworkWriter, PhysForceInfo>)Hopoopoo); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } static void Hopoopoo(NetworkWriter networkWriter, PhysForceInfo physForceInfo) { networkWriter.Write(((PhysForceInfo)(ref physForceInfo)).ignoreGroundStick); networkWriter.Write(((PhysForceInfo)(ref physForceInfo)).disableAirControlUntilCollision); } } private static void LoadoutPanelController_Rebuild(orig_Rebuild orig, LoadoutPanelController self) { orig.Invoke(self); int count = Section.sections.Count; if (count <= 0) { return; } if (count == 1) { ClearSections(); return; } LayoutElement val = (Object.op_Implicit((Object)(object)loadoutSectionHolder) ? loadoutSectionHolder.GetComponent<LayoutElement>() : null); loadoutSectionHolder.transform.SetAsFirstSibling(); if ((Object)(object)val != (Object)null) { val.minHeight = 32f; val.preferredHeight = 48f; val.flexibleHeight = 0f; } Utils.SelectRowsSection("LOADOUT_SECTION_MAIN"); } private static void Row_FromSkin(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.MatchNewobj<Row>(x) })) { val.Emit(OpCodes.Dup); val.EmitDelegate<Action<Row>>((Action<Row>)SetSection); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } static void SetSection(Row row) { string sectionName = "LOADOUT_SECTION_MAIN"; CreateSection(row, sectionName); } } private static void CreateSection(Row row, string sectionName) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) if (Section.sectionByName.ContainsKey(sectionName)) { Section section = Section.sectionByName[sectionName]; section.rows.Add(row); } else { Section section2 = new Section(sectionName, row.primaryColor); section2.rows.Add(row); } } private static void Row_FinishSetup(orig_FinishSetup orig, Row self, bool addWIPIcons) { orig.Invoke(self, addWIPIcons); } private static void ClearSections() { while (Section.sections.Count > 0) { Section.sections[0].Dispose(); } LayoutElement val = (Object.op_Implicit((Object)(object)loadoutSectionHolder) ? loadoutSectionHolder.GetComponent<LayoutElement>() : null); if ((Object)(object)val != (Object)null) { val.minHeight = 0f; val.preferredHeight = 0f; } } private static void LoadoutPanelController_DestroyRows(orig_DestroyRows orig, LoadoutPanelController self) { ClearSections(); orig.Invoke(self); } private static void Row_FromSkillSlot(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) //IL_0049: 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.MatchNewobj<Row>(x) })) { val.Emit(OpCodes.Dup); val.Emit(OpCodes.Ldarg_3); val.EmitDelegate<Action<Row, GenericSkill>>((Action<Row, GenericSkill>)SetSection); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } static void SetSection(Row row, GenericSkill genericSkill) { string text = genericSkill.GetSection(); if (text == null || text == "") { text = "LOADOUT_SECTION_MAIN"; } CreateSection(row, text); } } private static void LoadoutPanelController_Awake(orig_Awake orig, LoadoutPanelController self) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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) orig.Invoke(self); if (!(((Object)self).name != "LoadoutPanel") && !Object.op_Implicit((Object)(object)loadoutSectionHolder)) { loadoutSectionHolder = new GameObject("SectionHolder"); Transform transform = loadoutSectionHolder.transform; loadoutSectionHolder.transform.SetParent(((Component)self).transform); transform.localScale = Vector3.one; transform.localRotation = Quaternion.identity; transform.localPosition = Vector3.zero; RectTransform val = loadoutSectionHolder.AddComponent<RectTransform>(); CanvasRenderer val2 = loadoutSectionHolder.AddComponent<CanvasRenderer>(); val2.cullTransparentMesh = false; HorizontalLayoutGroup val3 = loadoutSectionHolder.AddComponent<HorizontalLayoutGroup>(); RectOffset padding = ((LayoutGroup)val3).padding; padding.right = 6; padding.left = 6; padding.top = 6; padding.bottom = 6; ((HorizontalOrVerticalLayoutGroup)val3).childControlHeight = true; ((HorizontalOrVerticalLayoutGroup)val3).childControlWidth = true; LayoutElement val4 = loadoutSectionHolder.AddComponent<LayoutElement>(); val4.minHeight = 32f; val4.preferredHeight = 48f; val4.flexibleHeight = 0f; } } private static bool BulletAttack_ProcessHit(orig_ProcessHit orig, BulletAttack self, ref BulletHit hitInfo) { if (hitInfo != null && Object.op_Implicit((Object)(object)hitInfo.hitHurtBox) && Object.op_Implicit((Object)(object)hitInfo.hitHurtBox.healthComponent) && self.GetIgnoreHitTargets()) { List<object> ignoredHealthComponents = self.GetIgnoredHealthComponents(); if (ignoredHealthComponents == null) { self.SetIgnoredHealthComponents(new List<object>()); ignoredHealthComponents = self.GetIgnoredHealthComponents(); } if (ignoredHealthComponents.Contains(hitInfo.hitHurtBox.healthComponent)) { return false; } ignoredHealthComponents.Add(hitInfo.hitHurtBox.healthComponent); } return orig.Invoke(self, ref hitInfo); } private static void CharacterSelectController_OnEnable(orig_OnEnable orig, CharacterSelectController self) { orig.Invoke(self); SetConfigValues(); } private static void GenericSkill_Awake(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILLabel val2 = null; if (val.TryGotoNext(new Func<Instruction, bool>[5] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCall<GenericSkill>(x, "get_skillFamily"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt<SkillFamily>(x, "get_defaultSkillDef"), (Instruction x) => ILPatternMatchingExt.MatchCall<GenericSkill>(x, "set_defaultSkillDef") })) { val.RemoveRange(5); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Action<GenericSkill>>((Action<GenericSkill>)delegate(GenericSkill cb) { cb.defaultSkillDef = (Object.op_Implicit((Object)(object)cb.skillFamily) ? cb.skillFamily.defaultSkillDef : null); }); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } } private static void GenericCharacterMain_HandleMovements(orig_HandleMovements orig, GenericCharacterMain self) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && CharacterBodyAPI.HasModdedBodyFlag(((EntityState)self).characterBody, Assets.SprintAllTime)) { self.sprintInputReceived = true; } orig.Invoke(self); } private static void CameraModePlayerBasic_CollectLookInputInternal(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_00ce: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILLabel iLLabel = null; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld<CameraRigController>(x, "enableSprintSensitivitySlowdown"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt<BoolConVar>(x, "get_value"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref iLLabel) })) { val.Emit(OpCodes.Ldarg_2); val.Emit<CameraModeContext>(OpCodes.Ldflda, "targetInfo"); val.Emit<TargetInfo>(OpCodes.Ldfld, "body"); val.EmitDelegate<Func<CharacterBody, bool>>((Func<CharacterBody, bool>)((CharacterBody cb) => Object.op_Implicit((Object)(object)cb) && CharacterBodyAPI.HasModdedBodyFlag(cb, Assets.SprintAllTime))); val.Emit(OpCodes.Brtrue_S, (object)iLLabel); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } } private static void SkillDef_OnExecute(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILLabel iLLabel = null; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<SkillDef>(x, "cancelSprintingOnActivation"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref iLLabel) })) { val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<GenericSkill, bool>>((Func<GenericSkill, bool>)((GenericSkill cb) => CharacterBodyAPI.HasModdedBodyFlag(cb.characterBody, Assets.SprintAllTime))); val.Emit(OpCodes.Brtrue_S, (object)iLLabel); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } } private static void SkillDef_OnFixedUpdate(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILLabel iLLabel = null; if (val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchCallvirt<GenericSkill>(x, "get_characterBody"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterBody>(x, "get_isSprinting"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref iLLabel) })) { val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<GenericSkill, bool>>((Func<GenericSkill, bool>)((GenericSkill cb) => Object.op_Implicit((Object)(object)cb) && Object.op_Implicit((Object)(object)cb.characterBody) && CharacterBodyAPI.HasModdedBodyFlag(cb.characterBody, Assets.SprintAllTime))); val.Emit(OpCodes.Brtrue_S, (object)iLLabel); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } } private static void CameraModePlayerBasic_UpdateInternal(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILLabel iLLabel = null; if (val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 2), (Instruction x) => ILPatternMatchingExt.MatchLdflda<CameraModeContext>(x, "targetInfo"), (Instruction x) => ILPatternMatchingExt.MatchLdfld<TargetInfo>(x, "isSprinting"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref iLLabel) })) { val.Emit(OpCodes.Ldarg_2); val.EmitDelegate<<>F{00000001}<CameraModeContext, bool>>((<>F{00000001}<CameraModeContext, bool>)sus); val.Emit(OpCodes.Brtrue_S, (object)iLLabel); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } static bool sus(ref CameraModeContext cameraModeContext) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)cameraModeContext.targetInfo.body != (Object)null) { return CharacterBodyAPI.HasModdedBodyFlag(cameraModeContext.targetInfo.body, Assets.SprintAllTime); } return true; } } private static void CrosshairManager_UpdateCrosshair1(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0107: 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) ILCursor val = new ILCursor(il); ILLabel iLLabel = null; ILLabel iLLabel2 = null; if (val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CrosshairManager>(x, "cameraRigController"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt<CameraRigController>(x, "get_hasOverride"), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref iLLabel) }) && val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterBody>(x, "get_isSprinting"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref iLLabel2) })) { val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<CharacterBody, bool>>((Func<CharacterBody, bool>)((CharacterBody cb) => CharacterBodyAPI.HasModdedBodyFlag(cb, Assets.SprintAllTime))); val.Emit(OpCodes.Brtrue_S, (object)iLLabel); } else { Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } } private static void CameraRigController_SetCameraState1(orig_SetCameraState orig, CameraRigController self, CameraState cameraState) { //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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, cameraState); if (!(worldCrosshairPositionOverride == Vector3.zero)) { ((Component)self).transform.rotation = Quaternion.LookRotation(worldCrosshairPositionOverride - ((Component)self).transform.position); } } private void CameraRigController_SetCameraState(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); Instruction val2 = null; if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CameraState>(x, "rotation") })) { val.Remove(); val.EmitDelegate<<>F{00000001}<CameraState, Quaternion>>((<>F{00000001}<CameraState, Quaternion>)SetOverrideWorldCrosshairPosition); } else { Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!")); } static Quaternion SetOverrideWorldCrosshairPosition(ref CameraState cameraState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_0022: 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) //IL_0032: Unknown result type (might be due to invalid IL or missing references) return (worldCrosshairPositionOverride == Vector3.zero) ? cameraState.rotation : Quaternion.LookRotation(worldCrosshairPositionOverride - cameraState.position); } } private static void CameraRigController_LateUpdate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); Instruction val2 = null; if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 5), (Instruction x) => ILPatternMatchingExt.MatchLdfld<UpdateResult>(x, "crosshairWorldPosition"), (Instruction x) => ILPatternMatchingExt.MatchCall<CameraRigController>(x, "set_crosshairWorldPosition") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Action<CameraRigController>>((Acti
plugins/BrynzaInterop.dll
Decompiled 5 days agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using Microsoft.CodeAnalysis; using RoR2; using RoR2.Skills; using RoR2.UI; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: InternalsVisibleTo("BrynzaAPI")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BrynzaInterop")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+ae494137538e5e5c0d5fe63b93b7937e38f5424e")] [assembly: AssemblyProduct("BrynzaInterop")] [assembly: AssemblyTitle("BrynzaInterop")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BrynzaAPI.Interop { public static class BrynzaInterop { public static List<GenericSkill> GetExtraSkills(GenericSkill genericSkill) { GenericSkill genericSkill2 = genericSkill; return (genericSkill2.bapi_extraSkills != null) ? (from i in Enumerable.Range(0, genericSkill2.bapi_extraSkills.Count) select (GenericSkill)((genericSkill2.bapi_extraSkills[i] is GenericSkill) ? /*isinst with value type is only supported in some contexts*/: null)).ToList() : null; } public static void SetExtraSkills(GenericSkill genericSkill, List<object> list) { genericSkill.bapi_extraSkills = list; } public static void AddExtraSkill(GenericSkill genericSkill, GenericSkill obj) { if (genericSkill.bapi_extraSkills != null) { genericSkill.bapi_extraSkills.Add(obj); return; } genericSkill.bapi_extraSkills = new List<object>(); genericSkill.bapi_extraSkills.Add(obj); } public static void RemoveExtraSkill(GenericSkill genericSkill, GenericSkill obj) { if (genericSkill.bapi_extraSkills != null && genericSkill.bapi_extraSkills.Contains(obj)) { genericSkill.bapi_extraSkills.Remove(obj); } } public static void LinkSkill(GenericSkill genericSkil, object obj) { genericSkil.bapi_linkedSkill = obj; } public static GenericSkill GetLinkedSkill(GenericSkill genericSkil) { return (GenericSkill)((genericSkil.bapi_linkedSkill != null && genericSkil.bapi_linkedSkill is GenericSkill) ? /*isinst with value type is only supported in some contexts*/: null); } public static void AddBonusSkill(SkillLocator skillLocator, GenericSkill genericSkill) { if (skillLocator.bapi_bonusSkills != null) { skillLocator.bapi_bonusSkills.Add(genericSkill); return; } skillLocator.bapi_bonusSkills = new List<object>(); skillLocator.bapi_bonusSkills.Add(genericSkill); } public static void RemoveBonusSkill(SkillLocator skillLocator, GenericSkill genericSkill) { if (skillLocator.bapi_bonusSkills != null && skillLocator.bapi_bonusSkills.Contains(genericSkill)) { skillLocator.bapi_bonusSkills.Remove(genericSkill); } } public static List<GenericSkill> GetBonusSkills(SkillLocator skillLocator) { SkillLocator skillLocator2 = skillLocator; return (skillLocator2.bapi_bonusSkills != null) ? (from i in Enumerable.Range(0, skillLocator2.bapi_bonusSkills.Count) select (GenericSkill)((skillLocator2.bapi_bonusSkills[i] is GenericSkill) ? /*isinst with value type is only supported in some contexts*/: null)).ToList() : null; } public static Vector3 GetVelocityOverride(CharacterMotor characterMotor) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return characterMotor.bapi_velocityOverride; } public static void SetVelocityOverride(CharacterMotor characterMotor, Vector3 value) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) characterMotor.bapi_velocityOverride = value; } public static bool GetKeepVelocityOnMoving(CharacterMotor characterMotor) { return characterMotor.bapi_keepVelocityOnMoving; } public static void SetKeepVelocityOnMoving(CharacterMotor characterMotor, bool value) { characterMotor.bapi_keepVelocityOnMoving = value; } public static float GetConsistentAcceleration(CharacterMotor characterMotor) { return characterMotor.bapi_consistentAcceleration; } public static void SetConsistentAcceleration(CharacterMotor characterMotor, float value) { characterMotor.bapi_consistentAcceleration = value; } public static float GetAirControlFromVelocityAdd(CharacterMotor characterMotor) { return characterMotor.bapi_airControlFromVelocityAdd; } public static void SetAirControlFromVelocityAdd(CharacterMotor characterMotor, float value) { characterMotor.bapi_airControlFromVelocityAdd = value; } public static bool GetFluidMaxDistanceDelta(CharacterMotor characterMotor) { return characterMotor.bapi_fluidMaxDistanceDelta; } public static void SetFluidMaxDistanceDelta(CharacterMotor characterMotor, bool value) { characterMotor.bapi_fluidMaxDistanceDelta = value; } public static bool GetStrafe(CharacterMotor characterMotor) { return characterMotor.bapi_strafe; } public static void SetStrafe(CharacterMotor characterMotor, bool value) { characterMotor.bapi_strafe = value; } public static bool GetBunnyHop(CharacterMotor characterMotor) { return characterMotor.bapi_bunnyHop; } public static void SetBunnyHop(CharacterMotor characterMotor, bool value) { characterMotor.bapi_bunnyHop = value; } public static int GetBaseWallJumpCount(CharacterBody characterBody) { return characterBody.bapi_baseWallJumpCount; } public static void SetBaseWallJumpCount(CharacterBody characterBody, int value) { characterBody.bapi_baseWallJumpCount = value; } public static int GetMaxWallJumpCount(CharacterBody characterBody) { return characterBody.bapi_maxWallJumpCount; } public static void SetMaxWallJumpCount(CharacterBody characterBody, int value) { characterBody.bapi_maxWallJumpCount = value; } public static int GetWallJumpCount(CharacterMotor characterMotor) { return characterMotor.bapi_wallJumpCount; } public static void SetWallJumpCount(CharacterMotor characterMotor, int value) { characterMotor.bapi_wallJumpCount = value; } public static bool CanApplyAmmoPack(SkillDef skillDef) { return skillDef.bapi_CanApplyAmmoPack(); } public static void SetStateToMain(EntityStateMachine entityStateMachine) { entityStateMachine.bapi_SetStateToMain(); } public static List<object> GetIgnoredHealthComponents(BulletAttack bulletAttack) { return bulletAttack.bapi_ignoredHealthComponentList; } public static void SetIgnoredHealthComponents(BulletAttack bulletAttack, List<object> value) { bulletAttack.bapi_ignoredHealthComponentList = value; } public static bool GetIgnoreHitTargets(BulletAttack bulletAttack) { return bulletAttack.bapi_ignoreHitTargets; } public static void SetForceMassIsOne(BulletAttack bulletAttack, bool value) { bulletAttack.bapi_forceMassIsOne = value; } public static bool GetForceMassIsOne(BulletAttack bulletAttack) { return bulletAttack.bapi_forceMassIsOne; } public static void SetForceMassIsOne(BlastAttack blastAttack, bool value) { blastAttack.bapi_forceMassIsOne = value; } public static bool GetForceMassIsOne(BlastAttack blastAttack) { return blastAttack.bapi_forceMassIsOne; } public static void SetForceMassIsOne(ref BlastAttackDamageInfo blastAttackDamageInfo, bool value) { blastAttackDamageInfo.bapi_forceMassIsOne = value; } public static bool GetForceMassIsOne(ref BlastAttackDamageInfo blastAttackDamageInfo) { return blastAttackDamageInfo.bapi_forceMassIsOne; } public static void SetForceMassIsOne(DamageInfo damageInfo, bool value) { damageInfo.bapi_forceMassIsOne = value; } public static bool GetForceMassIsOne(DamageInfo damageInfo) { return damageInfo.bapi_forceMassIsOne; } public static void SetForceAlwaysApply(BulletAttack bulletAttack, bool value) { bulletAttack.bapi_forceAlwaysApply = value; } public static bool GetForceAlwaysApply(BulletAttack bulletAttack) { return bulletAttack.bapi_forceAlwaysApply; } public static void SetForceAlwaysApply(BlastAttack blastAttack, bool value) { blastAttack.bapi_forceAlwaysApply = value; } public static bool GetForceAlwaysApply(BlastAttack blastAttack) { return blastAttack.bapi_forceAlwaysApply; } public static void SetForceAlwaysApply(ref BlastAttackDamageInfo blastAttackDamageInfo, bool value) { blastAttackDamageInfo.bapi_forceAlwaysApply = value; } public static bool GetForceAlwaysApply(ref BlastAttackDamageInfo blastAttackDamageInfo) { return blastAttackDamageInfo.bapi_forceAlwaysApply; } public static void SetForceAlwaysApply(DamageInfo damageInfo, bool value) { damageInfo.bapi_forceAlwaysApply = value; } public static bool GetForceAlwaysApply(DamageInfo damageInfo) { return damageInfo.bapi_forceAlwaysApply; } public static void SetForceDisableAirControlUntilCollision(BulletAttack bulletAttack, bool value) { bulletAttack.bapi_forceDisableAirControlUntilCollision = value; } public static bool GetForceDisableAirControlUntilCollision(BulletAttack bulletAttack) { return bulletAttack.bapi_forceDisableAirControlUntilCollision; } public static void SetForceDisableAirControlUntilCollision(BlastAttack blastAttack, bool value) { blastAttack.bapi_forceDisableAirControlUntilCollision = value; } public static bool GetForceDisableAirControlUntilCollision(BlastAttack blastAttack) { return blastAttack.bapi_forceDisableAirControlUntilCollision; } public static void SetForceDisableAirControlUntilCollision(ref BlastAttackDamageInfo blastAttackDamageInfo, bool value) { blastAttackDamageInfo.bapi_forceDisableAirControlUntilCollision = value; } public static bool GetForceDisableAirControlUntilCollision(ref BlastAttackDamageInfo blastAttackDamageInfo) { return blastAttackDamageInfo.bapi_forceDisableAirControlUntilCollision; } public static void SetForceDisableAirControlUntilCollision(DamageInfo damageInfo, bool value) { damageInfo.bapi_forceDisableAirControlUntilCollision = value; } public static bool GetForceDisableAirControlUntilCollision(DamageInfo damageInfo) { return damageInfo.bapi_forceDisableAirControlUntilCollision; } public static void SetBonusForce(BulletAttack bulletAttack, Vector3 value) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) bulletAttack.bapi_bonusForce = value; } public static Vector3 GetBonusForce(BulletAttack bulletAttack) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return bulletAttack.bapi_bonusForce; } public static void SetIgnoreHitTargets(BulletAttack bulletAttack, bool value) { bulletAttack.bapi_ignoreHitTargets = value; } public static string GetSection(Row row) { return row.bapi_section; } public static void SetSection(Row row, string value) { row.bapi_section = value; } public static string GetSection(GenericSkill genericSkill) { return genericSkill.bapi_section; } public static void SetSection(GenericSkill genericSkill, string value) { genericSkill.bapi_section = value; } public static List<string> GetSections(LoadoutPanelController loadoutPanelController) { return loadoutPanelController.bapi_sections; } public static void SetSections(LoadoutPanelController loadoutPanelController, List<string> value) { loadoutPanelController.bapi_sections = value; } public static bool GetDontFadeWhenNearCamera(ref RendererInfo rendererInfo) { return rendererInfo.bapi_dontFadeCloseOn; } public static void SetDontFadeWhenNearCamera(ref RendererInfo rendererInfo, bool value) { rendererInfo.bapi_dontFadeCloseOn = value; } public static void SetNoWeaponIfOwner(BulletAttack bulletAttack, bool value) { bulletAttack.bapi_noWeaponIfOwner = value; } public static bool GetNoWeaponIfOwner(BulletAttack bulletAttack) { return bulletAttack.bapi_noWeaponIfOwner; } public static float GetPitchClipCycleStart(AimAnimator aimAnimator) { return aimAnimator.bapi_pitchClipCycleStart; } public static void SetPitchClipCycleStart(AimAnimator aimAnimator, float value) { aimAnimator.bapi_pitchClipCycleStart = value; } public static float GetYawClipCycleStart(AimAnimator aimAnimator) { return aimAnimator.bapi_yawClipCycleStart; } public static void SetYawClipCycleStart(AimAnimator aimAnimator, float value) { aimAnimator.bapi_yawClipCycleStart = value; } public static FixedTimeStamp GetLastJumpTime(CharacterBody characterBody) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return characterBody.bapi_lastJumpTime; } public static void SetLastJumpTime(CharacterBody characterBody, FixedTimeStamp value) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) characterBody.bapi_lastJumpTime = value; } public static void SetClientBuffs(CharacterBody characterBody, int[] value) { characterBody.bapi_clientBuffs = value; } public static int[] GetClientBuffs(CharacterBody characterBody) { return characterBody.bapi_clientBuffs; } public static void SetScale(EffectData effectData, Vector3? value) { effectData.bapi_scale = value; } public static Vector3? GetScale(EffectData effectData) { return effectData.bapi_scale; } } }