Decompiled source of KamunagiOfChains v1.0.9
plugins/KamunagiOfChains.dll
Decompiled a day 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.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Threading.Tasks; using AK.Wwise; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using ConcentricContent; using EntityStates; using EntityStates.BeetleQueenMonster; using EntityStates.GrandParent; using EntityStates.Gup; using EntityStates.Huntress; using EntityStates.LunarWisp; using EntityStates.Mage.Weapon; using ExtraSkillSlots; using HG; using HG.GeneralSerializer; using HG.Reflection; using HarmonyLib; using Kamunagi; using KamunagiOfChains.Data.Bodies.Kamunagi; using KamunagiOfChains.Data.Bodies.Kamunagi.Extra; using KamunagiOfChains.Data.Bodies.Kamunagi.OtherStates; using KamunagiOfChains.Data.Bodies.Kamunagi.Passive; using KamunagiOfChains.Data.Bodies.Kamunagi.Primary; using KamunagiOfChains.Data.Bodies.Kamunagi.Secondary; using KamunagiOfChains.Data.Bodies.Kamunagi.Special; using KamunagiOfChains.Data.Bodies.Kamunagi.Utility; using KinematicCharacterController; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using Newtonsoft.Json.Utilities; using R2API; using R2API.Utils; using RoR2; using RoR2.Audio; using RoR2.ContentManagement; using RoR2.Navigation; using RoR2.Networking; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2.WwiseUtils; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; using UnityEngine.Serialization; 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("KamunagiOfChains")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+64801fc40389e6a1f610b19a6450a25f9d25e8cd")] [assembly: AssemblyProduct("KamunagiOfChains")] [assembly: AssemblyTitle("KamunagiOfChains")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } public class Defaults { public void Yep() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.mustKeyPress = false; val.isCombatSkill = true; val.hideStockCount = false; val.canceledFromSprinting = false; val.cancelSprintingOnActivation = true; val.beginSkillCooldownOnSkillEnd = false; val.dontAllowPastMaxStocks = false; val.fullRestockOnAssign = true; val.attackSpeedBuffsRestockSpeed = false; val.stockToConsume = 1; val.requiredStock = 1; val.rechargeStock = 1; val.baseMaxStock = 1; val.baseRechargeInterval = 1f; val.interruptPriority = (InterruptPriority)1; } } namespace Kamunagi { [ExecuteInEditMode] public class ParticleUVScroll : MonoBehaviour { [SerializeField] private ParticleSystem particleSystem; [SerializeField] private bool isSubEmmitter; [SerializeField] private float endOffsetX; [SerializeField] private float endOffsetY = -0.6f; [SerializeField] private Material material; [SerializeField] private List<int> shaderIDs; [SerializeField] private float duration; [SerializeField] private float offX; [SerializeField] private float offY; [SerializeField] private float delay; [SerializeField] private float ltime; [SerializeField] private float ptime; private ParticleSystem parentSystem; private float lifetime; [SerializeField] private bool useLifetime = true; [SerializeField] private AnimationCurve xCurve; [SerializeField] private AnimationCurve yCurve; [SerializeField] private bool useCurve = false; private float curveTime; [SerializeField] private float randomXStartPerc; [SerializeField] private float randomYStartPerc; private void OnEnable() { //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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_018e: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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) //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_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) particleSystem = ((Component)this).gameObject.GetComponent<ParticleSystem>(); MainModule main = particleSystem.main; ltime = 0f; MinMaxCurve val; if (isSubEmmitter) { parentSystem = ((Component)((Component)this).gameObject.transform.parent).GetComponent<ParticleSystem>(); SubEmittersModule subEmitters = parentSystem.subEmitters; int num = 0; for (int i = 0; i < ((SubEmittersModule)(ref subEmitters)).subEmittersCount; i++) { if ((Object)(object)((SubEmittersModule)(ref subEmitters)).GetSubEmitterSystem(i) == (Object)(object)particleSystem) { num = i; } } ParticleSystemSubEmitterProperties subEmitterProperties = ((SubEmittersModule)(ref subEmitters)).GetSubEmitterProperties(num); MainModule main2; if (useLifetime) { if (((Enum)subEmitterProperties).HasFlag((Enum)(object)(ParticleSystemSubEmitterProperties)8)) { main2 = parentSystem.main; val = ((MainModule)(ref main2)).startLifetime; float constant = ((MinMaxCurve)(ref val)).constant; val = ((MainModule)(ref main)).startLifetime; lifetime = constant * ((MinMaxCurve)(ref val)).constant; main2 = parentSystem.main; val = ((MainModule)(ref main2)).startDelay; float constant2 = ((MinMaxCurve)(ref val)).constant; val = ((MainModule)(ref main)).startDelay; delay = constant2 + ((MinMaxCurve)(ref val)).constant; } else { val = ((MainModule)(ref main)).startLifetime; lifetime = ((MinMaxCurve)(ref val)).constant; main2 = parentSystem.main; val = ((MainModule)(ref main2)).startDelay; float constant3 = ((MinMaxCurve)(ref val)).constant; val = ((MainModule)(ref main)).startDelay; delay = constant3 + ((MinMaxCurve)(ref val)).constant; } } else if (((Enum)subEmitterProperties).HasFlag((Enum)(object)(ParticleSystemSubEmitterProperties)16)) { main2 = parentSystem.main; duration = ((MainModule)(ref main2)).duration * ((MainModule)(ref main)).duration; main2 = parentSystem.main; val = ((MainModule)(ref main2)).startDelay; float constant4 = ((MinMaxCurve)(ref val)).constant; val = ((MainModule)(ref main)).startDelay; delay = constant4 + ((MinMaxCurve)(ref val)).constant; } else { duration = ((MainModule)(ref main)).duration; main2 = parentSystem.main; val = ((MainModule)(ref main2)).startDelay; float constant5 = ((MinMaxCurve)(ref val)).constant; val = ((MainModule)(ref main)).startDelay; delay = constant5 + ((MinMaxCurve)(ref val)).constant; } } else if (useLifetime) { val = ((MainModule)(ref main)).startLifetime; lifetime = ((MinMaxCurve)(ref val)).constant; val = ((MainModule)(ref main)).startDelay; delay = ((MinMaxCurve)(ref val)).constant; } else { duration = ((MainModule)(ref main)).duration; val = ((MainModule)(ref main)).startDelay; delay = ((MinMaxCurve)(ref val)).constant; } material = ((Renderer)((Component)this).gameObject.GetComponent<ParticleSystemRenderer>()).sharedMaterial; shaderIDs = new List<int>(); if (material.HasProperty(Shader.PropertyToID("_MainTex"))) { shaderIDs.Add(Shader.PropertyToID("_MainTex")); } if (material.HasProperty(Shader.PropertyToID("_BumpMap"))) { shaderIDs.Add(Shader.PropertyToID("_BumpMap")); } if (material.HasProperty(Shader.PropertyToID("_MaskTex"))) { shaderIDs.Add(Shader.PropertyToID("_MaskTex")); } if (material.HasProperty(Shader.PropertyToID("_EmissionMap"))) { shaderIDs.Add(Shader.PropertyToID("_EmissionMap")); } } private void Update() { //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_0354: 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_02aa: Unknown result type (might be due to invalid IL or missing references) if (particleSystem.isPlaying) { if (isSubEmmitter) { ptime = parentSystem.time; } else { ptime = particleSystem.time; } if (useLifetime) { ltime = ptime / lifetime; } else { ltime = ptime / duration; } if (useCurve) { offX = xCurve.Evaluate(ltime); if (randomXStartPerc != 0f) { offX += AddStartOffset(randomXStartPerc); } offY = yCurve.Evaluate(ltime); if (randomYStartPerc != 0f) { offY += AddStartOffset(randomYStartPerc); } { foreach (int shaderID in shaderIDs) { if (Object.op_Implicit((Object)(object)material.GetTexture(shaderID))) { material.SetTextureOffset(shaderID, new Vector2(offX, offY)); } } return; } } if (endOffsetX != 0f) { offX = Mathf.Lerp(0f, endOffsetX, ltime); if (randomXStartPerc != 0f) { offX += AddStartOffset(randomXStartPerc); } } else { offX = 0f; } if (endOffsetY != 0f) { offY = Mathf.Lerp(0f, endOffsetY, ltime); if (randomYStartPerc != 0f) { offY += AddStartOffset(randomYStartPerc); } } else { offY = 0f; } { foreach (int shaderID2 in shaderIDs) { if (Object.op_Implicit((Object)(object)material.GetTexture(shaderID2))) { material.SetTextureOffset(shaderID2, new Vector2(offX, offY)); } } return; } } if (!(material.mainTextureOffset != Vector2.zero)) { return; } offX = 0f; offY = 0f; foreach (int shaderID3 in shaderIDs) { if (Object.op_Implicit((Object)(object)material.GetTexture(shaderID3))) { material.SetTextureOffset(shaderID3, new Vector2(offX, offY)); } } } private void OnDisable() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) foreach (int shaderID in shaderIDs) { if (Object.op_Implicit((Object)(object)material.GetTexture(shaderID))) { material.SetTextureOffset(shaderID, Vector2.zero); } } shaderIDs.Clear(); } private float AddStartOffset(float offsetPerc) { float num = 1f / offsetPerc; float num2 = Random.Range(0, (int)num - 1); return num2 % num * offsetPerc; } } } namespace KamunagiOfChains { public static class Colors { public static Color twinsLightColor = new Color(46f / 85f, 0.1176471f, 1f); public static Color twinsDarkColor = new Color(0.04742989f, 0.01059096f, 0.3207547f); public static Color twinsTintColor = new Color(0.525f, 0f, 1f); public static Color sealingColor = new Color(0.05098039f, 1f, 0.9058824f); public static Color oceanColor = new Color(0.13f, 0.79f, 0.85f); public static Color zealColor = new Color(0.9294118f, 0.654902f, 0.09019608f); public static Color jachdwaltColor = new Color(0.14f, 1f, 0f); public static Color windyGreen = new Color(0.175f, 0.63f, 0.086f); public static Color earlyZeal = new Color(0.65f, 1f, 0.06f); } public static class EffectManagerKamunagi { public static EffectManagerHelper GetAndActivatePooledEffect(GameObject prefab, Transform parentTransform, bool inResetLocal = false, EffectData? data = null) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown EffectManagerHelper pooledEffect = EffectManager.GetPooledEffect(prefab, parentTransform); GameObject gameObject = ((Component)pooledEffect).gameObject; if (inResetLocal) { gameObject.transform.localPosition = Vector3.zero; gameObject.transform.localRotation = Quaternion.identity; gameObject.transform.localScale = Vector3.one; } EffectComponent component = gameObject.GetComponent<EffectComponent>(); if (Object.op_Implicit((Object)(object)component)) { if (data == null) { data = new EffectData { rootObject = ((Component)parentTransform).gameObject }; } component.effectData = data.Clone(); pooledEffect.Reset(true); ((Component)pooledEffect).gameObject.SetActive(true); } return pooledEffect; } public static EffectManagerHelper GetAndActivatePooledEffect(GameObject prefab, EffectData data) { return GetAndActivatePooledEffect(prefab, data.rootObject.transform, inResetLocal: false, data); } } public static class ExtensionMethods { private static List<Material> _cachedMaterials = new List<Material>(); private static Shader hgStandard = LegacyResourcesAPI.Load<Shader>("Shaders/Deferred/HGStandard"); public static Material SetHopooMaterial(this Material tempMat) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) if (_cachedMaterials.Contains(tempMat)) { return tempMat; } float? num = null; Color? val = null; if (tempMat.IsKeywordEnabled("_NORMALMAP")) { num = tempMat.GetFloat("_BumpScale"); } if (tempMat.IsKeywordEnabled("_EMISSION")) { val = tempMat.GetColor("_EmissionColor"); } tempMat.shader = hgStandard; tempMat.SetColor("_Color", tempMat.GetColor("_Color")); tempMat.SetTexture("_MainTex", tempMat.GetTexture("_MainTex")); tempMat.SetTexture("_EmTex", tempMat.GetTexture("_EmissionMap")); tempMat.EnableKeyword("DITHER"); if (num.HasValue) { tempMat.SetFloat("_NormalStrength", num.Value); } if (val.HasValue) { tempMat.SetColor("_EmColor", val.Value); tempMat.SetFloat("_EmPower", 1f); } if (tempMat.IsKeywordEnabled("NOCULL")) { tempMat.SetInt("_Cull", 0); } if (tempMat.IsKeywordEnabled("LIMBREMOVAL")) { tempMat.SetInt("_LimbRemovalOn", 1); } _cachedMaterials.Add(tempMat); return tempMat; } public static void Deconstruct<T>(this T[] array, out T first, out T[] rest) { first = array[0]; rest = array[1..]; } public static Task<T> LoadAssetAsyncTask<T>(this AssetBundle bundle, string path) where T : Object { TaskCompletionSource<T> source = new TaskCompletionSource<T>(); AssetBundleRequest handle = bundle.LoadAssetAsync<T>(path); ((AsyncOperation)handle).completed += delegate { source.SetResult((T)(object)handle.asset); }; return source.Task; } public static DamageTypeCombo AddModdedDamageType(this ref DamageTypeCombo combo, ModdedDamageType moddedType) { //IL_0002: 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_0012: Unknown result type (might be due to invalid IL or missing references) DamageAPI.AddModdedDamageType(ref combo, moddedType); return combo; } public static T WaitForCompletion<T>(this Task<T> task) { task.Wait(); return task.Result; } public static T GetOrAddComponent<T>(this GameObject gameObject) where T : Component { T val = gameObject.GetComponent<T>(); if (!Object.op_Implicit((Object)(object)val)) { val = gameObject.AddComponent<T>(); } return val; } public static V GetOrSet<T, V>(this Dictionary<T, V> dict, T key, Func<V> valueGetter) { if (dict.TryGetValue(key, out V value)) { return value; } return dict[key] = valueGetter(); } public static EffectComponent EffectWithSound(this GameObject gameObject, string soundName) { EffectComponent val = gameObject.GetComponent<EffectComponent>(); if (!Object.op_Implicit((Object)(object)val)) { val = gameObject.AddComponent<EffectComponent>(); val.parentToReferencedTransform = true; val.positionAtReferencedTransform = true; } val.soundName = soundName; return val; } public static Vector3 FindNearestNodePosition(Vector3 targetPosition, GraphType nodeGraphType) { //IL_0009: 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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_006b: 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_008e: 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_0093: Unknown result type (might be due to invalid IL or missing references) SpawnCard val = ScriptableObject.CreateInstance<SpawnCard>(); val.hullSize = (HullClassification)0; val.nodeGraphType = nodeGraphType; val.prefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/DirectorSpawnProbeHelperPrefab.prefab").WaitForCompletion(); Vector3 result = targetPosition; GameObject val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, new DirectorPlacementRule { placementMode = (PlacementMode)3, position = targetPosition }, RoR2Application.rng)); if (Object.op_Implicit((Object)(object)val2)) { result = val2.transform.position; } if (Object.op_Implicit((Object)(object)val2)) { Object.Destroy((Object)(object)val2); } Object.Destroy((Object)(object)val); return result; } public static void SetChild(this ChildLocator locator, string key, Transform transform) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) string key2 = key; int num = CollectionUtils.IndexOf<NameTransformPair>((IEnumerable<NameTransformPair>)locator.transformPairs, (Func<NameTransformPair, bool>)((NameTransformPair x) => x.name == key2)); if (num < 0) { locator.transformPairs = CollectionExtensions.AddItem<NameTransformPair>((IEnumerable<NameTransformPair>)locator.transformPairs, new NameTransformPair { name = key2, transform = transform }).ToArray(); } else { locator.transformPairs[num].transform = transform; } } } [HarmonyPatch] public class KamunagiHUD : Concentric, IGenericObject, IGameObject { private static GameObject hud; public override async Task Initialize() { await <>n__0(); hud = await Concentric.GetGenericObject<KamunagiHUD>(); ZealBar.zealMat = await KamunagiOfChainsPlugin.LoadAsset<Material>("kamunagiassets2:ZealMat"); } async Task<GameObject> IGenericObject.BuildObject() { GameObject healthBarObject = PrefabAPI.InstantiateClone(((Component)(await KamunagiOfChainsPlugin.LoadAsset<GameObject>("RoR2/Base/UI/HUDSimple.prefab")).GetComponent<HUD>().healthBar).gameObject, "ZealBar", false); GameObject hud = new GameObject("ZealBarParent"); RectTransform transform = hud.AddComponent<RectTransform>(); ((Transform)transform).SetParent(healthBarObject.transform.parent); hud.layer = LayerIndex.ui.intVal; healthBarObject.transform.SetParent(hud.transform); hud.AddComponent<ZealBarHider>().zealBar = healthBarObject; HealthBar healthBar = healthBarObject.GetComponent<HealthBar>(); healthBarObject.AddComponent<ZealBar>().InitFromHealthBar(healthBar); Object.Destroy((Object)(object)healthBar); return hud; } [HarmonyPostfix] [HarmonyPatch(typeof(HUD), "Awake")] public static void AddZealBar(HUD __instance) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)__instance.healthBar).gameObject.transform; GameObject val = Object.Instantiate<GameObject>(hud, transform.parent.parent); val.transform.rotation = transform.rotation; val.transform.localScale = transform.localScale; val.transform.localPosition = transform.localPosition; } [CompilerGenerated] [DebuggerHidden] private Task <>n__0() { return ((Concentric)this).Initialize(); } } public class ZealBarHider : MonoBehaviour { public GameObject zealBar; public HUD hud; public BodyIndex kamunagiIndex; public GameObject cachedBody; public void Start() { //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) hud = ((Component)this).GetComponentInParent<HUD>(); kamunagiIndex = Concentric.GetObjectOrThrow<KamunagiAsset, IBody, GameObject>().WaitForCompletion().GetComponent<CharacterBody>() .bodyIndex; zealBar.transform.SetParent(((Component)hud.healthBar).transform.parent); } public void Update() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)hud) && !((Object)(object)hud.targetBodyObject == (Object)(object)cachedBody)) { cachedBody = hud.targetBodyObject; zealBar.SetActive(Object.op_Implicit((Object)(object)cachedBody) && cachedBody.GetComponent<CharacterBody>().bodyIndex == kamunagiIndex); } } } public class ZealBar : MonoBehaviour { public UIElementPairAllocator<Image, BarInfo> barAllocator; public RectTransform barContainer; public SpriteAsNumberManager spriteAsNumberManager; public HUD hud; public TwinBehaviour twinsBehaviour; public int? cachedZeal; public Object cachedBody; public GameObject barPrefab; public BarStyle zealStyle; public List<BarInfo> barInfos = new List<BarInfo> { default(BarInfo), default(BarInfo) }; public float cachedZealForLerp; public float zealVelocity; public BarStyle trailingOverZealStyle; public static Material zealMat; public Material defaultMaterial; private const float LerpStart = 0.6f; public void InitFromHealthBar(HealthBar healthBar) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) barContainer = healthBar.barContainer; barPrefab = healthBar.style.barPrefab; spriteAsNumberManager = healthBar.spriteAsNumberManager; trailingOverZealStyle = healthBar.style.trailingOverHealthBarStyle; trailingOverZealStyle.baseColor = Colors.zealColor; trailingOverZealStyle.sprite = null; zealStyle = healthBar.style.instantHealthBarStyle; zealStyle.baseColor = Colors.zealColor * new Color(1.1f, 1.1f, 1.1f); defaultMaterial = ((Graphic)barPrefab.GetComponentInChildren<Image>()).material; } public void Awake() { hud = ((Component)this).GetComponentInParent<HUD>(); barAllocator = new UIElementPairAllocator<Image, BarInfo>(barContainer, barPrefab); } public void Update() { //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //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_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)hud) || (Object)(object)hud.targetBodyObject == (Object)null) { return; } GameObject targetBodyObject = hud.targetBodyObject; if ((Object)(object)targetBodyObject != cachedBody) { twinsBehaviour = targetBodyObject.GetComponent<TwinBehaviour>(); cachedBody = (Object)(object)targetBodyObject; } if (Object.op_Implicit((Object)(object)twinsBehaviour)) { if (cachedZeal != twinsBehaviour.zealMeter) { cachedZeal = twinsBehaviour.zealMeter; spriteAsNumberManager.SetHitPointValues(cachedZeal.Value, twinsBehaviour.maxZeal); } barInfos.Clear(); BarInfo barInfo = default(BarInfo); ApplyStyle(ref barInfo, zealStyle, defaultMaterial); barInfo.normalizedXMax = twinsBehaviour.zealMeterNormalized; barInfo.enabled = !barInfo.normalizedXMax.Equals(0f); BarInfo barInfo2 = default(BarInfo); ApplyStyle(ref barInfo2, trailingOverZealStyle, zealMat); cachedZealForLerp = Mathf.SmoothDamp(cachedZealForLerp, twinsBehaviour.zealMeterNormalized, ref zealVelocity, 0.2f, float.PositiveInfinity, Time.deltaTime); barInfo2.normalizedXMax = (((double)cachedZealForLerp > 0.01) ? cachedZealForLerp : 0f); barInfo2.enabled = !barInfo2.normalizedXMax.Equals(0f); barInfo2.color = Color.Lerp(Colors.earlyZeal, Colors.zealColor, Mathf.Max(0f, barInfo2.normalizedXMax - 0.6f) / 0.39999998f); barInfo.color = barInfo2.color * 1.1f; if (barInfo.enabled) { barInfos.Add(barInfo); } if (barInfo2.enabled) { barInfos.Add(barInfo2); } int count = barInfos.Count; barAllocator.AllocateElements(count); for (int i = 0; i < count; i++) { BarInfo barInfo3 = barInfos[i]; HandleBar(i, ref barInfo3); barAllocator.SetData(barInfo3, i); } } } public static void ApplyStyle(ref BarInfo barInfo, BarStyle barStyle, Material material) { //IL_0009: 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_0013: 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_001e: 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_002b: 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_0036: Unknown result type (might be due to invalid IL or missing references) barInfo.enabled &= barStyle.enabled; barInfo.color = barStyle.baseColor; barInfo.sprite = barStyle.sprite; barInfo.imageType = barStyle.imageType; barInfo.sizeDelta = barStyle.sizeDelta; barInfo.material = material; } public void HandleBar(int i, ref BarInfo barInfo) { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //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_013e: Unknown result type (might be due to invalid IL or missing references) if (barInfo.enabled) { Image val = barAllocator.elements[i]; BarInfo barInfo2 = barAllocator.elementsData[i]; if (!barInfo2.DimsEqual(barInfo)) { barInfo2.SetDims(barInfo); SetRectPosition((RectTransform)((Component)val).transform, barInfo.normalizedXMin, barInfo.normalizedXMax, barInfo.sizeDelta); } if (barInfo.imageType != barInfo2.imageType) { barInfo2.imageType = barInfo.imageType; val.type = barInfo.imageType; } if ((Object)(object)barInfo.sprite != (Object)(object)barInfo2.sprite) { barInfo2.sprite = barInfo.sprite; val.sprite = barInfo.sprite; } if ((Object)(object)barInfo.material != (Object)(object)((Graphic)val).material) { barInfo2.material = barInfo.material; ((Graphic)val).material = barInfo.material; } if (barInfo.color != ((Graphic)val).color) { barInfo2.color = barInfo.color; ((Graphic)val).color = barInfo.color; } if ((double)Mathf.Abs(barInfo.normalizedXMin - barInfo2.normalizedXMin) > 0.01) { barInfo2.normalizedXMin = barInfo.normalizedXMin; } if ((double)Mathf.Abs(barInfo.normalizedXMax - barInfo2.normalizedXMax) > 0.01) { barInfo2.normalizedXMax = barInfo.normalizedXMax; } barAllocator.SetData(barInfo2, i); } } public static void SetRectPosition(RectTransform rectTransform, float xMin, float xMax, float sizeDelta) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) rectTransform.anchorMin = new Vector2(xMin, 0f); rectTransform.anchorMax = new Vector2(xMax, 1f); rectTransform.anchoredPosition = Vector2.zero; rectTransform.sizeDelta = new Vector2(sizeDelta * 0.5f + 1f, sizeDelta + 1f); } } public struct BarInfo { public bool enabled; public Color color; public Sprite sprite; public Type imageType; public int index; public float normalizedXMin; public float normalizedXMax; public float sizeDelta; public Material material; public bool DimsEqual(BarInfo rhs) { return normalizedXMin == rhs.normalizedXMin && normalizedXMax == rhs.normalizedXMax && sizeDelta == rhs.sizeDelta; } public void SetDims(BarInfo rhs) { normalizedXMin = rhs.normalizedXMin; normalizedXMax = rhs.normalizedXMax; sizeDelta = rhs.sizeDelta; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Nines.Kamunagi", "KamunagiOfChains", "1.0.0")] [HarmonyPatch] public class KamunagiOfChainsPlugin : BaseUnityPlugin { private class ContentPackProvider : IContentPackProvider { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static CollectContentPackProvidersDelegate <>9__7_0; internal void <Initialize>b__7_0(AddContentPackProviderDelegate provider) { provider.Invoke((IContentPackProvider)(object)new ContentPackProvider()); } } private static Task<ContentPack> _contentPack; private static string _identifier; public string identifier => _identifier; public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { while (!_contentPack.IsCompleted) { yield return null; } if (_contentPack.IsFaulted) { throw _contentPack.Exception; } ContentPack.Copy(_contentPack.Result, args.output); args.ReportProgress(1f); } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); log.LogInfo((object)"Contentpack finished"); yield break; } internal static void Initialize(string identifier, Task<ContentPack> pack) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown _identifier = identifier; _contentPack = pack; object obj = <>c.<>9__7_0; if (obj == null) { CollectContentPackProvidersDelegate val = delegate(AddContentPackProviderDelegate provider) { provider.Invoke((IContentPackProvider)(object)new ContentPackProvider()); }; <>c.<>9__7_0 = val; obj = (object)val; } ContentManager.collectContentPackProviders += (CollectContentPackProvidersDelegate)obj; } } public const string AssetBundleName = "kamunagiassets"; public const string SoundBankName = "KamunagiMusic.bnk"; public static Dictionary<string, AssetBundle> bundles = new Dictionary<string, AssetBundle>(); public static string? pluginPath; public static KamunagiOfChainsPlugin instance = null; public static ManualLogSource log = null; public static bool soundBankQueued; public const string Guid = "com.Nines.Kamunagi"; public const string Name = "KamunagiOfChains"; public const string Version = "1.0.0"; public static BodyIndex vultureIndex; public static BodyIndex pestIndex; public static ModdedDamageType Denebokshiri; public static ModdedDamageType TwinsReaver; public static ModdedDamageType Uitsalnemetia; public static ModdedDamageType CurseFlames; public static ModdedDamageType SobuGekishoha; public void Awake() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_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) instance = this; log = ((BaseUnityPlugin)this).Logger; log.LogDebug((object)"Harmony Patching"); new Harmony(((BaseUnityPlugin)this).Info.Metadata.GUID).PatchAll(); log.LogDebug((object)"Getting Plugin Path"); pluginPath = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location) ?? throw new InvalidOperationException("Failed to find path of plugin."); Language.collectLanguageRootFolders += delegate(List<string> folders) { folders.Add(Path.Combine(pluginPath, "Language")); }; log.LogDebug((object)"Caching BodyIndexes"); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, (Action)delegate { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) vultureIndex = BodyCatalog.FindBodyIndex("VultureBody"); pestIndex = BodyCatalog.FindBodyIndex("FlyingVerminBody"); }); Denebokshiri = DamageAPI.ReserveDamageType(); TwinsReaver = DamageAPI.ReserveDamageType(); Uitsalnemetia = DamageAPI.ReserveDamageType(); CurseFlames = DamageAPI.ReserveDamageType(); SobuGekishoha = DamageAPI.ReserveDamageType(); log.LogDebug((object)"Loading Concentric Bundle"); string path2 = Path.Join((ReadOnlySpan<char>)pluginPath, (ReadOnlySpan<char>)"Assets"); string[] bundlePaths = (from x in Directory.EnumerateFiles(path2) where !x.EndsWith("manifest") select x).ToArray(); string[] array = bundlePaths; foreach (string path in array) { ((AsyncOperation)AssetBundle.LoadFromFileAsync(path)).completed += delegate(AsyncOperation operation) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) string fileName = Path.GetFileName(path); log.LogDebug((object)(fileName + " Bundle Loaded")); bundles[fileName] = ((AssetBundleCreateRequest)operation).assetBundle; if (bundles.Count == bundlePaths.Length) { log.LogDebug((object)"Loading ContentPack"); ContentPackProvider.Initialize(((BaseUnityPlugin)this).Info.Metadata.GUID, Concentric.BuildContentPack(Assembly.GetExecutingAssembly())); } }; } log.LogDebug((object)"Finished Awake"); } public static Task<T> LoadAsset<T>(string assetPath) where T : Object { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) string text; int length; if (assetPath.StartsWith("addressable:")) { text = assetPath; length = "addressable:".Length; return Addressables.LoadAssetAsync<T>((object)text.Substring(length, text.Length - length)).Task; } if (assetPath.StartsWith("legacy:")) { text = assetPath; length = "legacy:".Length; return LegacyResourcesAPI.LoadAsync<T>(text.Substring(length, text.Length - length)).Task; } int num = assetPath.IndexOf(":", StringComparison.Ordinal); if (num <= 0) { return Addressables.LoadAssetAsync<T>((object)assetPath).Task; } TaskCompletionSource<T> source = new TaskCompletionSource<T>(); AssetBundle obj = bundles[assetPath.Substring(0, num)]; text = assetPath; length = num + 1; AssetBundleRequest handle = obj.LoadAssetAsync<T>(text.Substring(length, text.Length - length)); ((AsyncOperation)handle).completed += delegate { source.SetResult((T)(object)handle.asset); }; return source.Task; } [HarmonyPrefix] [HarmonyPatch(typeof(SoundbankLoader), "Start")] public static void AddSoundbankToLoader(SoundbankLoader __instance) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (!soundBankQueued) { log.LogDebug((object)"Soundbank Added To Queue"); AkSoundEngine.AddBasePath(pluginPath); __instance.soundbankStrings = CollectionExtensions.AddItem<string>((IEnumerable<string>)__instance.soundbankStrings, "KamunagiMusic.bnk").ToArray(); soundBankQueued = true; } } } [HarmonyPatch] public class ModelAttachedEffect : MonoBehaviour { private struct RendererInfo { public readonly ShadowCastingMode shadowcastingMode; public readonly bool wasEnabled; public RendererInfo(Renderer renderer) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) wasEnabled = renderer.enabled; shadowcastingMode = renderer.shadowCastingMode; } } private (Renderer renderer, RendererInfo info)[] defaults; [HarmonyPostfix] [HarmonyPatch(typeof(CharacterModel), "UpdateMaterials")] public static void UpdateModelAttachedEffects(CharacterModel __instance) { ModelAttachedEffect[] componentsInChildren = ((Component)__instance).GetComponentsInChildren<ModelAttachedEffect>(); foreach (ModelAttachedEffect modelAttachedEffect in componentsInChildren) { modelAttachedEffect.UpdateRenderers(__instance); } } private void Start() { Renderer[] componentsInChildren = ((Component)this).GetComponentsInChildren<Renderer>(true); IEnumerable<RendererInfo> second = componentsInChildren.Select((Renderer x) => new RendererInfo(x)); defaults = componentsInChildren.Zip(second, (Renderer renderer, RendererInfo info) => (renderer, info)).ToArray(); } public void UpdateRenderers(CharacterModel characterModel) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_004c: Unknown result type (might be due to invalid IL or missing references) bool flag = (int)characterModel.visibility == 0; (Renderer, RendererInfo)[] array = defaults; for (int i = 0; i < array.Length; i++) { var (val, rendererInfo) = array[i]; if (flag) { val.shadowCastingMode = (ShadowCastingMode)0; val.enabled = false; } else { val.shadowCastingMode = rendererInfo.shadowcastingMode; val.enabled = rendererInfo.wasEnabled; } } } } } namespace KamunagiOfChains.Data { [HarmonyPatch] public class BossMusic : Concentric, IMusicTrack { Task<MusicTrackDef> IMusicTrack.BuildObject() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown MusicTrackDef val = ScriptableObject.CreateInstance<MusicTrackDef>(); WwiseStateGroupReference val2 = ScriptableObject.CreateInstance<WwiseStateGroupReference>(); ((WwiseObjectReference)val2).id = 1533728782u; WwiseStateReference val3 = ScriptableObject.CreateInstance<WwiseStateReference>(); ((WwiseObjectReference)val3).id = 1852808225u; ((WwiseGroupValueObjectReference)val3).GroupObjectReference = (WwiseObjectReference)(object)val2; val.states = (State[])(object)new State[1] { new State { WwiseObjectReference = val3 } }; val.cachedName = "kamunagiCustomMusic"; return Task.FromResult<MusicTrackDef>(val); } public override Task Initialize() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown MusicController.pickTrackHook += new PickTrackDelegate(PickTrack); return ((Concentric)this).Initialize(); } private void PickTrack(MusicController musicController, ref MusicTrackDef newTrack) { if (!musicController.enableMusicSystem) { return; } bool flag = Object.op_Implicit((Object)(object)TeleporterInteraction.instance) && !TeleporterInteraction.instance.isIdle; if (!((Object)(object)SceneCatalog.mostRecentSceneDef == (Object)null)) { string baseSceneName = SceneCatalog.mostRecentSceneDef.baseSceneName; if (flag && (baseSceneName == "golemplains" || baseSceneName == "shipgraveyard" || baseSceneName == "rootjungle")) { newTrack = AssetExtensionMethods.GetMusicTrackDef<BossMusic>(this).WaitForCompletion(); } } } [HarmonyPostfix] [HarmonyPatch(typeof(MusicController), "StartIntroMusic")] public static void PlayMusic(MusicController __instance) { AkSoundEngine.PostEvent("Play_KamunagiBossMusic", ((Component)__instance).gameObject); } [HarmonyPrefix] [HarmonyPatch(typeof(StateSetter), "FlushIfChanged")] public static void StateSwap(StateSetter __instance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) if (__instance.id == 549431000 && !__instance.expectedEngineValueId.Equals(__instance.valueId)) { MusicTrackDef val = Concentric.GetObjectOrNull<BossMusic, IMusicTrack, MusicTrackDef>().WaitForCompletion(); if ((Object)(object)val != (Object)null) { AkSoundEngine.SetState(((BaseGroupType)val.states[0]).GroupId, 0u); } } } } } namespace KamunagiOfChains.Data.Bodies { public class LobbySound : MonoBehaviour { private void OnEnable() { AkSoundEngine.PostEvent(2023966543u, ((Component)this).gameObject); } private void OnDisable() { AkSoundEngine.StopPlayingID(2023966543u); } } } namespace KamunagiOfChains.Data.Bodies.Kamunagi { public class KamunagiAsset : Concentric, IBody, IGameObject, IBodyDisplay, ISurvivor, IModel, IEntityStates, ISkin, IMaster, IEffect { public const string tokenPrefix = "NINES_KAMUNAGI_BODY_"; IEnumerable<Type> IEntityStates.GetEntityStates() { return new Type[2] { typeof(VoidDeathState), typeof(KamunagiCharacterMainState) }; } async Task<SkinDef> ISkin.BuildObject() { Sprite icon = await KamunagiOfChainsPlugin.LoadAsset<Sprite>("kamunagiassets:TwinsSkin"); GameObject model = await KamunagiOfChainsPlugin.LoadAsset<GameObject>("kamunagiassets:mdlKamunagi"); return (SkinDef)ScriptableObject.CreateInstance(typeof(SkinDef), (Action<ScriptableObject>)delegate(ScriptableObject obj) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown SkinDef val = (SkinDef)obj; ISkin.AddDefaults(ref val); ((Object)val).name = "KamunagiDefaultSkinDef"; val.nameToken = "NINES_KAMUNAGI_BODY_DEFAULT_SKIN_NAME"; val.icon = icon; val.rootObject = model; RendererInfo[] baseRendererInfos = model.GetComponent<CharacterModel>().baseRendererInfos; RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[baseRendererInfos.Length]; baseRendererInfos.CopyTo(array, 0); val.rendererInfos = array; }); } async Task<GameObject> IMaster.BuildObject() { GameObject master = PrefabAPI.InstantiateClone(await KamunagiOfChainsPlugin.LoadAsset<GameObject>("RoR2/Base/Merc/MercMonsterMaster.prefab"), "NinesKamunagiBodyMonsterMaster", true); CharacterMaster component = master.GetComponent<CharacterMaster>(); component.bodyPrefab = await AssetExtensionMethods.GetBody<KamunagiAsset>(this); return master; } IEnumerable<Concentric> IModel.GetSkins() { return (IEnumerable<Concentric>)(object)new Concentric[1] { this }; } async Task<GameObject> IModel.BuildObject() { GameObject model = await KamunagiOfChainsPlugin.LoadAsset<GameObject>("kamunagiassets:mdlKamunagi"); CharacterModel characterModel = model.GetOrAddComponent<CharacterModel>(); ChildLocator childLocator = model.GetComponent<ChildLocator>(); Material voidCrystalMat = await KamunagiOfChainsPlugin.LoadAsset<Material>("addressable:RoR2/DLC1/voidstage/matVoidCrystal.mat"); characterModel.baseRendererInfos = (RendererInfo[])(object)new RendererInfo[14] { new RendererInfo { renderer = ((Component)childLocator.FindChild("S Cloth01")).GetComponent<Renderer>(), defaultMaterial = voidCrystalMat, ignoreOverlays = false, defaultShadowCastingMode = (ShadowCastingMode)1 }, new RendererInfo { renderer = ((Component)childLocator.FindChild("U Cloth01")).GetComponent<Renderer>(), defaultMaterial = voidCrystalMat, ignoreOverlays = false, defaultShadowCastingMode = (ShadowCastingMode)1 }, RenderInfoFromChild((Component)(object)childLocator.FindChild("S Body")), RenderInfoFromChild((Component)(object)childLocator.FindChild("U Body")), RenderInfoFromChild((Component)(object)childLocator.FindChild("S Cloth02"), dontHopoo: true), RenderInfoFromChild((Component)(object)childLocator.FindChild("U Cloth02"), dontHopoo: true), RenderInfoFromChild((Component)(object)childLocator.FindChild("S Hair")), RenderInfoFromChild((Component)(object)childLocator.FindChild("U Hair")), RenderInfoFromChild((Component)(object)childLocator.FindChild("S Jewelry")), RenderInfoFromChild((Component)(object)childLocator.FindChild("U Jewelry")), RenderInfoFromChild((Component)(object)childLocator.FindChild("S HandItems")), RenderInfoFromChild((Component)(object)childLocator.FindChild("U HandItems")), RenderInfoFromChild((Component)(object)childLocator.FindChild("S Shoe")), RenderInfoFromChild((Component)(object)childLocator.FindChild("U Shoe")) }; HurtBoxGroup modelHurtBoxGroup = model.GetOrAddComponent<HurtBoxGroup>(); GameObject mainHurtBox = ((Component)childLocator.FindChild("MainHurtbox")).gameObject; mainHurtBox.layer = LayerIndex.entityPrecise.intVal; HurtBox mainHurtBoxComponent = mainHurtBox.GetOrAddComponent<HurtBox>(); mainHurtBoxComponent.isBullseye = true; modelHurtBoxGroup.hurtBoxes = (HurtBox[])(object)new HurtBox[1] { mainHurtBoxComponent }; modelHurtBoxGroup.mainHurtBox = mainHurtBoxComponent; ItemDisplayRuleSet idrs = ScriptableObject.CreateInstance<ItemDisplayRuleSet>(); ItemDisplayRuleSet val = idrs; val.keyAssetRuleGroups = ArrayUtils.Clone<KeyAssetRuleGroup>(((Component)(await KamunagiOfChainsPlugin.LoadAsset<GameObject>("RoR2/Base/Commando/CommandoBody.prefab")).GetComponent<ModelLocator>().modelTransform).GetComponent<CharacterModel>().itemDisplayRuleSet.keyAssetRuleGroups); ItemDef keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/Behemoth/Behemoth.asset"); DisplayRuleGroup behemoth = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] behemothRules = (ItemDisplayRule[])(object)new ItemDisplayRule[behemoth.rules.Length]; Array.Copy(behemoth.rules, behemothRules, behemoth.rules.Length); behemoth.rules = behemothRules; behemoth.rules[0].childName = "U_Chest"; behemoth.rules[0].localPos = new Vector3(-0.026f, 0.176f, -0.202f); behemoth.rules[0].localAngles = new Vector3(344.46f, 153.99f, 330.8f); behemoth.rules[0].localScale = new Vector3(0.07f, 0.07f, 0.07f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = behemothRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/Dagger/Dagger.asset"); DisplayRuleGroup dagger = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] daggerRules = (ItemDisplayRule[])(object)new ItemDisplayRule[dagger.rules.Length]; Array.Copy(dagger.rules, daggerRules, dagger.rules.Length); dagger.rules = daggerRules; dagger.rules[0].childName = "S_Head"; dagger.rules[0].localPos = new Vector3(0.072f, 0.182f, -0.1f); dagger.rules[0].localAngles = new Vector3(278f, 201.02f, 38.57f); dagger.rules[0].localScale = new Vector3(0.8f, 0.8f, 0.8f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = daggerRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/Icicle/Icicle.asset"); DisplayRuleGroup frostR = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] frostRRules = (ItemDisplayRule[])(object)new ItemDisplayRule[frostR.rules.Length]; Array.Copy(frostR.rules, frostRRules, frostR.rules.Length); frostR.rules = frostRRules; frostR.rules[0].childName = "MuzzleCenter"; frostR.rules[0].localPos = new Vector3(-0.083f, -0.215f, -0.201f); frostR.rules[0].localAngles = new Vector3(0f, 0f, 0f); frostR.rules[0].localScale = new Vector3(1.3f, 1.3f, 1.3f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = frostRRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/GhostOnKill/GhostOnKill.asset"); DisplayRuleGroup HMask = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] HMaskRules = (ItemDisplayRule[])(object)new ItemDisplayRule[HMask.rules.Length]; Array.Copy(HMask.rules, HMaskRules, HMask.rules.Length); HMask.rules = HMaskRules; HMask.rules[0].childName = "U_Head"; HMask.rules[0].localPos = new Vector3(-0.082f, 0.149f, 0.141f); HMask.rules[0].localAngles = new Vector3(10.97f, 303.42f, 353.94f); HMask.rules[0].localScale = new Vector3(0.8f, 0.9f, 0.8f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = HMaskRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/FallBoots/FallBoots.asset"); DisplayRuleGroup fallBoots = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] fallBootsRules = (ItemDisplayRule[])(object)new ItemDisplayRule[fallBoots.rules.Length]; Array.Copy(fallBoots.rules, fallBootsRules, fallBoots.rules.Length); fallBoots.rules = fallBootsRules; fallBoots.rules[0].childName = "S_Ankle"; fallBoots.rules[0].localPos = new Vector3(-0.003f, -0.019f, 0.024f); fallBoots.rules[0].localAngles = new Vector3(303.33f, 359.95f, 359.52f); fallBoots.rules[0].localScale = new Vector3(0.4f, 0.4f, 0.4f); fallBoots.rules[1].childName = "U_Ankle"; fallBoots.rules[1].localPos = new Vector3(0.015f, -0.019f, 0.023f); fallBoots.rules[1].localAngles = new Vector3(302.29f, 0.03f, 0.74f); fallBoots.rules[1].localScale = new Vector3(0.4f, 0.4f, 0.4f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = fallBootsRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/NovaOnHeal/NovaOnHeal.asset"); DisplayRuleGroup healHorns = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] healHornsRules = (ItemDisplayRule[])(object)new ItemDisplayRule[healHorns.rules.Length]; Array.Copy(healHorns.rules, healHornsRules, healHorns.rules.Length); healHorns.rules = healHornsRules; healHorns.rules[0].childName = "S_Wrist"; healHorns.rules[0].localPos = new Vector3(0.008f, 0.001f, -0.013f); healHorns.rules[0].localAngles = new Vector3(276.71f, 29.95f, 117.67f); healHorns.rules[0].localScale = new Vector3(0.5f, 0.5f, 0.5f); healHorns.rules[1].childName = "U_Wrist"; healHorns.rules[1].localPos = new Vector3(0.013f, 0.014f, -0.011f); healHorns.rules[1].localAngles = new Vector3(323.72f, 116.43f, 23.79f); healHorns.rules[1].localScale = new Vector3(0.5f, 0.5f, 0.5f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = healHornsRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/ShockNearby/ShockNearby.asset"); DisplayRuleGroup tesla = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] teslaRules = (ItemDisplayRule[])(object)new ItemDisplayRule[tesla.rules.Length]; Array.Copy(tesla.rules, teslaRules, tesla.rules.Length); tesla.rules = teslaRules; tesla.rules[0].childName = "U_Earring"; tesla.rules[0].localPos = new Vector3(-0.002f, 0.071f, 0.004f); tesla.rules[0].localAngles = new Vector3(84.23f, 201.46f, 89.88f); tesla.rules[0].localScale = new Vector3(0.13f, 0.06f, 0.13f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = teslaRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/Clover/Clover.asset"); DisplayRuleGroup clover = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] cloverRules = (ItemDisplayRule[])(object)new ItemDisplayRule[clover.rules.Length]; Array.Copy(clover.rules, cloverRules, clover.rules.Length); clover.rules = cloverRules; clover.rules[0].childName = "S_Head"; clover.rules[0].localPos = new Vector3(-0.13f, 0.371f, 0.069f); clover.rules[0].localAngles = new Vector3(47.48f, 312.88f, 10.66f); clover.rules[0].localScale = new Vector3(0.3f, 0.3f, 0.3f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = cloverRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/BounceNearby/BounceNearby.asset"); DisplayRuleGroup meatHook = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] meatHookRules = (ItemDisplayRule[])(object)new ItemDisplayRule[meatHook.rules.Length]; Array.Copy(meatHook.rules, meatHookRules, meatHook.rules.Length); meatHook.rules = meatHookRules; meatHook.rules[0].childName = "U Bone"; meatHook.rules[0].localPos = new Vector3(-0.006f, 0.473f, -0.057f); meatHook.rules[0].localAngles = new Vector3(356.37f, 1.36f, 42.8f); meatHook.rules[0].localScale = new Vector3(0.7f, 0.6f, 0.6f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = meatHookRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/AlienHead/AlienHead.asset"); DisplayRuleGroup alien = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] alienRules = (ItemDisplayRule[])(object)new ItemDisplayRule[alien.rules.Length]; Array.Copy(alien.rules, alienRules, alien.rules.Length); alien.rules = alienRules; alien.rules[0].childName = "S_Sash"; alien.rules[0].localPos = new Vector3(-0.016f, 0.003f, 0.008f); alien.rules[0].localAngles = new Vector3(77.09f, 259.49f, 158.23f); alien.rules[0].localScale = new Vector3(0.8f, 0.8f, 0.8f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = alienRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/Talisman/Talisman.asset"); DisplayRuleGroup soulbound = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] soulboundRules = (ItemDisplayRule[])(object)new ItemDisplayRule[soulbound.rules.Length]; Array.Copy(soulbound.rules, soulboundRules, soulbound.rules.Length); soulbound.rules = soulboundRules; soulbound.rules[0].childName = "MuzzleCenter"; soulbound.rules[0].localPos = new Vector3(1.948f, 0.776f, -0.181f); soulbound.rules[0].localAngles = new Vector3(0f, 0f, 0f); soulbound.rules[0].localScale = new Vector3(0.5f, 0.5f, 0.5f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = soulboundRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/UtilitySkillMagazine/UtilitySkillMagazine.asset"); DisplayRuleGroup hardlight = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] hardlightRules = (ItemDisplayRule[])(object)new ItemDisplayRule[hardlight.rules.Length]; Array.Copy(hardlight.rules, hardlightRules, hardlight.rules.Length); hardlight.rules = hardlightRules; hardlight.rules[0].childName = "U_Ankle"; hardlight.rules[0].localPos = new Vector3(0.007f, 0.078f, -0.055f); hardlight.rules[0].localAngles = new Vector3(58.56f, 180f, 180f); hardlight.rules[0].localScale = new Vector3(0.5f, 0.5f, 0.5f); hardlight.rules[1].childName = "S_Ankle"; hardlight.rules[1].localPos = new Vector3(-0.007f, 0.078f, -0.054f); hardlight.rules[1].localAngles = new Vector3(57.34f, 180f, 180f); hardlight.rules[1].localScale = new Vector3(0.5f, 0.5f, 0.5f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = hardlightRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/HeadHunter/HeadHunter.asset"); DisplayRuleGroup vultures = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] vulturesRules = (ItemDisplayRule[])(object)new ItemDisplayRule[vultures.rules.Length]; Array.Copy(vultures.rules, vulturesRules, vultures.rules.Length); vultures.rules = vulturesRules; vultures.rules[0].childName = "U_Head"; vultures.rules[0].localPos = new Vector3(0.008f, 0.287f, 0.002f); vultures.rules[0].localAngles = new Vector3(350.78f, 354.05f, 0.53f); vultures.rules[0].localScale = new Vector3(0.65f, 0.28f, 0.25f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = vulturesRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/KillEliteFrenzy/KillEliteFrenzy.asset"); DisplayRuleGroup brainstalks = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] brainstalksRules = (ItemDisplayRule[])(object)new ItemDisplayRule[brainstalks.rules.Length]; Array.Copy(brainstalks.rules, brainstalksRules, brainstalks.rules.Length); brainstalks.rules = brainstalksRules; brainstalks.rules[0].childName = "S_Head"; brainstalks.rules[0].localPos = new Vector3(0.016f, 0.334f, 0.015f); brainstalks.rules[0].localAngles = new Vector3(0f, 0f, 0f); brainstalks.rules[0].localScale = new Vector3(0.3f, 0.2f, 0.3f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = brainstalksRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/IncreaseHealing/IncreaseHealing.asset"); DisplayRuleGroup rejuvRack = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] rejuvRackRules = (ItemDisplayRule[])(object)new ItemDisplayRule[rejuvRack.rules.Length]; Array.Copy(rejuvRack.rules, rejuvRackRules, rejuvRack.rules.Length); rejuvRack.rules = rejuvRackRules; rejuvRack.rules[0].childName = "U_Head"; rejuvRack.rules[0].localPos = new Vector3(-0.1f, 0.207f, -0.01f); rejuvRack.rules[0].localAngles = new Vector3(0f, 270f, 0f); rejuvRack.rules[0].localScale = new Vector3(0.5f, 0.5f, 0.5f); rejuvRack.rules[1].childName = "S_Head"; rejuvRack.rules[1].localPos = new Vector3(0.101f, 0.229f, 0f); rejuvRack.rules[1].localAngles = new Vector3(0f, 90f, 0f); rejuvRack.rules[1].localScale = new Vector3(0.5f, 0.5f, 0.5f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = rejuvRackRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/ArmorReductionOnHit/ArmorReductionOnHit.asset"); DisplayRuleGroup justice = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] justiceRules = (ItemDisplayRule[])(object)new ItemDisplayRule[justice.rules.Length]; Array.Copy(justice.rules, justiceRules, justice.rules.Length); justice.rules = justiceRules; justice.rules[0].childName = "S_Chest"; justice.rules[0].localPos = new Vector3(-0.098f, 0.15f, -0.235f); justice.rules[0].localAngles = new Vector3(303.12f, 308.61f, 43.52f); justice.rules[0].localScale = new Vector3(0.2f, 0.2f, 0.2f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = justiceRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/LaserTurbine/LaserTurbine.asset"); DisplayRuleGroup laserDisc = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] laserDiscRules = (ItemDisplayRule[])(object)new ItemDisplayRule[laserDisc.rules.Length]; Array.Copy(laserDisc.rules, laserDiscRules, laserDisc.rules.Length); laserDisc.rules = laserDiscRules; laserDisc.rules[0].childName = "MuzzleCenter"; laserDisc.rules[0].localPos = new Vector3(-1.988f, 0.218f, -0.914f); laserDisc.rules[0].localAngles = new Vector3(270f, 180f, 0f); laserDisc.rules[0].localScale = new Vector3(0.5f, 0.5f, 0.5f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = laserDiscRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/Plant/Plant.asset"); DisplayRuleGroup deskPlant = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] deskPlantRules = (ItemDisplayRule[])(object)new ItemDisplayRule[deskPlant.rules.Length]; Array.Copy(deskPlant.rules, deskPlantRules, deskPlant.rules.Length); deskPlant.rules = deskPlantRules; deskPlant.rules[0].childName = "S_Earring"; deskPlant.rules[0].localPos = new Vector3(0.008f, 0.086f, -0.003f); deskPlant.rules[0].localAngles = new Vector3(86.52f, 220.08f, 96.7f); deskPlant.rules[0].localScale = new Vector3(0.03f, 0.03f, 0.03f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = deskPlantRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/PermanentDebuffOnHit/PermanentDebuffOnHit.asset"); DisplayRuleGroup scorpion = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] scorpionRules = (ItemDisplayRule[])(object)new ItemDisplayRule[scorpion.rules.Length]; Array.Copy(scorpion.rules, scorpionRules, scorpion.rules.Length); scorpion.rules = scorpionRules; scorpion.rules[0].childName = "S_Head"; scorpion.rules[0].localPos = new Vector3(0.004f, 0.395f, 0.08f); scorpion.rules[0].localAngles = new Vector3(62.02f, 176.75f, 353f); scorpion.rules[0].localScale = new Vector3(0.8f, 0.8f, 0.8f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = scorpionRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/ImmuneToDebuff/ImmuneToDebuff.asset"); DisplayRuleGroup raincoat = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] raincoatRules = (ItemDisplayRule[])(object)new ItemDisplayRule[raincoat.rules.Length]; Array.Copy(raincoat.rules, raincoatRules, raincoat.rules.Length); raincoat.rules = raincoatRules; raincoat.rules[0].childName = "U_Sash"; raincoat.rules[0].localPos = new Vector3(0.018f, 0.256f, -0.032f); raincoat.rules[0].localAngles = new Vector3(14.63f, 111.91f, 183.53f); raincoat.rules[0].localScale = new Vector3(0.5f, 0.5f, 0.5f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = raincoatRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/RandomEquipmentTrigger/RandomEquipmentTrigger.asset"); DisplayRuleGroup bottleChaos = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] bottleChaosRules = (ItemDisplayRule[])(object)new ItemDisplayRule[bottleChaos.rules.Length]; Array.Copy(bottleChaos.rules, bottleChaosRules, bottleChaos.rules.Length); bottleChaos.rules = bottleChaosRules; bottleChaos.rules[0].childName = "S_Waist"; bottleChaos.rules[0].localPos = new Vector3(0.373f, -0.019f, -0.006f); bottleChaos.rules[0].localAngles = new Vector3(350.01f, 86.66f, 355.27f); bottleChaos.rules[0].localScale = new Vector3(0.3f, 0.4f, 0.3f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = bottleChaosRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/Knurl/Knurl.asset"); DisplayRuleGroup knurl = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] knurlRules = (ItemDisplayRule[])(object)new ItemDisplayRule[knurl.rules.Length]; Array.Copy(knurl.rules, knurlRules, knurl.rules.Length); knurl.rules = knurlRules; knurl.rules[0].childName = "S_Chest"; knurl.rules[0].localPos = new Vector3(0.011f, 0.283f, 0.148f); knurl.rules[0].localAngles = new Vector3(304.76f, 189.53f, 353.8f); knurl.rules[0].localScale = new Vector3(0.02f, 0.02f, 0.03f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = knurlRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/TitanGoldDuringTP/TitanGoldDuringTP.asset"); DisplayRuleGroup goldSeed = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] goldSeedRules = (ItemDisplayRule[])(object)new ItemDisplayRule[goldSeed.rules.Length]; Array.Copy(goldSeed.rules, goldSeedRules, goldSeed.rules.Length); goldSeed.rules = goldSeedRules; goldSeed.rules[0].childName = "U_Chest"; goldSeed.rules[0].localPos = new Vector3(0.002f, 0.196f, 0.195f); goldSeed.rules[0].localAngles = new Vector3(22.31f, 0.03f, 0.03f); goldSeed.rules[0].localScale = new Vector3(0.1f, 0.1f, 0.1f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = goldSeedRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/SprintWisp/SprintWisp.asset"); DisplayRuleGroup sprintWisp = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] sprintWispRules = (ItemDisplayRule[])(object)new ItemDisplayRule[sprintWisp.rules.Length]; Array.Copy(sprintWisp.rules, sprintWispRules, sprintWisp.rules.Length); sprintWisp.rules = sprintWispRules; sprintWisp.rules[0].childName = "S_Head"; sprintWisp.rules[0].localPos = new Vector3(0.014f, 0.104f, 0.23f); sprintWisp.rules[0].localAngles = new Vector3(7.23f, 3.25f, 357.1f); sprintWisp.rules[0].localScale = new Vector3(0.3f, 0.3f, 0.3f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = sprintWispRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/Pearl/Pearl.asset"); DisplayRuleGroup pearl = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] pearlRules = (ItemDisplayRule[])(object)new ItemDisplayRule[pearl.rules.Length]; Array.Copy(pearl.rules, pearlRules, pearl.rules.Length); pearl.rules = pearlRules; pearl.rules[0].childName = "MuzzleCenter"; pearl.rules[0].localPos = new Vector3(-0.127f, 0.122f, -0.979f); pearl.rules[0].localAngles = new Vector3(90f, 0f, 0f); pearl.rules[0].localScale = new Vector3(0.3f, 0.3f, 0.3f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = pearlRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/ShinyPearl/ShinyPearl.asset"); DisplayRuleGroup perfectPearl = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] perfectPearlRules = (ItemDisplayRule[])(object)new ItemDisplayRule[perfectPearl.rules.Length]; Array.Copy(perfectPearl.rules, perfectPearlRules, perfectPearl.rules.Length); perfectPearl.rules = perfectPearlRules; perfectPearl.rules[0].childName = "MuzzleCenter"; perfectPearl.rules[0].localPos = new Vector3(-0.101f, -0.376f, -0.884f); perfectPearl.rules[0].localAngles = new Vector3(0f, 86.65f, 0f); perfectPearl.rules[0].localScale = new Vector3(0.4f, 0.4f, 0.4f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = perfectPearlRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/NovaOnLowHealth/NovaOnLowHealth.asset"); DisplayRuleGroup genesisLoop = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] loopRules = (ItemDisplayRule[])(object)new ItemDisplayRule[genesisLoop.rules.Length]; Array.Copy(genesisLoop.rules, loopRules, genesisLoop.rules.Length); genesisLoop.rules = loopRules; genesisLoop.rules[0].childName = "S_Wrist"; genesisLoop.rules[0].localPos = new Vector3(0.073f, -0.028f, 0.013f); genesisLoop.rules[0].localAngles = new Vector3(341.74f, 252.79f, 346.09f); genesisLoop.rules[0].localScale = new Vector3(0.09f, 0.05f, 0.09f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = loopRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/FireballsOnHit/FireballsOnHit.asset"); DisplayRuleGroup firePerf = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] firePerfRules = (ItemDisplayRule[])(object)new ItemDisplayRule[firePerf.rules.Length]; Array.Copy(firePerf.rules, firePerfRules, firePerf.rules.Length); firePerf.rules = firePerfRules; firePerf.rules[0].childName = "U_Wrist"; firePerf.rules[0].localPos = new Vector3(0.019f, 0.112f, -0.051f); firePerf.rules[0].localAngles = new Vector3(282.81f, 103.62f, 165.26f); firePerf.rules[0].localScale = new Vector3(0.02f, 0.02f, 0.02f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = firePerfRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/SiphonOnLowHealth/SiphonOnLowHealth.asset"); DisplayRuleGroup miredUrn = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] miredUrnRules = (ItemDisplayRule[])(object)new ItemDisplayRule[miredUrn.rules.Length]; Array.Copy(miredUrn.rules, miredUrnRules, miredUrn.rules.Length); miredUrn.rules = miredUrnRules; miredUrn.rules[0].childName = "U_Waist"; miredUrn.rules[0].localPos = new Vector3(0.454f, 0.004f, 0.037f); miredUrn.rules[0].localAngles = new Vector3(350.72f, 86.19f, 359.55f); miredUrn.rules[0].localScale = new Vector3(0.1f, 0.12f, 0.1f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = miredUrnRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/ParentEgg/ParentEgg.asset"); DisplayRuleGroup planula = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] planulaRules = (ItemDisplayRule[])(object)new ItemDisplayRule[planula.rules.Length]; Array.Copy(planula.rules, planulaRules, planula.rules.Length); planula.rules = planulaRules; planula.rules[0].childName = "U_Sash"; planula.rules[0].localPos = new Vector3(-0.059f, 0.09f, 0.016f); planula.rules[0].localAngles = new Vector3(359.48f, 292.14f, 183.36f); planula.rules[0].localScale = new Vector3(0.07f, 0.07f, 0.07f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = planulaRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/MinorConstructOnKill/MinorConstructOnKill.asset"); DisplayRuleGroup XiBossItem = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] XiBossItemRules = (ItemDisplayRule[])(object)new ItemDisplayRule[XiBossItem.rules.Length]; Array.Copy(XiBossItem.rules, XiBossItemRules, XiBossItem.rules.Length); XiBossItem.rules = XiBossItemRules; XiBossItem.rules[0].childName = "MuzzleCenter"; XiBossItem.rules[0].localPos = new Vector3(1.82f, 0.488f, -1.47f); XiBossItem.rules[0].localAngles = new Vector3(0f, 0f, 0f); XiBossItem.rules[0].localScale = new Vector3(0.5f, 0.5f, 0.5f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = XiBossItemRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/CloverVoid/CloverVoid.asset"); DisplayRuleGroup benthicBloom = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] benthicBloomRules = (ItemDisplayRule[])(object)new ItemDisplayRule[benthicBloom.rules.Length]; Array.Copy(benthicBloom.rules, benthicBloomRules, benthicBloom.rules.Length); benthicBloom.rules = benthicBloomRules; benthicBloom.rules[0].childName = "S_Head"; benthicBloom.rules[0].localPos = new Vector3(-0.127f, 0.368f, 0.067f); benthicBloom.rules[0].localAngles = new Vector3(47.48f, 312.88f, 10f); benthicBloom.rules[0].localScale = new Vector3(0.5f, 0.5f, 0.5f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = benthicBloomRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/TreasureCacheVoid/TreasureCacheVoid.asset"); DisplayRuleGroup keyVoid = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] keyVoidRules = (ItemDisplayRule[])(object)new ItemDisplayRule[keyVoid.rules.Length]; Array.Copy(keyVoid.rules, keyVoidRules, keyVoid.rules.Length); keyVoid.rules = keyVoidRules; keyVoid.rules[0].childName = "U_Sash"; keyVoid.rules[0].localPos = new Vector3(-0.031f, 0.203f, -0.047f); keyVoid.rules[0].localAngles = new Vector3(70.1f, 290.95f, 179.09f); keyVoid.rules[0].localScale = new Vector3(0.8f, 0.8f, 0.8f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = keyVoidRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/CritGlassesVoid/CritGlassesVoid.asset"); DisplayRuleGroup seerLens = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] seerLensRules = (ItemDisplayRule[])(object)new ItemDisplayRule[seerLens.rules.Length]; Array.Copy(seerLens.rules, seerLensRules, seerLens.rules.Length); seerLens.rules = seerLensRules; seerLens.rules[0].childName = "U_Head"; seerLens.rules[0].localPos = new Vector3(0.006f, 0.111f, 0.185f); seerLens.rules[0].localAngles = new Vector3(13.9f, 0f, 0f); seerLens.rules[0].localScale = new Vector3(0.4f, 0.35f, 0.4f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = seerLensRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/EquipmentMagazineVoid/EquipmentMagazineVoid.asset"); DisplayRuleGroup lysateCell = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] lysateCellRules = (ItemDisplayRule[])(object)new ItemDisplayRule[lysateCell.rules.Length]; Array.Copy(lysateCell.rules, lysateCellRules, lysateCell.rules.Length); lysateCell.rules = lysateCellRules; lysateCell.rules[0].childName = "S_Sash"; lysateCell.rules[0].localPos = new Vector3(0.036f, -0.263f, -0.05f); lysateCell.rules[0].localAngles = new Vector3(353.65f, 202.47f, 163.09f); lysateCell.rules[0].localScale = new Vector3(0.2f, 0.12f, 0.2f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = lysateCellRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/BleedOnHitVoid/BleedOnHitVoid.asset"); DisplayRuleGroup needletick = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] needletickRules = (ItemDisplayRule[])(object)new ItemDisplayRule[needletick.rules.Length]; Array.Copy(needletick.rules, needletickRules, needletick.rules.Length); needletick.rules = needletickRules; needletick.rules[0].childName = "U_Head"; needletick.rules[0].localPos = new Vector3(-0.002f, 0.451f, -0.02f); needletick.rules[0].localAngles = new Vector3(297.4f, 180f, 180f); needletick.rules[0].localScale = new Vector3(0.3f, 0.3f, 0.3f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = needletickRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/VoidMegaCrabItem.asset"); DisplayRuleGroup zoea = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] zoeaRules = (ItemDisplayRule[])(object)new ItemDisplayRule[zoea.rules.Length]; Array.Copy(zoea.rules, zoeaRules, zoea.rules.Length); zoea.rules = zoeaRules; zoea.rules[0].childName = "U_Head"; zoea.rules[0].localPos = new Vector3(0.13f, 0.428f, 0.021f); zoea.rules[0].localAngles = new Vector3(62.68f, 274.17f, 273.71f); zoea.rules[0].localScale = new Vector3(0.1f, 0.1f, 0.1f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = zoeaRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/MissileVoid/MissileVoid.asset"); DisplayRuleGroup plimp = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] plimpRules = (ItemDisplayRule[])(object)new ItemDisplayRule[plimp.rules.Length]; Array.Copy(plimp.rules, plimpRules, plimp.rules.Length); plimp.rules = plimpRules; plimp.rules[0].childName = "S_Head"; plimp.rules[0].localPos = new Vector3(0.154f, -0.135f, -0.039f); plimp.rules[0].localAngles = new Vector3(18.95f, 5.67f, 267.98f); plimp.rules[0].localScale = new Vector3(0.08f, 0.08f, 0.08f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = plimpRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/ChainLightningVoid/ChainLightningVoid.asset"); DisplayRuleGroup lightningVoid = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] lightningVoidRules = (ItemDisplayRule[])(object)new ItemDisplayRule[lightningVoid.rules.Length]; Array.Copy(lightningVoid.rules, lightningVoidRules, lightningVoid.rules.Length); lightningVoid.rules = lightningVoidRules; lightningVoid.rules[0].childName = "S_Waist"; lightningVoid.rules[0].localPos = new Vector3(-0.212f, 0.27f, 0.139f); lightningVoid.rules[0].localAngles = new Vector3(342.02f, 316.62f, 325.25f); lightningVoid.rules[0].localScale = new Vector3(0.3f, 0.3f, 0.3f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = lightningVoidRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/ElementalRingVoid/ElementalRingVoid.asset"); DisplayRuleGroup ringVoid = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] ringVoidRules = (ItemDisplayRule[])(object)new ItemDisplayRule[ringVoid.rules.Length]; Array.Copy(ringVoid.rules, ringVoidRules, ringVoid.rules.Length); ringVoid.rules = ringVoidRules; ringVoid.rules[0].childName = "S_RingF"; ringVoid.rules[0].localPos = new Vector3(-0.001f, 0.007f, 0.008f); ringVoid.rules[0].localAngles = new Vector3(84.96f, 128.64f, 124.49f); ringVoid.rules[0].localScale = new Vector3(0.2f, 0.2f, 0.2f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = ringVoidRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/SlowOnHitVoid/SlowOnHitVoid.asset"); DisplayRuleGroup tenta = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] tentaRules = (ItemDisplayRule[])(object)new ItemDisplayRule[tenta.rules.Length]; Array.Copy(tenta.rules, tentaRules, tenta.rules.Length); tenta.rules = tentaRules; tenta.rules[0].childName = "S_Wrist2"; tenta.rules[0].localPos = new Vector3(0.131f, 0.051f, 0.095f); tenta.rules[0].localAngles = new Vector3(282.84f, 42.74f, 318.45f); tenta.rules[0].localScale = new Vector3(0.2f, 0.2f, 0.2f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = tentaRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/ExplodeOnDeathVoid/ExplodeOnDeathVoid.asset"); DisplayRuleGroup voidsent = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] voidsentRules = (ItemDisplayRule[])(object)new ItemDisplayRule[voidsent.rules.Length]; Array.Copy(voidsent.rules, voidsentRules, voidsent.rules.Length); voidsent.rules = voidsentRules; voidsent.rules[0].childName = "S_Waist"; voidsent.rules[0].localPos = new Vector3(-0.338f, 0.12f, 0.096f); voidsent.rules[0].localAngles = new Vector3(20.87f, 153.34f, 4.25f); voidsent.rules[0].localScale = new Vector3(0.08f, 0.08f, 0.08f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = voidsentRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC1/MushroomVoid/MushroomVoid.asset"); DisplayRuleGroup sprintHeal = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] sprintHealRules = (ItemDisplayRule[])(object)new ItemDisplayRule[sprintHeal.rules.Length]; Array.Copy(sprintHeal.rules, sprintHealRules, sprintHeal.rules.Length); sprintHeal.rules = sprintHealRules; sprintHeal.rules[0].childName = "S_Head"; sprintHeal.rules[0].localPos = new Vector3(0.003f, 0.397f, -0.06f); sprintHeal.rules[0].localAngles = new Vector3(14.59f, 140.66f, 355.08f); sprintHeal.rules[0].localScale = new Vector3(0.07f, 0.07f, 0.07f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = sprintHealRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC2/Items/BoostAllStats/BoostAllStats.asset"); DisplayRuleGroup stats = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] statsRules = (ItemDisplayRule[])(object)new ItemDisplayRule[stats.rules.Length]; Array.Copy(stats.rules, statsRules, stats.rules.Length); stats.rules = statsRules; stats.rules[0].childName = "S_Head"; stats.rules[0].localPos = new Vector3(0.006f, 0.256f, 0.164f); stats.rules[0].localAngles = new Vector3(37.43f, 171.25f, 352.64f); stats.rules[0].localScale = new Vector3(0.6f, 0.6f, 0.6f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = statsRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC2/Items/DelayedDamage/DelayedDamage.asset"); DisplayRuleGroup deathsDance = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] deathsDanceRules = (ItemDisplayRule[])(object)new ItemDisplayRule[deathsDance.rules.Length]; Array.Copy(deathsDance.rules, deathsDanceRules, deathsDance.rules.Length); deathsDance.rules = deathsDanceRules; deathsDance.rules[0].childName = "U_Chest"; deathsDance.rules[0].localPos = new Vector3(0.004f, 0.218f, 0.192f); deathsDance.rules[0].localAngles = new Vector3(331.93f, 0f, 0f); deathsDance.rules[0].localScale = new Vector3(0.2f, 0.2f, 0.2f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = deathsDanceRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC2/Items/ExtraShrineItem/ExtraShrineItem.asset"); DisplayRuleGroup chanceDoll = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] chanceDollRules = (ItemDisplayRule[])(object)new ItemDisplayRule[chanceDoll.rules.Length]; Array.Copy(chanceDoll.rules, chanceDollRules, chanceDoll.rules.Length); chanceDoll.rules = chanceDollRules; chanceDoll.rules[0].childName = "U_Waist"; chanceDoll.rules[0].localPos = new Vector3(-0.435f, 0.128f, 0.058f); chanceDoll.rules[0].localAngles = new Vector3(351.14f, 263.84f, 20.24f); chanceDoll.rules[0].localScale = new Vector3(0.2f, 0.2f, 0.2f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = chanceDollRules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC2/Items/IncreaseDamageOnMultiKill/IncreaseDamageOnMultiKill.asset"); DisplayRuleGroup item16 = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] item6Rules = (ItemDisplayRule[])(object)new ItemDisplayRule[item16.rules.Length]; Array.Copy(item16.rules, item6Rules, item16.rules.Length); item16.rules = item6Rules; item16.rules[0].childName = "S_Wrist"; item16.rules[0].localPos = new Vector3(-0.016f, 0.105f, -0.029f); item16.rules[0].localAngles = new Vector3(275.22f, 0f, 180f); item16.rules[0].localScale = new Vector3(0.1f, 0.1f, 0.1f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = item6Rules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC2/Items/IncreasePrimaryDamage/IncreasePrimaryDamage.asset"); DisplayRuleGroup item17 = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] item7Rules = (ItemDisplayRule[])(object)new ItemDisplayRule[item17.rules.Length]; Array.Copy(item17.rules, item7Rules, item17.rules.Length); item17.rules = item7Rules; item17.rules[0].childName = "U_Wrist2"; item17.rules[0].localPos = new Vector3(-0.001f, -0.001f, -0.06f); item17.rules[0].localAngles = new Vector3(6.87f, 181.72f, 75.01f); item17.rules[0].localScale = new Vector3(0.3f, 0.3f, 0.3f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = item7Rules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC2/Items/KnockBackHitEnemies/KnockBackHitEnemies.asset"); DisplayRuleGroup item18 = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] item8Rules = (ItemDisplayRule[])(object)new ItemDisplayRule[item18.rules.Length]; Array.Copy(item18.rules, item8Rules, item18.rules.Length); item18.rules = item8Rules; item18.rules[0].childName = "U_Chest"; item18.rules[0].localPos = new Vector3(-0.008f, 0.241f, -0.078f); item18.rules[0].localAngles = new Vector3(357.09f, 0f, 0f); item18.rules[0].localScale = new Vector3(0.7f, 1f, 1f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = item8Rules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC2/Items/LowerHealthHigherDamage/LowerHealthHigherDamage.asset"); DisplayRuleGroup item19 = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] item9Rules = (ItemDisplayRule[])(object)new ItemDisplayRule[item19.rules.Length]; Array.Copy(item19.rules, item9Rules, item19.rules.Length); item19.rules = item9Rules; item19.rules[0].childName = "S_Waist"; item19.rules[0].localPos = new Vector3(0.385f, 0.158f, 0.085f); item19.rules[0].localAngles = new Vector3(11.21f, 232.1f, 353.99f); item19.rules[0].localScale = new Vector3(0.9f, 0.9f, 0.9f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = item9Rules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC2/Items/LowerPricedChests/LowerPricedChests.asset"); DisplayRuleGroup item10 = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] item10Rules = (ItemDisplayRule[])(object)new ItemDisplayRule[item10.rules.Length]; Array.Copy(item10.rules, item10Rules, item10.rules.Length); item10.rules = item10Rules; item10.rules[0].childName = "MuzzleCenter"; item10.rules[0].localPos = new Vector3(0.909f, 1.414f, 0.328f); item10.rules[0].localAngles = new Vector3(270f, 0f, 0f); item10.rules[0].localScale = new Vector3(0.6f, 0.6f, 0.6f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = item10Rules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC2/Items/MeteorAttackOnHighDamage/MeteorAttackOnHighDamage.asset"); DisplayRuleGroup item11 = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] item11Rules = (ItemDisplayRule[])(object)new ItemDisplayRule[item11.rules.Length]; Array.Copy(item11.rules, item11Rules, item11.rules.Length); item11.rules = item11Rules; item11.rules[0].childName = "U_Head"; item11.rules[0].localPos = new Vector3(-0.135f, 0.399f, 0.009f); item11.rules[0].localAngles = new Vector3(358.08f, 3.69f, 26.84f); item11.rules[0].localScale = new Vector3(0.5f, 0.5f, 0.5f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = item11Rules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC2/Items/OnLevelUpFreeUnlock/OnLevelUpFreeUnlock.asset"); DisplayRuleGroup item12 = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] item13Rules = (ItemDisplayRule[])(object)new ItemDisplayRule[item12.rules.Length]; Array.Copy(item12.rules, item13Rules, item12.rules.Length); item12.rules = item13Rules; item12.rules[0].childName = "S_Waist"; item12.rules[0].localPos = new Vector3(-0.184f, 0.19f, 0.212f); item12.rules[0].localAngles = new Vector3(336.37f, 325.4f, 13.21f); item12.rules[0].localScale = new Vector3(0.5f, 0.5f, 0.5f); item12.rules[1].childName = "MuzzleCenter"; item12.rules[1].localPos = new Vector3(1.193f, 0.785f, 0.238f); item12.rules[1].localAngles = new Vector3(0f, 15.58f, 0f); item12.rules[1].localScale = new Vector3(1f, 1f, 1f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = item13Rules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC2/Items/ResetChests/ResetChests.asset"); DisplayRuleGroup item13 = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] item14Rules = (ItemDisplayRule[])(object)new ItemDisplayRule[item13.rules.Length]; Array.Copy(item13.rules, item14Rules, item13.rules.Length); item13.rules = item14Rules; item13.rules[0].childName = "U_Waist"; item13.rules[0].localPos = new Vector3(-0.339f, 0.208f, 0.179f); item13.rules[0].localAngles = new Vector3(349.19f, 285.08f, 8.76f); item13.rules[0].localScale = new Vector3(1.2f, 1.2f, 1.2f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = item14Rules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC2/Items/TeleportOnLowHealth/TeleportOnLowHealth.asset"); DisplayRuleGroup item14 = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] item16Rules = (ItemDisplayRule[])(object)new ItemDisplayRule[item14.rules.Length]; Array.Copy(item14.rules, item16Rules, item14.rules.Length); item14.rules = item16Rules; item14.rules[0].childName = "S_Chest"; item14.rules[0].localPos = new Vector3(0.008f, 0.17f, 0.22f); item14.rules[0].localAngles = new Vector3(329.03f, 0f, 0f); item14.rules[0].localScale = new Vector3(0.7f, 0.7f, 0.7f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = item16Rules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/DLC2/Items/TriggerEnemyDebuffs/TriggerEnemyDebuffs.asset"); DisplayRuleGroup item15 = idrs.FindDisplayRuleGroup((Object)(object)keyAsset23); ItemDisplayRule[] item17Rules = (ItemDisplayRule[])(object)new ItemDisplayRule[item15.rules.Length]; Array.Copy(item15.rules, item17Rules, item15.rules.Length); item15.rules = item17Rules; item15.rules[0].childName = "S_Sash"; item15.rules[0].localPos = new Vector3(0.011f, -0.152f, -0.01f); item15.rules[0].localAngles = new Vector3(345.24f, 195.12f, 264.67f); item15.rules[0].localScale = new Vector3(0.9f, 0.9f, 0.9f); idrs.SetDisplayRuleGroup((Object)(object)keyAsset23, new DisplayRuleGroup { rules = item17Rules }); keyAsset23 = await KamunagiOfChainsPlugin.LoadAsset<ItemDef>("RoR2/Base/Fo