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.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.BrotherMonster; using EntityStates.BrotherMonster.Weapon; using EntityStates.Destructible; using EntityStates.LunarWisp; using EntityStates.Missions.BrotherEncounter; using HG; using IL.RoR2; using IL.RoR2.CharacterAI; using KinematicCharacterController; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates; using On.EntityStates.BrotherMonster; using On.EntityStates.Destructible; using On.EntityStates.Missions.BrotherEncounter; using On.RoR2; using On.RoR2.CharacterAI; using R2API; using Rewired.ComponentControls.Effects; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using RoR2BepInExPack.GameAssetPathsBetter; using UmbralMithrix.Components; using UmbralMithrix.EntityStates; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("UmbralMithrix")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+ef4636c2f36d626b8e7fa69d3418705f15bba45f")] [assembly: AssemblyProduct("UmbralMithrix")] [assembly: AssemblyTitle("UmbralMithrix")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace UmbralMithrix { public class ArbitraryCrystalComponent : MonoBehaviour { private BullseyeSearch bullseyeSearch; private void Start() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_0070: Unknown result type (might be due to invalid IL or missing references) TetherVfxOrigin val = ((Component)this).gameObject.AddComponent(); val.tetherPrefab = UmbralMithrix.tether; bullseyeSearch = new BullseyeSearch(); bullseyeSearch.searchOrigin = ((Component)this).transform.position; bullseyeSearch.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref bullseyeSearch.teamMaskFilter)).RemoveTeam((TeamIndex)1); bullseyeSearch.maxDistanceFilter = 200f; bullseyeSearch.sortMode = (SortMode)1; bullseyeSearch.filterByLoS = false; bullseyeSearch.filterByDistinctEntity = true; bullseyeSearch.RefreshCandidates(); List list = bullseyeSearch.GetResults().ToList(); for (int i = 0; i < list.Count; i++) { HurtBox val2 = list[i]; if (!Object.op_Implicit((Object)(object)val2) || !Object.op_Implicit((Object)(object)val2.healthComponent)) { continue; } CharacterBody body = val2.healthComponent.body; if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)PhaseCounter.instance)) { string text = ((!NetworkServer.active) ? ((PhaseCounter.instance.phase == 3) ? "BrotherBody(Clone)" : "BrotherHurtBodyP3(Clone)") : ((PhaseCounter.instance.phase == 2) ? "BrotherBody(Clone)" : "BrotherHurtBodyP3(Clone)")); if (((Object)body).name == text) { val.AddTether(body.transform); } } } } } public class CloneController : MonoBehaviour { private List playerBodies = new List(); private SpawnCard cloneCard = UmbralMithrix.mithrixGlassCard; private float stopwatch; private float interval = 8f; private void Start() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList) { if ((int)readOnlyInstances.teamIndex == 1) { CharacterBody body = readOnlyInstances.GetBody(); if (Object.op_Implicit((Object)(object)body) && body.isPlayerControlled) { playerBodies.Add(body); } } } } private void FixedUpdate() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Invalid comparison between Unknown and I4 //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //IL_009f: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown stopwatch += Time.deltaTime; if (stopwatch < interval) { return; } playerBodies.Clear(); foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList) { if ((int)readOnlyInstances.teamIndex == 1) { CharacterBody body = readOnlyInstances.GetBody(); if (Object.op_Implicit((Object)(object)body) && body.isPlayerControlled) { playerBodies.Add(body); } } } stopwatch %= interval; DirectorPlacementRule val = new DirectorPlacementRule(); val.placementMode = (PlacementMode)3; val.minDistance = 8f; val.maxDistance = 16f; val.position = playerBodies[Random.Range(0, playerBodies.Count)].corePosition; Xoroshiro128Plus rng = RoR2Application.rng; DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(cloneCard, val, rng) { summonerBodyObject = ((Component)this).gameObject, onSpawnedServer = delegate(SpawnResult spawnResult) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) Inventory val2 = default(Inventory); if (spawnResult.success && Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) && spawnResult.spawnedInstance.TryGetComponent(ref val2)) { val2.GiveItemPermanent(Items.HealthDecay, 10); } } }); } } public class DeathZoneController : MonoBehaviour { private SphereZone zone; private float stopwatch; private float interval = 1f; private float zoneRadius = 100f; private void Start() { zone = ((Component)this).GetComponent(); } private void FixedUpdate() { stopwatch += Time.deltaTime; if (!(stopwatch < interval)) { stopwatch %= interval; if (zone.Networkradius > zoneRadius) { SphereZone obj = zone; obj.Networkradius -= 10f; } } } } public class OrbDelayController : MonoBehaviour { private float delay = 2f; private float stopwatch; private ProjectileSimple projectileSimple; private void Start() { projectileSimple = ((Component)this).GetComponent(); } private void FixedUpdate() { stopwatch += Time.deltaTime; if (stopwatch >= delay) { projectileSimple.desiredForwardSpeed = 50f; Object.Destroy((Object)(object)this); } } } public class P4Controller : MonoBehaviour { public bool finishedItemSteal; private CharacterBody body; private float shockwaveStopwatch; private float pizzaStopwatch; private float missileStopwatch; private float shockwaveInterval = 3.75f; private float pizzaInterval = 1.5f; private float missileInterval = 1.25f; private readonly List _trackedPlayers = new List(); private void Start() { body = ((Component)this).GetComponent(); } private void OnEnable() { foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (Object.op_Implicit((Object)(object)instance) && instance.isConnected && Object.op_Implicit((Object)(object)instance.master)) { CharacterBody val = instance.master.GetBody(); if (Object.op_Implicit((Object)(object)val)) { handlePlayerBody(val); } } } CharacterBody.onBodyStartGlobal += onBodyStartGlobal; CharacterBody.onBodyDestroyGlobal += onBodyDestroyGlobal; } private void OnDisable() { CharacterBody.onBodyStartGlobal -= onBodyStartGlobal; CharacterBody.onBodyDestroyGlobal -= onBodyDestroyGlobal; foreach (CharacterBody trackedPlayer in _trackedPlayers) { trackedPlayer.RemoveBuff(Buffs.TeamWarCry); } _trackedPlayers.Clear(); } private void FixedUpdate() { //IL_01f6: 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_0200: 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_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0125: 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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0188: 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) if (!NetworkServer.active) { return; } if (finishedItemSteal && Object.op_Implicit((Object)(object)body.healthComponent) && body.healthComponent.alive) { missileStopwatch += Time.deltaTime; pizzaStopwatch += Time.deltaTime; shockwaveStopwatch += Time.deltaTime; if (missileStopwatch >= missileInterval) { missileStopwatch %= 1f; int num = 8; int num2 = 8; Vector3 val = (Object.op_Implicit((Object)(object)body.inputBank) ? body.inputBank.aimDirection : body.transform.forward); float num3 = 180f / (float)num; float num4 = (float)(3.0 + (double)(int)body.radius * 1.0); float damage = body.damage * 0.5f; Quaternion rotation = Util.QuaternionSafeLookRotation(val); for (int i = 0; i < num; i++) { Vector3 position = body.aimOrigin + Quaternion.AngleAxis((float)((double)(num2 - 1) * (double)num3 - (double)num3 * (double)(num - 1) / 2.0), val) * Vector3.up * num4; ProjectileManager.instance.FireProjectile(new FireProjectileInfo { projectilePrefab = UmbralMithrix.lunarMissile, position = position, rotation = rotation, owner = ((Component)this).gameObject, damage = damage, force = 100f }); num2--; } } } if (pizzaStopwatch >= pizzaInterval) { pizzaStopwatch %= 1f; Vector3 val2 = Vector3.ProjectOnPlane(body.inputBank.aimDirection, Vector3.up); float num5 = 40f; Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor((float)Random.Range(-45, -25), 0f, (float)Random.Range(-45, -25)); if ((double)Random.value <= 0.5) { ((Vector3)(ref val3))..ctor((float)Random.Range(25, 45), 0f, (float)Random.Range(25, 45)); } GameObject val4 = UmbralMithrix.leftP4Line; if ((double)Random.value <= 0.5) { val4 = UmbralMithrix.rightP4Line; } Vector3 val5 = body.footPosition; if (_trackedPlayers.Count > 0) { Vector3 footPosition = _trackedPlayers[Random.Range(0, _trackedPlayers.Count)].footPosition; footPosition.y = 491f; val5 = footPosition; } val5 += val3; for (int j = 0; j < 9; j++) { Vector3 val6 = Quaternion.AngleAxis(num5 * (float)j, Vector3.up) * val2; ProjectileManager.instance.FireProjectile(val4, val5, Util.QuaternionSafeLookRotation(val6), ((Component)this).gameObject, body.damage * (UltChannelState.waveProjectileDamageCoefficient * 0.5f), UltChannelState.waveProjectileForce / 8f, Util.CheckRoll(body.crit, body.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } if (shockwaveStopwatch >= shockwaveInterval) { shockwaveStopwatch %= 1f; Util.PlaySound(ExitSkyLeap.soundString, ((Component)this).gameObject); float num6 = 360f / (float)ExitSkyLeap.waveProjectileCount; Vector3 val7 = Vector3.ProjectOnPlane(body.inputBank.aimDirection, Vector3.up); Vector3 footPosition2 = body.footPosition; for (int k = 0; k < ExitSkyLeap.waveProjectileCount; k++) { Vector3 val8 = Quaternion.AngleAxis(num6 * (float)k, Vector3.up) * val7; ProjectileManager.instance.FireProjectile(ExitSkyLeap.waveProjectilePrefab, footPosition2, Util.QuaternionSafeLookRotation(val8), ((Component)this).gameObject, body.damage * (ExitSkyLeap.waveProjectileDamageCoefficient * 0.75f), ExitSkyLeap.waveProjectileForce / 4f, Util.CheckRoll(body.crit, body.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } } private void onBodyStartGlobal(CharacterBody body) { if (body.isPlayerControlled) { handlePlayerBody(body); } } private void onBodyDestroyGlobal(CharacterBody body) { _trackedPlayers.Remove(body); } private void handlePlayerBody(CharacterBody playerBody) { if (!_trackedPlayers.Contains(playerBody)) { _trackedPlayers.Add(playerBody); if (NetworkServer.active) { playerBody.AddBuff(Buffs.TeamWarCry); } } } } public class SelfDestructController : MonoBehaviour { private void Start() { ((MonoBehaviour)this).StartCoroutine(SelfDestruct()); } private IEnumerator SelfDestruct() { yield return (object)new WaitForSeconds(ModConfig.CrushingLeap.Value); Object.Destroy((Object)(object)((Component)this).gameObject); } } public class UmbralMissionController : MonoBehaviour { public static UmbralMissionController instance; public CharacterBody currentPhaseBody; public CharacterBody p3CloneBody; public bool practiceModeEnabled; public bool spawnedClone; public bool finishedItemSteal; public bool p2ThresholdReached; public bool p3ThresholdReached; public List timeCrystals = new List(); private void Start() { instance = this; } } public class MiscHooks { public MiscHooks() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Expected O, but got Unknown BaseAI.FindEnemyHurtBox += new Manipulator(TargetOnlyPlayers); CharacterBody.UpdateAllTemporaryVisualEffects += new Manipulator(AddUmbralParticles); CharacterModel.UpdateOverlays += new Manipulator(AddUmbralOverlay); BaseAI.FindEnemyHurtBox += new hook_FindEnemyHurtBox(ChangeP3CloneTargeting); CharacterMaster.OnBodyDeath += new hook_OnBodyDeath(CharacterMaster_OnBodyDeath); PurchaseInteraction.OnInteractionBegin += new hook_OnInteractionBegin(PurchaseInteraction_OnInteractionBegin); CombatDirector.OnEnable += new hook_OnEnable(CombatDirector_OnEnable); HealthComponent.SendDamageDealt += new hook_SendDamageDealt(ThresholdCheck); SceneCatalog.onMostRecentSceneDefChanged += onMostRecentSceneDefChanged; CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart); FrozenState.OnEnter += new hook_OnEnter(FrozenState_OnEnter); CharacterBody.AddTimedBuff_BuffDef_float += new hook_AddTimedBuff_BuffDef_float(AddTimedBuff_BuffDef_float); TimeCrystalDeath.OnEnter += new hook_OnEnter(RemoveUmbralImmune); ItemStealController.BrotherItemFilter += new hook_BrotherItemFilter(ItemStealController_BrotherItemFilter); } private bool ItemStealController_BrotherItemFilter(orig_BrotherItemFilter orig, ItemIndex itemIndex) { return false; } private void RemoveUmbralImmune(orig_OnEnter orig, TimeCrystalDeath self) { if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && (PhaseCounter.instance.phase == 2 || PhaseCounter.instance.phase == 3)) { TimeCrystalDeath.explosionDamageCoefficient = 0f; TimeCrystalDeath.explosionForce = 0f; if (Object.op_Implicit((Object)(object)UmbralMissionController.instance)) { CharacterBody currentPhaseBody = UmbralMissionController.instance.currentPhaseBody; if (Object.op_Implicit((Object)(object)currentPhaseBody) && currentPhaseBody.HasBuff(Buffs.Immune) && UmbralMissionController.instance.timeCrystals.Count == 1) { UmbralMissionController.instance.timeCrystals.RemoveAt(0); currentPhaseBody.RemoveBuff(Buffs.Immune); } else if (UmbralMissionController.instance.timeCrystals.Count > 0) { UmbralMissionController.instance.timeCrystals.RemoveAt(0); } } } else { TimeCrystalDeath.explosionForce = 4000f; TimeCrystalDeath.explosionDamageCoefficient = 2f; } orig.Invoke(self); } private void TargetOnlyPlayers(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetResults") })) { return; } val.Emit(OpCodes.Ldarg_0); val.EmitDelegate, BaseAI, IEnumerable>>((Func, BaseAI, IEnumerable>)delegate(IEnumerable results, BaseAI instance) { if (Object.op_Implicit((Object)(object)instance) && (((Object)instance.body).name == "BrotherBody(Clone)" || ((Object)instance.body).name == "BrotherGlassBody(Clone)" || ((Object)instance.body).name == "BrotherHurtBody(Clone)")) { IEnumerable enumerable = results.Where(delegate(HurtBox hurtBox) { GameObject val2 = HurtBox.FindEntityObject(hurtBox); CharacterBody val3 = default(CharacterBody); return Object.op_Implicit((Object)(object)val2) && val2.TryGetComponent(ref val3) && val3.isPlayerControlled; }); if (!enumerable.Any()) { return results; } return enumerable; } return results; }); } private HurtBox ChangeP3CloneTargeting(orig_FindEnemyHurtBox orig, BaseAI self, float maxDistance, bool full360Vision, bool filterByLoS) { if (Object.op_Implicit((Object)(object)self) && (((Object)self.body).name == "BrotherBody(Clone)" || ((Object)self.body).name == "BrotherGlassBody(Clone)" || ((Object)self.body).name == "BrotherHurtBody(Clone)") && Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 3) { maxDistance = float.PositiveInfinity; filterByLoS = false; full360Vision = true; } return orig.Invoke(self, maxDistance, full360Vision, filterByLoS); } private void AddUmbralParticles(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "InvadingDoppelganger") }); val.Index += 2; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(int vengeanceCount, CharacterBody self) { if (((Object)self).name.Contains("Brother") && Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCountPermanent(UmbralMithrix.UmbralItem) > 0 && ModConfig.purpleMithrix.Value) { vengeanceCount++; } return vengeanceCount; }); } private void AddUmbralOverlay(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor[] array = default(ILCursor[]); if (!val.TryFindNext(ref array, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "InvadingDoppelganger"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCountEffective") })) { Log.Error("Failed to find patch location", "C:\\Users\\romym\\OneDrive\\Desktop\\RoR2Mods\\UmbralMithrix\\UmbralMithrix\\Hooks\\MiscHooks.cs", "AddUmbralOverlay", 136); return; } val.Goto(array[1].Next, (MoveType)2, false); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)getDoppelGangerCount); static int getDoppelGangerCount(int doppelgangerCount, CharacterModel characterModel) { if (Object.op_Implicit((Object)(object)characterModel) && Object.op_Implicit((Object)(object)characterModel.body)) { if (((Object)characterModel.body).name.Contains("Brother") && Object.op_Implicit((Object)(object)characterModel.body.inventory) && characterModel.body.inventory.GetItemCountPermanent(UmbralMithrix.UmbralItem) > 0 && ModConfig.purpleMithrix.Value) { doppelgangerCount++; } if (Object.op_Implicit((Object)(object)((Component)characterModel.body).GetComponent())) { doppelgangerCount++; } } return doppelgangerCount; } } private void ThresholdCheck(orig_SendDamageDealt orig, DamageReport damageReport) { if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && Object.op_Implicit((Object)(object)UmbralMissionController.instance)) { HealthComponent component = ((Component)damageReport.victim).gameObject.GetComponent(); CharacterBody body = component.body; if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)component) && ((Object)body).name == "BrotherBody(Clone)" && PhaseCounter.instance.phase == 2 && !UmbralMissionController.instance.p2ThresholdReached && component.health - damageReport.damageDealt <= component.fullHealth * 0.75f) { UmbralMissionController.instance.p2ThresholdReached = true; P2ThresholdEvent(((Component)body).gameObject); component.health = component.fullHealth * 0.75f; UmbralMissionController.instance.currentPhaseBody.AddBuff(Buffs.Immune); damageReport.damageDealt = 1f; } if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)component) && ((Object)body).name == "BrotherHurtBodyP3(Clone)" && PhaseCounter.instance.phase == 3 && !UmbralMissionController.instance.p3ThresholdReached && component.health - damageReport.damageDealt <= component.fullHealth * 0.75f) { UmbralMissionController.instance.p3ThresholdReached = true; ((Component)UmbralMissionController.instance.p3CloneBody).GetComponent().health = 1f; P3ThresholdEvent(((Component)body).gameObject); component.health = component.fullHealth * 0.75f; UmbralMissionController.instance.currentPhaseBody.AddBuff(Buffs.Immune); damageReport.damageDealt = 1f; } } orig.Invoke(damageReport); } private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, body); if (!Object.op_Implicit((Object)(object)PhaseCounter.instance)) { return; } if (Object.op_Implicit((Object)(object)Run.instance) && Run.instance.nameToken == "Judgement" && body.isPlayerControlled) { body.baseMoveSpeed *= 1.35f; } if (((Object)body).name == "BrotherHurtBodyP3(Clone)") { if (ModConfig.purpleMithrix.Value) { self.inventory.GiveItemPermanent(UmbralMithrix.UmbralItem, 1); } if (Object.op_Implicit((Object)(object)UmbralMissionController.instance)) { UmbralMissionController.instance.currentPhaseBody = body; } self.inventory.GiveItemPermanent(Items.AdaptiveArmor, 1); } if (((Object)body).name == "BrotherBody(Clone)" && ModConfig.purpleMithrix.Value) { self.inventory.GiveItemPermanent(UmbralMithrix.UmbralItem, 1); } if (((Object)body).name == "BrotherBody(Clone)") { if (PhaseCounter.instance.phase == 1) { ChildLocator component = ((Component)SceneInfo.instance).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild("CenterOfArena"); if (Object.op_Implicit((Object)(object)val)) { Object.Destroy((Object)(object)((Component)val).gameObject); } } } if (PhaseCounter.instance.phase == 3 && Object.op_Implicit((Object)(object)UmbralMissionController.instance)) { UmbralMissionController.instance.p3CloneBody = body; } if (PhaseCounter.instance.phase != 3) { if (Object.op_Implicit((Object)(object)UmbralMissionController.instance)) { UmbralMissionController.instance.currentPhaseBody = body; } ((Component)body).gameObject.AddComponent(); } } if (((Object)body).name == "BrotherHurtBody(Clone)" && PhaseCounter.instance.phase == 4) { if (ModConfig.skipPhase4.Value) { body.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); return; } body.inventory.GiveItemPermanent(UmbralMithrix.UmbralItem, 1); body.AddBuff(Buffs.Immune); body.inventory.GiveItemPermanent(Items.HealthDecay, 40); } } private void CharacterMaster_OnBodyDeath(orig_OnBodyDeath orig, CharacterMaster self, CharacterBody body) { orig.Invoke(self, body); if (NetworkServer.active && body.isPlayerControlled && Object.op_Implicit((Object)(object)UmbralMissionController.instance) && UmbralMissionController.instance.practiceModeEnabled && !self.IsExtraLifePendingServer() && Object.op_Implicit((Object)(object)PhaseCounter.instance)) { self.RespawnExtraLife(); } } private void CombatDirector_OnEnable(orig_OnEnable orig, CombatDirector self) { if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && (PhaseCounter.instance.phase == 2 || PhaseCounter.instance.phase == 3)) { ((Component)self).gameObject.SetActive(false); } else { orig.Invoke(self); } } private void P2ThresholdEvent(GameObject summoner) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)UmbralMissionController.instance)) { UmbralMissionController.instance.timeCrystals.Clear(); int num = 4; for (int i = 0; i < num; i++) { GameObject val = Object.Instantiate(UmbralMithrix.timeCrystal, UmbralMithrix.p23PizzaPoints[i], Quaternion.identity); UmbralMissionController.instance.timeCrystals.Add(val); val.GetComponent().teamIndex = (TeamIndex)2; NetworkServer.Spawn(val); } } } private void P3ThresholdEvent(GameObject summoner) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)UmbralMissionController.instance)) { UmbralMissionController.instance.timeCrystals.Clear(); int num = 4; for (int i = 0; i < num; i++) { GameObject val = Object.Instantiate(UmbralMithrix.timeCrystal, UmbralMithrix.p23PizzaPoints[i], Quaternion.identity); UmbralMissionController.instance.timeCrystals.Add(val); val.GetComponent().teamIndex = (TeamIndex)2; NetworkServer.Spawn(val); } } } private static void onMostRecentSceneDefChanged(SceneDef sceneDef) { if (sceneDef.cachedName == "moon2") { UmbralMithrix.ArenaSetup(); UmbralMithrix.SpawnPracticeModeShrine(); } } private void PurchaseInteraction_OnInteractionBegin(orig_OnInteractionBegin orig, PurchaseInteraction self, Interactor activator) { if (((Object)self).name == "PracticeModeShrine" && Object.op_Implicit((Object)(object)UmbralMissionController.instance)) { UmbralMissionController.instance.practiceModeEnabled = true; } orig.Invoke(self, activator); } private void FrozenState_OnEnter(orig_OnEnter orig, FrozenState self) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) if (((Object)((EntityState)self).characterBody).name == "BrotherBody(Clone)" && Random.value > 0.5f) { Ray aimRay = ((BaseState)self).GetAimRay(); for (int i = 0; i < 6; i++) { Util.PlaySound(FireLunarShards.fireSound, ((EntityState)self).gameObject); ProjectileManager.instance.FireProjectile(FireLunarShards.projectilePrefab, ((Ray)(ref aimRay)).origin, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), ((EntityState)self).gameObject, (float)((double)((EntityState)self).characterBody.damage * 0.100000001490116 / 12.0), 0f, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } orig.Invoke(self); } private void AddTimedBuff_BuffDef_float(orig_AddTimedBuff_BuffDef_float orig, CharacterBody self, BuffDef buffDef, float duration) { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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_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) if (((Object)self).name == "BrotherBody(Clone)" && (Object)(object)buffDef == (Object)(object)Buffs.Nullified && Random.value < 0.25f) { duration /= 2f; Ray val = (Object.op_Implicit((Object)(object)self.inputBank) ? new Ray(self.inputBank.aimOrigin, self.inputBank.aimDirection) : new Ray(self.transform.position, self.transform.forward)); for (int i = 0; i < 6; i++) { Util.PlaySound(FireLunarShards.fireSound, ((Component)self).gameObject); ProjectileManager.instance.FireProjectile(FireLunarShards.projectilePrefab, ((Ray)(ref val)).origin, Quaternion.LookRotation(((Ray)(ref val)).direction), ((Component)self).gameObject, (float)((double)self.damage * 0.100000001490116 / 12.0), 0f, Util.CheckRoll(self.crit, self.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } orig.Invoke(self, buffDef, duration); } private void SetPosition(Vector3 newPosition, CharacterBody body) { //IL_0019: 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) if (Object.op_Implicit((Object)(object)body.characterMotor)) { ((BaseCharacterController)body.characterMotor).Motor.SetPositionAndRotation(newPosition, Quaternion.identity, true); } } } public class MissionHooks { public MissionHooks() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown BrotherEncounterPhaseBaseState.OnEnter += new hook_OnEnter(BrotherEncounterPhaseBaseStateOnEnter); Phase1.OnEnter += new hook_OnEnter(Phase1OnEnter); Phase2.OnEnter += new hook_OnEnter(Phase2OnEnter); Phase3.OnEnter += new hook_OnEnter(Phase3OnEnter); Phase4.OnEnter += new hook_OnEnter(Phase4OnEnter); BossDeath.OnEnter += new hook_OnEnter(BossDeathOnEnter); } private void Phase1OnEnter(orig_OnEnter orig, Phase1 self) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) UmbralMithrix.mithrix.GetComponent().initialStateType = new SerializableEntityStateType(typeof(ThroneSpawnState)); orig.Invoke(self); } private void Phase2OnEnter(orig_OnEnter orig, Phase2 self) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) UmbralMithrix.mithrix.GetComponent().initialStateType = new SerializableEntityStateType(typeof(SkySpawnState)); ((BrotherEncounterBaseState)self).KillAllMonsters(); orig.Invoke(self); } private void Phase3OnEnter(orig_OnEnter orig, Phase3 self) { ((BrotherEncounterBaseState)self).KillAllMonsters(); orig.Invoke(self); } private void Phase4OnEnter(orig_OnEnter orig, Phase4 self) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("EscapeSequenceController"); if (Object.op_Implicit((Object)(object)val)) { Transform val2 = val.transform.Find("EscapeSequenceObjects/Mega Glows"); if (Object.op_Implicit((Object)(object)val2)) { Object.Instantiate(((Component)val2).gameObject, new Vector3(-88.5f, 491.5f, -0.3f), Quaternion.Euler(270f, 0f, 0f)).transform.localScale = new Vector3(0.1f, 0.1f, 0.1f); } } GameObject obj = Object.Instantiate(UmbralMithrix.voidling, new Vector3(-88.5f, 520f, -0.3f), Quaternion.identity); obj.AddComponent(); obj.GetComponent().teamIndex = (TeamIndex)2; SkillLocator skillLocator = obj.GetComponent().skillLocator; skillLocator.primary = new GenericSkill(); skillLocator.secondary = new GenericSkill(); skillLocator.utility = new GenericSkill(); skillLocator.special = new GenericSkill(); NetworkServer.Spawn(obj); orig.Invoke(self); } private void BossDeathOnEnter(orig_OnEnter orig, BossDeath self) { //IL_001a: 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) orig.Invoke(self); GameObject.Find("InactiveVoidling(Clone)").GetComponent().Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); } private void BrotherEncounterPhaseBaseStateOnEnter(orig_OnEnter orig, BrotherEncounterPhaseBaseState self) { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!NetworkServer.active || (Object)(object)self.phaseScriptedCombatEncounter == (Object)null || !Object.op_Implicit((Object)(object)PhaseCounter.instance)) { return; } ((BrotherEncounterBaseState)self).childLocator = ((EntityState)self).GetComponent(); Transform val = ((BrotherEncounterBaseState)self).childLocator.FindChild("ArenaWalls"); Material doppelMat = UmbralMithrix.doppelMat; if (Object.op_Implicit((Object)(object)val)) { ((Component)val).gameObject.SetActive(((BrotherEncounterBaseState)self).shouldEnableArenaWalls); if (ModConfig.purpleArena.Value) { Renderer[] componentsInChildren = ((Component)val).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].material = doppelMat; } } } if (PhaseCounter.instance.phase == 2) { Transform transform = new GameObject().transform; transform.position = new Vector3(-88.5f, 491.5f, -0.3f); SpawnInfo val2 = default(SpawnInfo); val2.explicitSpawnPosition = transform; val2.spawnCard = UmbralMithrix.mithrixCard; SpawnInfo val3 = val2; self.phaseScriptedCombatEncounter.spawns = (SpawnInfo[])(object)new SpawnInfo[1] { val3 }; } if (PhaseCounter.instance.phase == 3) { Transform transform2 = new GameObject().transform; transform2.position = new Vector3(-88.5f, 491.5f, -0.3f); SpawnInfo val2 = default(SpawnInfo); val2.explicitSpawnPosition = transform2; val2.spawnCard = UmbralMithrix.mithrixHurtP3Card; SpawnInfo val4 = val2; self.phaseScriptedCombatEncounter.spawns = (SpawnInfo[])(object)new SpawnInfo[1] { val4 }; } if (PhaseCounter.instance.phase == 4) { Transform transform3 = new GameObject().transform; transform3.position = new Vector3(-88.5f, 491.5f, -0.3f); SpawnInfo val2 = default(SpawnInfo); val2.explicitSpawnPosition = transform3; val2.spawnCard = UmbralMithrix.mithrixHurtCard; SpawnInfo val5 = val2; self.phaseScriptedCombatEncounter.spawns = (SpawnInfo[])(object)new SpawnInfo[1] { val5 }; } } } public class MithrixMiscHooks { public MithrixMiscHooks() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown SkyLeapDeathState.OnEnter += new hook_OnEnter(SkyLeapDeathState_OnEnter); SpellBaseState.InitItemStealer += new hook_InitItemStealer(PreventTempItemSteal); SpellChannelExitState.OnEnter += new hook_OnEnter(SpellChannelExitState_OnEnter); StaggerEnter.OnEnter += new hook_OnEnter(StaggerEnter_OnEnter); TrueDeathState.OnEnter += new hook_OnEnter(TrueDeathState_OnEnter); } private void PreventTempItemSteal(orig_InitItemStealer orig, SpellBaseState self) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && (Object)(object)self.itemStealController == (Object)null) { GameObject val = Object.Instantiate(LegacyResourcesAPI.Load("Prefabs/NetworkedObjects/ItemStealController"), ((EntityState)self).transform.position, Quaternion.identity); self.itemStealController = val.GetComponent(); self.itemStealController.itemLendFilter = ItemStealController.BrotherItemFilter; self.itemStealController.itemLendTempFilter = ItemStealController.BrotherItemFilter; val.GetComponent().AttachToGameObjectAndSpawn(((EntityState)self).gameObject, (string)null); ((EntityState)self).gameObject.GetComponent().itemStealController = self.itemStealController; NetworkServer.Spawn(val); } } private void SkyLeapDeathState_OnEnter(orig_OnEnter orig, SkyLeapDeathState self) { if (((Object)((EntityState)self).characterBody).name == "BrotherGlassBody(Clone)") { ((GenericCharacterDeath)self).DestroyModel(); if (NetworkServer.active) { ((GenericCharacterDeath)self).DestroyBodyAsapServer(); } } else { orig.Invoke(self); } } private void SpellChannelExitState_OnEnter(orig_OnEnter orig, SpellChannelExitState self) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Invalid comparison between Unknown and I4 //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)UmbralMissionController.instance)) { UmbralMissionController.instance.finishedItemSteal = true; } ((Component)((EntityState)self).characterBody).gameObject.GetComponent().finishedItemSteal = true; bool flag = false; foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList) { if ((int)readOnlyInstances.teamIndex == 1) { CharacterBody body = readOnlyInstances.GetBody(); if (Object.op_Implicit((Object)(object)body) && !body.isPlayerControlled && Object.op_Implicit((Object)(object)body.healthComponent)) { body.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); } } } if (flag) { Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "UMBRAL_KILLED_ALL_ALLIES_MESAAGE" }); } orig.Invoke(self); } private void StaggerEnter_OnEnter(orig_OnEnter orig, StaggerEnter self) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown ((StaggerBaseState)self).duration = 0f; if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 4) { ((EntityState)self).outer.SetNextState((EntityState)new SpellChannelEnterState()); } if (Object.op_Implicit((Object)(object)UmbralMissionController.instance) && Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 3 && Object.op_Implicit((Object)(object)UmbralMissionController.instance) && !UmbralMissionController.instance.spawnedClone) { UmbralMissionController.instance.spawnedClone = true; DirectorPlacementRule val = new DirectorPlacementRule(); val.placementMode = (PlacementMode)3; val.minDistance = 3f; val.maxDistance = 20f; val.position = new Vector3(-88.5f, 491.5f, -0.3f); Xoroshiro128Plus rng = RoR2Application.rng; DirectorSpawnRequest val2 = new DirectorSpawnRequest(UmbralMithrix.mithrixCard, val, rng); val2.summonerBodyObject = ((EntityState)self).gameObject; val2.onSpawnedServer = (Action)Delegate.Combine(val2.onSpawnedServer, (Action)delegate(SpawnResult spawnResult) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) CharacterMaster component = spawnResult.spawnedInstance.GetComponent(); component.GetBody().AddBuff(Buffs.Immune); component.GetBody().AddBuff(Buffs.Intangible); BaseAI[] components = ((Component)component).GetComponents(); foreach (BaseAI val3 in components) { if (Object.op_Implicit((Object)(object)val3)) { val3.fullVision = true; val3.neverRetaliateFriendlies = true; } } }); DirectorCore.instance.TrySpawnObject(val2); } orig.Invoke(self); } private void TrueDeathState_OnEnter(orig_OnEnter orig, TrueDeathState self) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) TrueDeathState.dissolveDuration = 3f; if (Object.op_Implicit((Object)(object)UmbralMissionController.instance)) { if (!UmbralMissionController.instance.practiceModeEnabled) { Vector3 val = Vector3.up * 40f + Vector3.forward * 2f; PickupDropletController.CreatePickupDroplet(new UniquePickup(PickupCatalog.FindPickupIndex(UmbralMithrix.UmbralItem.itemIndex)), ((EntityState)self).characterBody.footPosition + Vector3.up * 1.5f, val, false); } UmbralMissionController.instance.practiceModeEnabled = false; } orig.Invoke(self); } } internal static class LanguageManager { public static void Register(string searchFolder, string langFolderName = "lang") { string langFolderPath = Path.Combine(searchFolder, langFolderName); if (Directory.Exists(langFolderPath)) { Language.collectLanguageRootFolders += delegate(List folders) { folders.Add(langFolderPath); }; } else { Log.Error("Lang folder not found: " + langFolderPath, "C:\\Users\\romym\\OneDrive\\Desktop\\RoR2Mods\\UmbralMithrix\\UmbralMithrix\\LanguageManager.cs", "Register", 20); } } } internal static class Log { private static readonly StringBuilder _sharedStringBuilder; private static readonly int _cachedCallerPathPrefixLength; private static ManualLogSource _logSource; static Log() { _sharedStringBuilder = new StringBuilder(256); _cachedCallerPathPrefixLength = getCallerPathPrefixLength("C:\\Users\\romym\\OneDrive\\Desktop\\RoR2Mods\\UmbralMithrix\\UmbralMithrix\\Log.cs"); static int getCallerPathPrefixLength([CallerFilePath] string callerPath = null) { int num = callerPath.LastIndexOf("UmbralMithrix\\"); if (num >= 0) { return num + "UmbralMithrix\\".Length; } Debug.LogError((object)"[UmbralMithrix] Logger failed to determine caller path prefix length"); return 0; } } internal static void Init(ManualLogSource logSource) { _logSource = logSource; } private static StringBuilder AppendCallerPrefix(this StringBuilder stringBuilder, string callerPath, string callerMemberName, int callerLineNumber) { return stringBuilder.Append(callerPath, _cachedCallerPathPrefixLength, callerPath.Length - _cachedCallerPathPrefixLength).Append(':').Append(callerLineNumber) .Append(" (") .Append(callerMemberName) .Append("):"); } private static StringBuilder buildCallerLogString(string callerPath, string callerMemberName, int callerLineNumber, object data) { return _sharedStringBuilder.Clear().AppendCallerPrefix(callerPath, callerMemberName, callerLineNumber).Append(' ') .Append(data); } [Conditional("DEBUG")] internal static void Debug(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogDebug((object)buildCallerLogString(callerPath, callerMemberName, callerLineNumber, data)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [Conditional("DEBUG")] internal static void Debug_NoCallerPrefix(object data) { _logSource.LogDebug(data); } internal static void Error(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogError((object)buildCallerLogString(callerPath, callerMemberName, callerLineNumber, data)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void Error_NoCallerPrefix(object data) { _logSource.LogError(data); } internal static void Fatal(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogFatal((object)buildCallerLogString(callerPath, callerMemberName, callerLineNumber, data)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void Fatal_NoCallerPrefix(object data) { _logSource.LogFatal(data); } internal static void Info(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogInfo((object)buildCallerLogString(callerPath, callerMemberName, callerLineNumber, data)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void Info_NoCallerPrefix(object data) { _logSource.LogInfo(data); } internal static void Message(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogMessage((object)buildCallerLogString(callerPath, callerMemberName, callerLineNumber, data)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void Message_NoCallerPrefix(object data) { _logSource.LogMessage(data); } internal static void Warning(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogWarning((object)buildCallerLogString(callerPath, callerMemberName, callerLineNumber, data)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void Warning_NoCallerPrefix(object data) { _logSource.LogWarning(data); } internal static void LogType(LogLevel level, object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) if ((level & 0x20) == 0) { _logSource.Log(level, (object)buildCallerLogString(callerPath, callerMemberName, callerLineNumber, data)); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void LogType_NoCallerPrefix(LogLevel level, object data) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) if ((level & 0x20) == 0) { _logSource.Log(level, data); } } } public static class ModConfig { internal static ConfigFile UMConfig; public static ConfigEntry purpleArena; public static ConfigEntry skipPhase4; public static ConfigEntry addShockwave; public static ConfigEntry purpleMithrix; public static ConfigEntry basehealth; public static ConfigEntry levelhealth; public static ConfigEntry basedamage; public static ConfigEntry leveldamage; public static ConfigEntry basearmor; public static ConfigEntry baseattackspeed; public static ConfigEntry basespeed; public static ConfigEntry mass; public static ConfigEntry turningspeed; public static ConfigEntry jumpingpower; public static ConfigEntry acceleration; public static ConfigEntry aircontrol; public static ConfigEntry PrimStocks; public static ConfigEntry SecStocks; public static ConfigEntry UtilStocks; public static ConfigEntry PrimCD; public static ConfigEntry SecCD; public static ConfigEntry UtilCD; public static ConfigEntry SpecialCD; public static ConfigEntry CrushingLeap; public static ConfigEntry SlamOrbProjectileCount; public static ConfigEntry LunarShardAdd; public static ConfigEntry UltimateWaves; public static ConfigEntry UltimateCount; public static ConfigEntry UltimateDuration; public static ConfigEntry JumpWaveCount; public static ConfigEntry ShardHoming; public static ConfigEntry ShardRange; public static ConfigEntry ShardCone; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Init() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown if (UmbralMithrix.RooInstalled) { InitRoO(); } UMConfig = new ConfigFile(Paths.ConfigPath + "\\com.Nuxlar.UmbralMithrix.cfg", true); purpleMithrix = UMConfig.BindOption("General", "Purple Mithrix", defaultValue: true, "Adds umbral effects to Mithrix (purple when spawning in)."); purpleArena = UMConfig.BindOption("General", "Purple Arena", defaultValue: false, "Adds swirling purple walls/ceiling to the arena."); skipPhase4 = UMConfig.BindOption("General", "Skip Phase 4", defaultValue: false, "Skips Phase 4."); addShockwave = UMConfig.BindOption("General", "Add shockwave to Hammer Swipe", defaultValue: false, "Adds a 1 shockwave when Mithrix swipes."); basehealth = UMConfig.BindOptionSteppedSlider("Stats", "Base Health", 1000f, 25f, "Vanilla: 1000", 500f, 2500f); levelhealth = UMConfig.BindOptionSteppedSlider("Stats", "Level Health", 325f, 25f, "Health gained per level. Vanilla: 300", 100f, 1000f); basedamage = UMConfig.BindOptionSteppedSlider("Stats", "Base Damage", 15f, 1f, "Vanilla: 16", 10f, 30f); leveldamage = UMConfig.BindOptionSteppedSlider("Stats", "Level Damage", 3f, 0.25f, "Damage gained per level. Vanilla: 3.2", 1f, 6.4f); basearmor = UMConfig.BindOptionSteppedSlider("Stats", "Base Armor", 30f, 5f, "Vanilla: 20", 5f, 50f); baseattackspeed = UMConfig.BindOptionSteppedSlider("Stats", "Base Attack Speed", 1.25f, 0.25f, "Vanilla: 1", 0.25f, 3f); basespeed = UMConfig.BindOptionSteppedSlider("Stats", "Base Move Speed", 15f, 1f, "Vanilla: 15", 10f, 30f); mass = UMConfig.BindOptionSteppedSlider("Stats", "Mass", 5000f, 100f, "Recommended to increase if you increase his movement speed. Vanilla: 900", 900f, 10000f); turningspeed = UMConfig.BindOptionSteppedSlider("Stats", "Turn Speed", 300f, 10f, "Vanilla: 270", 200f, 1000f); jumpingpower = UMConfig.BindOptionSteppedSlider("Stats", "Jump Power", 50f, 5f, "How high Mithrix jumps. Vanilla: 25", 25f, 100f); acceleration = UMConfig.BindOptionSteppedSlider("Stats", "Acceleration", 100f, 5f, "Vanilla: 45", 45f, 500f); aircontrol = UMConfig.BindOptionSteppedSlider("Stats", "Air Control", 1f, 0.5f, "Vanilla: 0.25", 0.25f, 3f); PrimStocks = UMConfig.BindOptionSlider("Skills", "Primary Stocks", 1, "Max Stocks for Mithrix's Weapon Slam. Vanilla: 1", 1f, 5f); SecStocks = UMConfig.BindOptionSlider("Skills", "Secondary Stocks", 1, "Max Stocks for Mithrix's Dash Attack. Vanilla: 1", 1f, 5f); UtilStocks = UMConfig.BindOptionSlider("Skills", "Util Stocks", 3, "Max Stocks for Mithrix's Dash. Vanilla: 2", 1f, 5f); PrimCD = UMConfig.BindOptionSteppedSlider("Skills", "Primary Cooldown", 4f, 0.25f, "Cooldown for Mithrix's Weapon Slam. Vanilla: 4", 1f, 5f); SecCD = UMConfig.BindOptionSteppedSlider("Skills", "Secondary Cooldown", 4.5f, 0.25f, "Cooldown for Mithrix's Dash Attack. Vanilla: 5", 1f, 5f); UtilCD = UMConfig.BindOptionSteppedSlider("Skills", "Util Cooldown", 2.5f, 0.25f, "Cooldown for Mithrix's Dash. Vanilla: 3", 1f, 5f); SpecialCD = UMConfig.BindOptionSteppedSlider("Skills", "Special Cooldown", 30f, 1f, "Cooldown for Mithrix's Jump Attack. Vanilla: 30", 10f, 50f); CrushingLeap = UMConfig.BindOptionSteppedSlider("Skill Mods", "Crushing Leap", 3f, 0.1f, "How long Mithrix stays in the air during the crushing leap. Vanilla: 3", 0.1f, 6f); SlamOrbProjectileCount = UMConfig.BindOptionSlider("Skill Mods", "Orb Projectile Count", 3, "Orbs fired by weapon slam in a circle. Vanilla: N/A", 0f, 16f); LunarShardAdd = UMConfig.BindOptionSlider("Skill Mods", "Shard Add Count", 1, "Bonus shards added to each shot of lunar shards. Vanilla: N/A", 1f, 5f); UltimateWaves = UMConfig.BindOptionSlider("Skill Mods", "P3 Ult Lines", 8, "Total lines in ultimate per burst. Vanilla: 4", 4f, 18f); UltimateCount = UMConfig.BindOptionSlider("Skill Mods", "P3 Ult Bursts", 6, "Total times the ultimate fires. Vanilla: 4", 4f, 8f); UltimateDuration = UMConfig.BindOptionSteppedSlider("Skill Mods", "P3 Ult Duration", 8f, 0.25f, "How long ultimate lasts. Vanilla: 8", 5f, 10f); JumpWaveCount = UMConfig.BindOptionSlider("Skill Mods", "Jump Wave Count", 16, "Shockwave count when Mithrix lands after a jump. Vanilla: 12", 12f, 24f); ShardHoming = UMConfig.BindOptionSteppedSlider("Skill Mods", "Shard Homing", 25f, 5f, "How strongly lunar shards home in to targets. Vanilla: 20", 10f, 60f); ShardRange = UMConfig.BindOptionSteppedSlider("Skill Mods", "Shard Range", 100f, 10f, "Range (distance) in which shards look for targets. Vanilla: 80", 80f, 160f); ShardCone = UMConfig.BindOptionSteppedSlider("Skill Mods", "Shard Cone", 120f, 10f, "Cone (Angle) in which shards look for targets. Vanilla: 90", 90f, 180f); WipeConfig(); } private static void WipeConfig() { ((Dictionary)typeof(ConfigFile).GetProperty("OrphanedEntries", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(UMConfig)).Clear(); UMConfig.Save(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void InitRoO() { //IL_0053: 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_005f: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown try { ModSettingsManager.SetModDescription("Umbral Mithrix", "com.Nuxlar.UmbralMithrix", "UmbralMithrix"); string directoryName = Path.GetDirectoryName(((BaseUnityPlugin)UmbralMithrix.Instance).Info.Location); byte[] array = File.ReadAllBytes(Path.Combine(directoryName.Substring(0, directoryName.Length - 21), "icon.png")); Texture2D val = new Texture2D(256, 256); ImageConversion.LoadImage(val, array); ModSettingsManager.SetModIcon(Sprite.Create(val, new Rect(0f, 0f, 256f, 256f), new Vector2(0.5f, 0.5f)), "com.Nuxlar.UmbralMithrix", "UmbralMithrix"); } catch (Exception) { } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static ConfigEntry BindOption(this ConfigFile myConfig, string section, string name, T defaultValue, string description = "", bool restartRequired = true) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown if ((defaultValue is int || defaultValue is float) ? true : false) { return myConfig.BindOptionSlider(section, name, defaultValue, description, 0f, 20f, restartRequired); } if (string.IsNullOrEmpty(description)) { description = name; } if (restartRequired) { description += " (restart required)"; } ConfigEntry val = myConfig.Bind(section, name, defaultValue, new ConfigDescription(description, (AcceptableValueBase)null, Array.Empty())); if (UmbralMithrix.RooInstalled) { TryRegisterOption(val, restartRequired); } return val; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static ConfigEntry BindOptionSlider(this ConfigFile myConfig, string section, string name, T defaultValue, string description = "", float min = 0f, float max = 20f, bool restartRequired = true) { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown if (!(defaultValue is int) && !(defaultValue is float)) { return myConfig.BindOption(section, name, defaultValue, description, restartRequired); } if (string.IsNullOrEmpty(description)) { description = name; } string text = description; T val = defaultValue; description = text + " (Default: " + val?.ToString() + ")"; if (restartRequired) { description += " (restart required)"; } AcceptableValueBase val2 = (AcceptableValueBase)((typeof(T) == typeof(int)) ? ((object)new AcceptableValueRange((int)min, (int)max)) : ((object)new AcceptableValueRange(min, max))); ConfigEntry val3 = myConfig.Bind(section, name, defaultValue, new ConfigDescription(description, val2, Array.Empty())); if (UmbralMithrix.RooInstalled) { TryRegisterOptionSlider(val3, min, max, restartRequired); } return val3; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static ConfigEntry BindOptionSteppedSlider(this ConfigFile myConfig, string section, string name, T defaultValue, float increment = 1f, string description = "", float min = 0f, float max = 20f, bool restartRequired = true) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown if (string.IsNullOrEmpty(description)) { description = name; } string text = description; T val = defaultValue; description = text + " (Default: " + val?.ToString() + ")"; if (restartRequired) { description += " (restart required)"; } ConfigEntry val2 = myConfig.Bind(section, name, defaultValue, new ConfigDescription(description, (AcceptableValueBase)(object)new AcceptableValueRange(min, max), Array.Empty())); if (UmbralMithrix.RooInstalled) { TryRegisterOptionSteppedSlider(val2, increment, min, max, restartRequired); } return val2; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void TryRegisterOption(ConfigEntry entry, bool restartRequired) { //IL_000b: 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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown if (entry is ConfigEntry val) { ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(val, new InputFieldConfig { submitOn = (SubmitEnum)6, restartRequired = restartRequired }), "com.Nuxlar.UmbralMithrix", "UmbralMithrix"); } else if (entry is ConfigEntry val2) { ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(val2, restartRequired), "com.Nuxlar.UmbralMithrix", "UmbralMithrix"); } else if (entry is ConfigEntry val3) { ModSettingsManager.AddOption((BaseOption)new KeyBindOption(val3, restartRequired), "com.Nuxlar.UmbralMithrix", "UmbralMithrix"); } else if (typeof(T).IsEnum) { ModSettingsManager.AddOption((BaseOption)new ChoiceOption((ConfigEntryBase)(object)entry, restartRequired), "com.Nuxlar.UmbralMithrix", "UmbralMithrix"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void TryRegisterOptionSlider(ConfigEntry entry, float min, float max, bool restartRequired) { //IL_000b: 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_0018: 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_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown if (entry is ConfigEntry val) { ModSettingsManager.AddOption((BaseOption)new IntSliderOption(val, new IntSliderConfig { min = (int)min, max = (int)max, formatString = "{0:0.00}", restartRequired = restartRequired }), "com.Nuxlar.UmbralMithrix", "UmbralMithrix"); } else if (entry is ConfigEntry val2) { ModSettingsManager.AddOption((BaseOption)new SliderOption(val2, new SliderConfig { min = min, max = max, FormatString = "{0:0.00}", restartRequired = restartRequired }), "com.Nuxlar.UmbralMithrix", "UmbralMithrix"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void TryRegisterOptionSteppedSlider(ConfigEntry entry, float increment, float min, float max, bool restartRequired) { //IL_000b: 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_0017: 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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown if (entry is ConfigEntry val) { ModSettingsManager.AddOption((BaseOption)new StepSliderOption(val, new StepSliderConfig { increment = increment, min = min, max = max, FormatString = "{0:0.00}", restartRequired = restartRequired }), "com.Nuxlar.UmbralMithrix", "UmbralMithrix"); } } } [BepInPlugin("com.Nuxlar.UmbralMithrix", "UmbralMithrix", "2.5.21")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInIncompatibility("com.Blobface.ArtifactKing")] [BepInIncompatibility("com.RiskyLives.RiskyMithrix")] public class UmbralMithrix : BaseUnityPlugin { public const string PluginGUID = "com.Nuxlar.UmbralMithrix"; public const string PluginAuthor = "Nuxlar"; public const string PluginName = "UmbralMithrix"; public const string PluginVersion = "2.5.21"; public static Dictionary p23PizzaPoints = new Dictionary { { 0, new Vector3(13.5f, 489.7f, -107f) }, { 1, new Vector3(-189f, 489.7f, 107f) }, { 2, new Vector3(16.7f, 489.7f, 101f) }, { 3, new Vector3(-196f, 489.7f, -101f) } }; public static ItemDef UmbralItem; public static GameObject umbralSlamImpact; public static GameObject umbralSlamProjectile; public static GameObject umbralSlamPillar; public static GameObject umbralSlamHitEffect; public static NetworkSoundEventDef umbralSlamHitSound; public static GameObject umbralLeapWave; public static GameObject umbralSwingEffect; public static GameObject umbralUltMuzzleFlash; public static GameObject leapIndicatorPrefab; public static GameObject leapIndicator; public static GameObject timeCrystal; public static GameObject lunarMissile; public static GameObject mithrixHurtP3Master; public static GameObject mithrix; public static GameObject mithrixHurtP3; public static GameObject mithrixHurt; public static SpawnCard mithrixCard; public static SpawnCard mithrixHurtCard; public static GameObject mithrixGlass; public static SpawnCard mithrixGlassCard; public static GameObject leftP4Line; public static GameObject rightP4Line; public static GameObject leftUltLine; public static GameObject rightUltLine; public static GameObject staticUltLine; public static GameObject shardProjectile; public static GameObject cloneTrackingOrb; public static Material preBossMat; public static Material arenaWallMat; public static Material stealAuraMat; public static Material moonMat; public static Material doppelMat; public static GameObject youngTeleporter; public static Transform practiceFire; public static GameObject implodeEffect; public static GameObject tether; public static GameObject voidling; public static SpawnCard mithrixHurtP3Card = (SpawnCard)(object)ScriptableObject.CreateInstance(); private static SkillDef shardDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/FireLunarShards.asset").WaitForCompletion(); private static SkillDef slamDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/WeaponSlam.asset").WaitForCompletion(); private static SkillDef bashDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/SprintBash.asset").WaitForCompletion(); private static SkillDef leapDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/SkyLeap.asset").WaitForCompletion(); public static SkillDef ultDef = Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/Ult.asset").WaitForCompletion(); internal static UmbralMithrix Instance { get; private set; } public static bool RooInstalled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); public void Awake() { //IL_0037: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_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_009b: 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) Instance = this; Log.Init(((BaseUnityPlugin)this).Logger); ModConfig.Init(); LoadAssets(); CloneAssets(); SetupVoidling(); shardDef.activationState = new SerializableEntityStateType(typeof(FireUmbralShards)); slamDef.activationState = new SerializableEntityStateType(typeof(UmbralHammerSlam)); bashDef.activationState = new SerializableEntityStateType(typeof(UmbralBash)); leapDef.activationState = new SerializableEntityStateType(typeof(EnterUmbralLeap)); ultDef.activationState = new SerializableEntityStateType(typeof(EnterUmbralUlt)); CreateDoppelItem(); AddEntityStates(); ChangeVanillaEntityStateValues(); new MiscHooks(); new MissionHooks(); new MithrixMiscHooks(); LanguageManager.Register(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location)); } private void ChangeVanillaEntityStateValues() { SetVanillaEntityStateField(RoR2_Base_Brother.EntityStates_BrotherMonster_FistSlam_asset, "healthCostFraction", "0"); SetVanillaEntityStateField(RoR2_Base_Brother.EntityStates_BrotherMonster_SpellChannelEnterState_asset, "duration", "5"); SetVanillaEntityStateField(RoR2_Base_Brother.EntityStates_BrotherMonster_SpellChannelState_asset, "stealInterval", "0"); } public static void ArenaSetup() { GameObject val = GameObject.Find("HOLDER: Final Arena"); if (Object.op_Implicit((Object)(object)val)) { Transform val2 = val.transform.Find("Columns_Inner"); if (Object.op_Implicit((Object)(object)val2)) { ((Component)val2).gameObject.SetActive(false); } Transform val3 = val.transform.Find("Rocks"); if (Object.op_Implicit((Object)(object)val3)) { ((Component)val3).gameObject.SetActive(false); } } SceneInfo instance = SceneInfo.instance; if (!Object.op_Implicit((Object)(object)instance)) { return; } Transform val4 = ((Component)instance).transform.Find("BrotherMissionController"); if (Object.op_Implicit((Object)(object)val4) && NetworkServer.active) { ((Component)val4).gameObject.AddComponent(); Log.Info("Added UmbralMissionController", "C:\\Users\\romym\\OneDrive\\Desktop\\RoR2Mods\\UmbralMithrix\\UmbralMithrix\\UmbralMithrix.cs", "ArenaSetup", 172); } Transform val5 = ((Component)instance).transform.Find("BrotherMissionController/BrotherEncounter, Phase 1/PhaseObjects/mdlBrotherThrone"); if (Object.op_Implicit((Object)(object)val5)) { ((Component)val5).gameObject.SetActive(true); } Transform val6 = ((Component)instance).transform.Find("BrotherMissionController/BrotherEncounter, Phase 2"); if (Object.op_Implicit((Object)(object)val6)) { ScriptedCombatEncounter component = ((Component)val6).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.grantUniqueBonusScaling = true; } } } public static void SpawnPracticeModeShrine() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_008c: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(youngTeleporter, new Vector3(1090.1f, -283.1f, 1138.6f), Quaternion.identity); GameObject obj = Object.Instantiate(((Component)practiceFire).gameObject, new Vector3(1090.1f, -283.1f, 1138.6f), Quaternion.identity); val.GetComponent().NetworkcontextToken = "UMBRAL_PRACTICE_MODE_CONTEXT"; ((Object)val).name = "PracticeModeShrine"; obj.transform.parent = val.transform; obj.transform.localPosition = new Vector3(0f, 0f, 0f); NetworkServer.Spawn(val); } private void AddEntityStates() { //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_0012: 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_0022: 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_0032: 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_0042: Unknown result type (might be due to invalid IL or missing references) bool flag = default(bool); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); } private void CreateDoppelItem() { //IL_001f: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) UmbralItem = ScriptableObject.CreateInstance(); ((Object)UmbralItem).name = "UmbralMithrixUmbralItem"; UmbralItem.deprecatedTier = (ItemTier)3; ItemDef umbralItem = UmbralItem; ItemTag[] array = new ItemTag[4]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); umbralItem.tags = (ItemTag[])(object)array; UmbralItem.nameToken = "UMBRALMITHRIX_UMBRAL_ITEM_NAME"; UmbralItem.pickupToken = "UMBRALMITHRIX_UMBRAL_ITEM_PICKUP"; UmbralItem.descriptionToken = "UMBRALMITHRIX_UMBRAL_ITEM_DESC"; UmbralItem.loreToken = "UMBRALMITHRIX_UMBRAL_ITEM_LORE"; UmbralItem.pickupIconSprite = Addressables.LoadAssetAsync((object)"RoR2/Base/TeamDeath/texArtifactDeathDisabled.png").WaitForCompletion(); UmbralItem.pickupModelPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/TeamDeath/PickupTeamDeath.prefab").WaitForCompletion(), "PickupUmbralCore", false); Material material = Addressables.LoadAssetAsync((object)"RoR2/Base/InvadingDoppelganger/matDoppelganger.mat").WaitForCompletion(); Renderer[] componentsInChildren = UmbralItem.pickupModelPrefab.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].material = material; } ContentAddition.AddItemDef(UmbralItem); } public static void SetVanillaEntityStateField(string fullEntityStatePath, string fieldName, string value) { //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) AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(fullEntityStatePath), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { EntityStateConfiguration result = x.Result; for (int i = 0; i < result.serializedFieldsCollection.serializedFields.Length; i++) { if (result.serializedFieldsCollection.serializedFields[i].fieldName == fieldName) { result.serializedFieldsCollection.serializedFields[i].fieldValue.stringValue = value; } } }; } private void SetupVoidling() { //IL_000b: 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) AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC1_VoidRaidCrab.MiniVoidRaidCrabBodyPhase3_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { voidling = PrefabAPI.InstantiateClone(x.Result, "InactiveVoidling"); ModelLocator val2 = default(ModelLocator); if (voidling.TryGetComponent(ref val2)) { Transform modelTransform = val2.modelTransform; if (Object.op_Implicit((Object)(object)modelTransform)) { ((Component)modelTransform).gameObject.SetActive(false); } } SphereZone component = voidling.GetComponent(); component.radius = 275f; if (Object.op_Implicit((Object)(object)component.rangeIndicator)) { MeshRenderer componentInChildren = ((Component)component.rangeIndicator).GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { ((Renderer)componentInChildren).sharedMaterials = (Material[])(object)new Material[3] { preBossMat, arenaWallMat, stealAuraMat }; } } FogDamageController component2 = voidling.GetComponent(); component2.healthFractionPerSecond = 0.01f; component2.healthFractionRampCoefficientPerSecond = 2.5f; }; } private void CloneAssets() { //IL_000b: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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_0123: 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_015a: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: 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) AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_LunarWisp.LunarWispTrackingBomb_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { cloneTrackingOrb = PrefabAPI.InstantiateClone(x.Result, "UmbralTrackingOrb"); cloneTrackingOrb.AddComponent(); ContentAddition.AddProjectile(cloneTrackingOrb); }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.BrotherUltLineProjectileRotateLeft_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { GameObject result2 = x.Result; leftUltLine = PrefabAPI.InstantiateClone(result2, "UmbralUltLineLeft"); leftP4Line = PrefabAPI.InstantiateClone(result2, "P4UltLineLeft"); staticUltLine = PrefabAPI.InstantiateClone(result2, "StaticUltLine"); Object.Destroy((Object)(object)staticUltLine.GetComponent()); RotateAroundAxis component5 = leftUltLine.GetComponent(); component5.fastRotationSpeed = 21f; component5.slowRotationSpeed = 21f; RotateAroundAxis component6 = leftP4Line.GetComponent(); component6.fastRotationSpeed = 10f; component6.slowRotationSpeed = 10f; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.BrotherUltLineProjectileRotateRight_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { GameObject result = x.Result; rightUltLine = PrefabAPI.InstantiateClone(result, "UmbralUltLineRight"); rightP4Line = PrefabAPI.InstantiateClone(result, "P4UltLineRight"); RotateAroundAxis component3 = rightUltLine.GetComponent(); component3.fastRotationSpeed = 21f; component3.slowRotationSpeed = 21f; RotateAroundAxis component4 = rightP4Line.GetComponent(); component4.fastRotationSpeed = 10f; component4.slowRotationSpeed = 10f; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.BrotherHurtBody_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Expected O, but got Unknown //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown mithrixHurtP3 = PrefabAPI.InstantiateClone(x.Result, "BrotherHurtBodyP3"); mithrixHurtP3.GetComponent().initialStateType = new SerializableEntityStateType(typeof(StaggerEnter)); CharacterBody component = mithrixHurtP3.GetComponent(); ModelLocator val2 = default(ModelLocator); if (mithrixHurtP3.TryGetComponent(ref val2)) { Transform modelTransform = val2.modelTransform; if (Object.op_Implicit((Object)(object)modelTransform)) { Object.Destroy((Object)(object)((Component)modelTransform).GetComponent()); } } component.baseNameToken = "UMBRALMITHRIX_UMBRAL_BODY_NAME"; component.subtitleNameToken = "UMBRALMITHRIX_UMBRAL_BODY_SUBTITLE"; component.bodyFlags = (BodyFlags)(component.bodyFlags | 0x10); component.baseMaxHealth = ModConfig.basehealth.Value; component.levelMaxHealth = ModConfig.levelhealth.Value; component.baseDamage = ModConfig.basedamage.Value / 2f; component.levelDamage = ModConfig.leveldamage.Value / 2f; ContentAddition.AddBody(mithrixHurtP3); mithrixHurt = x.Result; mithrixHurt.AddComponent(); Object.Destroy((Object)(object)mithrixHurt.GetComponent()); Object.Destroy((Object)(object)mithrixHurt.GetComponent()); Object.Destroy((Object)(object)mithrixHurt.GetComponent()); CharacterBody component2 = mithrixHurt.GetComponent(); component2.baseNameToken = "UMBRALMITHRIX_UMBRAL_BODY_NAME"; component2.subtitleNameToken = "UMBRALMITHRIX_UMBRAL_BODY_SUBTITLE"; component2.baseDamage = ModConfig.basedamage.Value; component2.levelDamage = ModConfig.leveldamage.Value; component2.levelMoveSpeed = 0f; component2.baseMoveSpeed = 0f; component2.baseAcceleration = 0f; component2.mainRootSpeed = 0f; ((Component)component2).GetComponent().primary = new GenericSkill(); ((Component)component2).GetComponent().secondary = new GenericSkill(); }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.BrotherHurtMaster_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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) mithrixHurtP3Master = PrefabAPI.InstantiateClone(x.Result, "BrotherHurtMasterP3"); mithrixHurtP3Master.GetComponent().bodyPrefab = mithrixHurtP3; ((Object)mithrixHurtP3Card).name = "cscBrotherHurtP3"; mithrixHurtP3Card.prefab = mithrixHurtP3Master; mithrixHurtP3Card.hullSize = mithrixHurtCard.hullSize; mithrixHurtP3Card.nodeGraphType = mithrixHurtCard.nodeGraphType; mithrixHurtP3Card.requiredFlags = mithrixHurtCard.requiredFlags; mithrixHurtP3Card.forbiddenFlags = mithrixHurtCard.forbiddenFlags; ContentAddition.AddMaster(mithrixHurtP3Master); }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_bazaar.Bazaar_Light_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { practiceFire = PrefabAPI.InstantiateClone(((Component)x.Result.transform.Find("FireLODLevel")).gameObject, "PracticeFire").transform; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_EliteLunar.LunarMissileProjectile_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { lunarMissile = PrefabAPI.InstantiateClone(x.Result, "UmbralLunarMissile", false); }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Vagrant.VagrantNovaAreaIndicator_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { leapIndicatorPrefab = PrefabAPI.InstantiateClone(x.Result, "UmbralLeapIndicator"); leapIndicatorPrefab.AddComponent(); }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.BrotherSunderWave_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { umbralLeapWave = PrefabAPI.InstantiateClone(x.Result, "UmbralLeapWave"); }; } private void LoadAssets() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0200: 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_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Unknown result type (might be due to invalid IL or missing references) //IL_0523: Unknown result type (might be due to invalid IL or missing references) //IL_0556: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Junk.YoungTeleporter_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { youngTeleporter = x.Result; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_DLC1_EliteEarth.AffixEarthTetherVFX_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { tether = x.Result; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Vagrant.VagrantNovaExplosion_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { implodeEffect = x.Result; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.BrotherSlamImpact_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { umbralSlamImpact = x.Result; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.BrotherSunderWave__Energized_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { umbralSlamProjectile = x.Result; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.BrotherFirePillar_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { umbralSlamPillar = x.Result; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Huntress.OmniImpactVFXHuntress_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { umbralSlamHitEffect = x.Result; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.BrotherSwing1__Kickup_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { umbralSwingEffect = x.Result; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.ItemStealEndMuzzleflash_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { umbralUltMuzzleFlash = x.Result; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.BrotherMaster_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { GameObject result = x.Result; (from x in result.GetComponents() where x.customName == "CastUlt" select x).First().requiredSkill = null; (from x in result.GetComponents() where x.customName == "Sprint and FireLunarShards" select x).First().minDistance = 20f; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.BrotherBody_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) mithrix = x.Result; CharacterBody component8 = mithrix.GetComponent(); CharacterDirection component9 = mithrix.GetComponent(); CharacterMotor component10 = mithrix.GetComponent(); component8.baseNameToken = "UMBRALMITHRIX_UMBRAL_BODY_NAME"; component8.subtitleNameToken = "UMBRALMITHRIX_UMBRAL_BODY_SUBTITLE"; component8.bodyFlags = (BodyFlags)(component8.bodyFlags | 0x10); component8.baseMaxHealth = ModConfig.basehealth.Value; component8.levelMaxHealth = ModConfig.levelhealth.Value; component8.baseDamage = ModConfig.basedamage.Value; component8.levelDamage = ModConfig.leveldamage.Value; component8.baseAttackSpeed = ModConfig.baseattackspeed.Value; component8.baseMoveSpeed = ModConfig.basespeed.Value; component8.baseAcceleration = ModConfig.acceleration.Value; component8.baseJumpPower = ModConfig.jumpingpower.Value; component8.baseArmor = ModConfig.basearmor.Value; component9.turnSpeed = ModConfig.turningspeed.Value; component10.mass = ModConfig.mass.Value; component10.airControl = ModConfig.aircontrol.Value; SkillLocator component11 = mithrix.GetComponent(); SkillDef skillDef = component11.primary.skillFamily.variants[0].skillDef; skillDef.baseRechargeInterval = ModConfig.PrimCD.Value; skillDef.baseMaxStock = ModConfig.PrimStocks.Value; SkillDef skillDef2 = component11.secondary.skillFamily.variants[0].skillDef; skillDef2.baseRechargeInterval = ModConfig.SecCD.Value; skillDef2.baseMaxStock = ModConfig.SecStocks.Value; SkillDef skillDef3 = component11.utility.skillFamily.variants[0].skillDef; skillDef3.baseMaxStock = ModConfig.UtilStocks.Value; skillDef3.baseRechargeInterval = ModConfig.UtilCD.Value; component11.special.skillFamily.variants[0].skillDef.baseRechargeInterval = ModConfig.SpecialCD.Value; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Junk_BrotherGlass.BrotherGlassMaster_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { foreach (AISkillDriver item3 in x.Result.GetComponents().ToList()) { if (item3.customName == "CastUlt") { item3.requiredSkill = null; } } }; AssetReferenceT originalSkinRef = new AssetReferenceT(RoR2_Base_Brother.skinBrotherBodyDefault_asset); SkinDef originalSkin = AssetAsyncReferenceManager.LoadAsset(originalSkinRef, (AsyncReferenceHandleUnloadType)2).WaitForCompletion(); val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Junk_BrotherGlass.BrotherGlassBody_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) mithrixGlass = x.Result; mithrixGlass.GetComponent().initialStateType = new SerializableEntityStateType(typeof(GlassSpawnState)); CharacterBody component2 = mithrixGlass.GetComponent(); CharacterDirection component3 = mithrixGlass.GetComponent(); CharacterMotor component4 = mithrixGlass.GetComponent(); component2.baseMaxHealth = ModConfig.basehealth.Value; component2.levelMaxHealth = ModConfig.levelhealth.Value; component2.baseDamage = ModConfig.basedamage.Value / 2f; component2.levelDamage = ModConfig.leveldamage.Value / 2f; component4.airControl = ModConfig.aircontrol.Value; component3.turnSpeed = ModConfig.turningspeed.Value; SkillDef val6 = ScriptableObject.CreateInstance(); val6.skillName = "UmbralOrb"; ((Object)val6).name = "UmbralOrb"; val6.activationState = new SerializableEntityStateType(typeof(GlassOrbAttack)); val6.activationStateMachineName = "Body"; val6.interruptPriority = (InterruptPriority)2; val6.baseMaxStock = 1; val6.baseRechargeInterval = 6f; val6.rechargeStock = 1; val6.requiredStock = 1; val6.stockToConsume = 1; val6.dontAllowPastMaxStocks = true; val6.beginSkillCooldownOnSkillEnd = false; val6.canceledFromSprinting = true; val6.forceSprintDuringState = false; val6.fullRestockOnAssign = true; val6.resetCooldownTimerOnUse = true; val6.isCombatSkill = true; val6.mustKeyPress = false; val6.cancelSprintingOnActivation = true; SkillFamily val7 = ScriptableObject.CreateInstance(); ((Object)val7).name = "UmbralGlassPrimaryFamily"; val7.variants = (Variant[])(object)new Variant[1] { new Variant { skillDef = val6 } }; GenericSkill val8 = mithrixGlass.AddComponent(); val8._skillFamily = val7; mithrixGlass.GetComponent().special = val8; ContentAddition.AddSkillFamily(val7); ContentAddition.AddSkillDef(val6); RoR2Application.onNextUpdate += delegate { //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: 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) //IL_0310: 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_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) Transform val9 = null; ModelLocator val10 = default(ModelLocator); if (Object.op_Implicit((Object)(object)mithrixGlass) && mithrixGlass.TryGetComponent(ref val10)) { val9 = val10.modelTransform; } if (Object.op_Implicit((Object)(object)val9)) { ModelSkinController val11 = UnityObjectExtensions.EnsureComponent(((Component)val9).gameObject); ModelSkinController val12 = val11; if (val12.skins == null) { val12.skins = Array.Empty(); } int num = Array.IndexOf(val11.skins, originalSkin); SkinDef val13 = Object.Instantiate(originalSkin); ((Object)val13).name = "skinBrotherGlassBodyDefault"; Transform transform = val13.rootObject.transform; val13.rootObject = ((Component)val9).gameObject; ValueTuple, SkinDefParams> skinParams = val13.GetSkinParams(); AssetReferenceT item = skinParams.Item1; SkinDefParams item2 = skinParams.Item2; AssetOrDirectReference val14 = new AssetOrDirectReference { address = item, directRef = item2 }; SkinDefParams val15 = Object.Instantiate(val14.WaitForCompletion()); ((Object)val15).name = ((Object)val13).name + "_params"; val13.skinDefParams = val15; val13.skinDefParamsAddress = new AssetReferenceT(string.Empty); val13.optimizedSkinDefParams = val15; val13.optimizedSkinDefParamsAddress = new AssetReferenceT(string.Empty); RendererInfo[] rendererInfos = val15.rendererInfos; List list = new List(rendererInfos.Length); list.AddRange(rendererInfos); List list2 = list; GameObjectActivation[] gameObjectActivations = val15.gameObjectActivations; List list3 = new List(gameObjectActivations.Length); list3.AddRange(gameObjectActivations); List list4 = list3; MeshReplacement[] meshReplacements = val15.meshReplacements; List list5 = new List(meshReplacements.Length); list5.AddRange(meshReplacements); List list6 = list5; LightInfo[] lightReplacements = val15.lightReplacements; List list7 = new List(lightReplacements.Length); list7.AddRange(lightReplacements); List list8 = list7; for (int num2 = list2.Count - 1; num2 >= 0; num2--) { RendererInfo val16 = list2[num2]; Renderer renderer = val16.renderer; val16.renderer = null; if (Object.op_Implicit((Object)(object)renderer) && ((Component)renderer).transform.IsChildOf(transform)) { string text = Util.BuildPrefabTransformPath(transform, ((Component)renderer).transform, false, false); if (!string.IsNullOrEmpty(text)) { Transform val17 = val9.Find(text); if (Object.op_Implicit((Object)(object)val17)) { Component component5 = ((Component)val17).GetComponent(((object)renderer).GetType()); val16.renderer = (Renderer)(object)((component5 is Renderer) ? component5 : null); } } } if (Object.op_Implicit((Object)(object)val16.renderer)) { string name = ((Object)val16.renderer).name; if (name == "BrotherHammerConcrete" || name == "BrotherBodyMesh") { val16.defaultMaterial = null; val16.defaultMaterialAddress = new AssetReferenceT(RoR2_Base_Brother.maBrotherGlassOverlay_mat); } list2[num2] = val16; } else { list2.RemoveAt(num2); } } for (int num3 = list4.Count - 1; num3 >= 0; num3--) { GameObjectActivation val18 = list4[num3]; GameObject gameObject = val18.gameObject; val18.gameObject = null; if (Object.op_Implicit((Object)(object)gameObject) && gameObject.transform.IsChildOf(transform)) { string text2 = Util.BuildPrefabTransformPath(transform, gameObject.transform, false, false); if (!string.IsNullOrEmpty(text2)) { Transform val19 = val9.Find(text2); if (Object.op_Implicit((Object)(object)val19)) { val18.gameObject = ((Component)val19).gameObject; } } } if (Object.op_Implicit((Object)(object)val18.gameObject)) { list4[num3] = val18; } else { list4.RemoveAt(num3); } } for (int num4 = list6.Count - 1; num4 >= 0; num4--) { MeshReplacement val20 = list6[num4]; Renderer renderer2 = val20.renderer; val20.renderer = null; if (Object.op_Implicit((Object)(object)renderer2) && ((Component)renderer2).transform.IsChildOf(transform)) { string text3 = Util.BuildPrefabTransformPath(transform, ((Component)renderer2).transform, false, false); if (!string.IsNullOrEmpty(text3)) { Transform val21 = val9.Find(text3); if (Object.op_Implicit((Object)(object)val21)) { Component component6 = ((Component)val21).GetComponent(((object)renderer2).GetType()); val20.renderer = (Renderer)(object)((component6 is Renderer) ? component6 : null); } } } if (Object.op_Implicit((Object)(object)val20.renderer)) { list6[num4] = val20; } else { list6.RemoveAt(num4); } } for (int num5 = list8.Count - 1; num5 >= 0; num5--) { LightInfo val22 = list8[num5]; Light light = val22.light; val22.light = null; if (Object.op_Implicit((Object)(object)light) && ((Component)light).transform.IsChildOf(transform)) { string text4 = Util.BuildPrefabTransformPath(transform, ((Component)light).transform, false, false); if (!string.IsNullOrEmpty(text4)) { Transform val23 = val9.Find(text4); if (Object.op_Implicit((Object)(object)val23)) { Component component7 = ((Component)val23).GetComponent(((object)light).GetType()); val22.light = (Light)(object)((component7 is Light) ? component7 : null); } } } if (Object.op_Implicit((Object)(object)val22.light)) { list8[num5] = val22; } else { list8.RemoveAt(num5); } } val15.rendererInfos = list2.ToArray(); val15.gameObjectActivations = list4.ToArray(); val15.meshReplacements = list6.ToArray(); val15.lightReplacements = list8.ToArray(); if (ArrayUtils.IsInBounds(val11.skins, num)) { val11.skins[num] = val13; } else { ArrayUtils.ArrayAppend(ref val11.skins, ref val13); } UnityObjectExtensions.EnsureComponent(((Component)val9).gameObject).OverlayMaterialReference = new AssetReferenceT(RoR2_Base_Brother.matBrotherGlassDistortion_mat); val14.Reset(); AssetAsyncReferenceManager.UnloadAsset(originalSkinRef); } }; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.LunarShardProjectile_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { shardProjectile = x.Result; shardProjectile.GetComponent().rotationSpeed = ModConfig.ShardHoming.Value; ProjectileDirectionalTargetFinder component = shardProjectile.GetComponent(); component.lookRange = ModConfig.ShardRange.Value; component.lookCone = ModConfig.ShardCone.Value; component.allowTargetLoss = true; }; val = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_WeeklyRun.TimeCrystalBody_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle x) { timeCrystal = PrefabAPI.InstantiateClone(x.Result, "UmbralCrystal"); timeCrystal.AddComponent(); }; AsyncOperationHandle val2 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.cscBrother_asset), (AsyncReferenceHandleUnloadType)2); val2.Completed += delegate(AsyncOperationHandle x) { mithrixCard = x.Result; }; val2 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.cscBrotherHurt_asset), (AsyncReferenceHandleUnloadType)2); val2.Completed += delegate(AsyncOperationHandle x) { mithrixHurtCard = x.Result; }; val2 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Junk_BrotherGlass.cscBrotherGlass_asset), (AsyncReferenceHandleUnloadType)2); val2.Completed += delegate(AsyncOperationHandle x) { mithrixGlassCard = x.Result; }; AsyncOperationHandle val3 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.matBrotherPreBossSphere_mat), (AsyncReferenceHandleUnloadType)2); val3.Completed += delegate(AsyncOperationHandle x) { preBossMat = x.Result; }; val3 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_moon.matMoonArenaWall_mat), (AsyncReferenceHandleUnloadType)2); val3.Completed += delegate(AsyncOperationHandle x) { arenaWallMat = x.Result; }; val3 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.matBrotherStealAura_mat), (AsyncReferenceHandleUnloadType)2); val3.Completed += delegate(AsyncOperationHandle x) { stealAuraMat = x.Result; }; val3 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_moon.matMoonBridge_mat), (AsyncReferenceHandleUnloadType)2); val3.Completed += delegate(AsyncOperationHandle x) { moonMat = x.Result; }; val3 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_InvadingDoppelganger.matDoppelganger_mat), (AsyncReferenceHandleUnloadType)2); val3.Completed += delegate(AsyncOperationHandle x) { doppelMat = x.Result; }; AsyncOperationHandle val4 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Croco.nseAcridBiteHit_asset), (AsyncReferenceHandleUnloadType)2); val4.Completed += delegate(AsyncOperationHandle x) { umbralSlamHitSound = x.Result; }; AsyncOperationHandle val5 = AssetAsyncReferenceManager.LoadAsset(new AssetReferenceT(RoR2_Base_Brother.FireLunarShards_asset), (AsyncReferenceHandleUnloadType)2); val5.Completed += delegate(AsyncOperationHandle x) { x.Result.baseMaxStock = 6; }; } } } namespace UmbralMithrix.EntityStates { public class GlassOrbAttack : BaseState { public static float duration = 0.2f; public static float waitDuration = 2f; public static float damageCoefficient = 3.75f; public static float force = 1000f; public static string soundString = "Play_moonBrother_blueWall_slam_start"; public static GameObject projectilePrefab = UmbralMithrix.cloneTrackingOrb; public static GameObject muzzleFlashEffect = UmbralMithrix.umbralUltMuzzleFlash; public override void OnEnter() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).PlayCrossfade("Body", "UltEnter", "Ult.playbackRate", duration, 0.1f); Util.PlaySound(soundString, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); EffectManager.SimpleMuzzleFlash(muzzleFlashEffect, ((EntityState)this).gameObject, "MuzzleUlt", false); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * damageCoefficient, force, Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, 0f, (DamageTypeCombo?)null); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!((double)((EntityState)this).fixedAge <= (double)waitDuration)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class GlassOrbAttackExit : BaseState { public static float duration = 1f; private static int exitStateHash = Animator.StringToHash("UltExit"); private static int exitParamHash = Animator.StringToHash("Ult.playbackRate"); public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Body", exitStateHash, exitParamHash, duration); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!((double)((EntityState)this).fixedAge <= (double)duration)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } public class GlassSpawnState : BaseState { public static float duration; public static string spawnSoundString; public static float spawnEffectsDelay; private bool spawnEffectsTriggered; public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlaySound(SpawnState.spawnSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= SpawnState.spawnEffectsDelay && !spawnEffectsTriggered) { spawnEffectsTriggered = true; EffectManager.SimpleMuzzleFlash(SpawnState.spawnEffectPrefab, ((EntityState)this).gameObject, "MuzzleCenter", false); } if (((EntityState)this).fixedAge >= SpawnState.duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class ChannelUmbralUlt : BaseState { public static GameObject waveProjectileLeftPrefab = UmbralMithrix.leftUltLine; public static GameObject waveProjectileRightPrefab = UmbralMithrix.rightUltLine; public static int waveProjectileCount = ModConfig.UltimateWaves.Value; public static float waveProjectileDamageCoefficient = 9f; public static float waveProjectileForce = 300f; public static int totalWaves = ModConfig.UltimateCount.Value; public static float maxDuration = ModConfig.UltimateDuration.Value; public static GameObject channelBeginMuzzleflashEffectPrefab = UmbralMithrix.umbralUltMuzzleFlash; public static GameObject channelEffectPrefab; public static string enterSoundString = "Play_moonBrother_blueWall_active_loop"; public static string exitSoundString = "Stop_moonBrother_blueWall_active_loop"; private GameObject channelEffectInstance; public static SkillDef replacementSkillDef = UmbralMithrix.ultDef; private int wavesFired; public override void OnEnter() { //IL_003e: 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) ((BaseState)this).OnEnter(); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); Transform val = ((BaseState)this).FindModelChild("MuzzleUlt"); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)channelEffectPrefab)) { channelEffectInstance = Object.Instantiate(channelEffectPrefab, val.position, Quaternion.identity, val); } if (Object.op_Implicit((Object)(object)channelBeginMuzzleflashEffectPrefab)) { EffectManager.SimpleMuzzleFlash(channelBeginMuzzleflashEffectPrefab, ((EntityState)this).gameObject, "MuzzleUlt", false); } } private void FireWave() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Invalid comparison between Unknown and I4 //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_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_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) wavesFired++; float num = 360f / (float)ModConfig.UltimateWaves.Value; if (!Object.op_Implicit((Object)(object)PhaseCounter.instance)) { return; } List list = new List(); foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList) { if ((int)readOnlyInstances.teamIndex == 1) { CharacterBody body = readOnlyInstances.GetBody(); if (Object.op_Implicit((Object)(object)body) && body.isPlayerControlled) { list.Add(body); } } } Vector3 val2; if (PhaseCounter.instance.phase == 2 && list.Count > 0) { float num2 = 50f; Vector3 val = Vector3.ProjectOnPlane(((EntityState)this).inputBank.aimDirection, Vector3.up); val2 = list[Random.Range(0, list.Count)].footPosition; val2.y = 491f; Vector3 val3 = val2; Vector3 val4 = val3 + new Vector3(0f - num2, 0f, 0f - num2); Vector3 val5 = val3 + new Vector3(num2, 0f, 0f - num2); Vector3 val6 = val3 + new Vector3(0f - num2, 0f, num2); Vector3 val7 = val3 + new Vector3(num2, 0f, num2); Vector3[] array = (Vector3[])(object)new Vector3[4] { val4, val5, val6, val7 }; for (int i = 0; i < 4; i++) { float num3 = Random.Range(-10f, 10f); for (int j = 0; j < ModConfig.UltimateWaves.Value; j++) { Vector3 val8 = Quaternion.AngleAxis((num + num3) * (float)j, Vector3.up) * val; ProjectileManager.instance.FireProjectile(UmbralMithrix.staticUltLine, array[i], Util.QuaternionSafeLookRotation(val8), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * waveProjectileDamageCoefficient, waveProjectileForce, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } } if (PhaseCounter.instance.phase != 3) { return; } _ = list.Count; int value = ModConfig.UltimateWaves.Value; float num4 = 360f / (float)value; val2 = Vector3.ProjectOnPlane(Random.onUnitSphere, Vector3.up); Vector3 normalized = ((Vector3)(ref val2)).normalized; GameObject val9 = UmbralMithrix.leftUltLine; if ((double)Random.value <= 0.5) { val9 = UmbralMithrix.rightUltLine; } val2 = list[Random.Range(0, list.Count)].footPosition; val2.y = 491f; Vector3 val10 = val2; Vector3[] array2 = (Vector3[])(object)new Vector3[2] { new Vector3(val10.x, ((EntityState)this).characterBody.footPosition.y, val10.z) + new Vector3(Random.Range(-45f, -15f), 0f, Random.Range(-45f, -15f)), new Vector3(val10.x, ((EntityState)this).characterBody.footPosition.y, val10.z) + new Vector3(Random.Range(15f, 45f), 0f, Random.Range(15f, 45f)) }; for (int k = 0; k < 2; k++) { for (int l = 0; l < value; l++) { Vector3 val11 = Quaternion.AngleAxis(num4 * (float)l, Vector3.up) * normalized; ProjectileManager.instance.FireProjectile(val9, array2[k], Util.QuaternionSafeLookRotation(val11), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * waveProjectileDamageCoefficient, waveProjectileForce, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { if (Mathf.CeilToInt(((EntityState)this).fixedAge / maxDuration * (float)totalWaves) > wavesFired) { FireWave(); } if (!((double)((EntityState)this).fixedAge <= (double)maxDuration)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitUmbralUlt()); } } } public override void OnExit() { Util.PlaySound(exitSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)channelEffectInstance)) { EntityState.Destroy((Object)(object)channelEffectInstance); } ((EntityState)this).OnExit(); } } public class EnterUmbralUlt : BaseState { public static string soundString = "Play_moonBrother_blueWall_slam_start"; public static float duration = 0.2f; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).PlayCrossfade("Body", "UltEnter", "Ult.playbackRate", duration, 0.1f); Util.PlaySound(soundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !((double)((EntityState)this).fixedAge <= (double)duration)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ChannelUmbralUlt()); } } } public class ExitUmbralUlt : BaseState { public static float lendInterval = 0f; public static float duration = 2f; public static string soundString = ""; public static GameObject channelFinishEffectPrefab = UmbralMithrix.umbralUltMuzzleFlash; private static int ExitUmbralUltHash = Animator.StringToHash("UltExit"); private static int UltParamHash = Animator.StringToHash("Ult.playbackRate"); public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Body", ExitUmbralUltHash, UltParamHash, duration); Util.PlaySound(soundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)channelFinishEffectPrefab)) { EffectManager.SimpleMuzzleFlash(channelFinishEffectPrefab, ((EntityState)this).gameObject, "MuzzleUlt", false); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!((double)((EntityState)this).fixedAge <= (double)duration)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { GenericSkill val = (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) ? ((EntityState)this).skillLocator.special : null); if (Object.op_Implicit((Object)(object)val)) { val.UnsetSkillOverride((object)((EntityState)this).outer, ChannelUmbralUlt.replacementSkillDef, (SkillOverridePriority)4); } ((EntityState)this).OnExit(); } } public class FireUmbralShards : BaseSkillState { public static float baseDuration = 0.11f; public float damageCoefficient = 0.05f; public static GameObject projectilePrefab = UmbralMithrix.shardProjectile; public static float recoilAmplitude = 1.5f; public static float spreadBloomValue = 0.4f; public static string muzzleString = "MuzzleLeft"; public static GameObject muzzleFlashEffectPrefab; public static string fireSound = "Play_moonBrother_m1_laser_shoot"; public float maxSpread = 2f; public float spreadYawScale = 5f; public float spreadPitchScale = 1f; private float duration; private static int FireLunarShardsStateHash = Animator.StringToHash("FireLunarShards"); public override void OnEnter() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: 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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); Transform val = ((BaseState)this).FindModelChild(muzzleString); if (Object.op_Implicit((Object)(object)val)) { ((Ray)(ref aimRay)).origin = val.position; } ((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f, maxSpread, spreadYawScale, spreadPitchScale, 0f, 0f); FireProjectileInfo val2 = default(FireProjectileInfo); val2.position = ((Ray)(ref aimRay)).origin; val2.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction); val2.crit = ((EntityState)this).characterBody.RollCrit(); val2.damage = ((EntityState)this).characterBody.damage * damageCoefficient; val2.damageColorIndex = (DamageColorIndex)0; val2.owner = ((EntityState)this).gameObject; val2.procChainMask = default(ProcChainMask); val2.force = 0f; val2.useFuseOverride = false; val2.useSpeedOverride = false; val2.target = null; val2.projectilePrefab = projectilePrefab; for (int i = 0; i < ModConfig.LunarShardAdd.Value; i++) { ProjectileManager.instance.FireProjectile(val2); ((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f, maxSpread * (float)(1.0 + 0.449999988079071 * (double)i), spreadYawScale * (float)(1.0 + 0.449999988079071 * (double)i), spreadPitchScale, 0f, 0f); val2.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction); } ProjectileManager.instance.FireProjectile(val2); } ((EntityState)this).PlayAnimation("Gesture, Additive", FireLunarShardsStateHash); ((EntityState)this).PlayAnimation("Gesture, Override", FireLunarShardsStateHash); ((BaseState)this).AddRecoil(1f, recoilAmplitude, -0.3f * recoilAmplitude, 0.3f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValue); if (Object.op_Implicit((Object)(object)muzzleFlashEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleFlashEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } Util.PlaySound(fireSound, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class UmbralHammerSlam : BaseState { public static float duration = 3.5f; public static float damageCoefficient = 4f; public static float forceMagnitude = 5000f; public static float upwardForce = 1000f; public static float radius = 12f; public static string attackSoundString = "Play_moonBrother_swing_vertical"; public static string muzzleString = "SlamZone"; public static GameObject slamImpactEffect = UmbralMithrix.umbralSlamImpact; public static float durationBeforePriorityReduces = 1.2f; public static GameObject orbProjectilePrefab = UmbralMithrix.umbralSlamProjectile; public static GameObject waveProjectilePrefab = UmbralMithrix.umbralLeapWave; public static float waveProjectileArc = 120f; public static int waveProjectileCount = 3; public static float waveProjectileDamageCoefficient = 2f; public static float waveProjectileForce = 400f; public static float weaponDamageCoefficient = 3f; public static float weaponForce = 5000f; public static GameObject pillarProjectilePrefab = UmbralMithrix.umbralSlamPillar; public static float pillarDamageCoefficient = 3f; public static GameObject weaponHitEffectPrefab = UmbralMithrix.umbralSlamHitEffect; public static NetworkSoundEventDef weaponImpactSound = UmbralMithrix.umbralSlamHitSound; private BlastAttack blastAttack; private OverlapAttack weaponAttack; private Animator modelAnimator; private Transform modelTransform; private bool hasDoneBlastAttack; public override void OnEnter() { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); modelAnimator = ((EntityState)this).GetModelAnimator(); modelTransform = ((EntityState)this).GetModelTransform(); Util.PlayAttackSpeedSound(attackSoundString, ((EntityState)this).gameObject, base.attackSpeedStat); ((EntityState)this).PlayCrossfade("FullBody Override", "WeaponSlam", "WeaponSlam.playbackRate", duration, 0.1f); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { CharacterDirection characterDirection = ((EntityState)this).characterDirection; Ray aimRay = ((BaseState)this).GetAimRay(); characterDirection.moveVector = ((Ray)(ref aimRay)).direction; } if (Object.op_Implicit((Object)(object)modelTransform)) { AimAnimator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = true; } } if (((EntityState)this).isAuthority) { OverlapAttack val = new OverlapAttack(); val.attacker = ((EntityState)this).gameObject; val.damage = damageCoefficient * base.damageStat; val.damageColorIndex = (DamageColorIndex)0; val.damageType = DamageTypeCombo.op_Implicit((DamageType)0); val.hitEffectPrefab = weaponHitEffectPrefab; val.hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents(), (HitBoxGroup element) => element.groupName == "WeaponBig"); val.impactSound = weaponImpactSound.index; val.inflictor = ((EntityState)this).gameObject; val.procChainMask = default(ProcChainMask); val.pushAwayForce = weaponForce; val.procCoefficient = 1f; val.teamIndex = ((BaseState)this).GetTeam(); weaponAttack = val; } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Expected O, but got Unknown //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: 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_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && ((EntityState)this).skillLocator.utility.IsReady() && ((ButtonState)(ref ((EntityState)this).inputBank.skill3)).justPressed) { ((EntityState)this).skillLocator.utility.ExecuteIfReady(); return; } if (Object.op_Implicit((Object)(object)modelAnimator)) { if (((EntityState)this).isAuthority && modelAnimator.GetFloat("weapon.hitBoxActive") > 0.5f) { weaponAttack.Fire((List)null); } if (modelAnimator.GetFloat("blast.hitBoxActive") > 0.5f && !hasDoneBlastAttack) { hasDoneBlastAttack = true; EffectManager.SimpleMuzzleFlash(slamImpactEffect, ((EntityState)this).gameObject, muzzleString, false); if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)PhaseCounter.instance)) { int value = ModConfig.SlamOrbProjectileCount.Value; float num = 360f / (float)value; Vector3 val = Vector3.ProjectOnPlane(((EntityState)this).characterDirection.forward, Vector3.up); Vector3 position = ((BaseState)this).FindModelChild(muzzleString).position; for (int i = 0; i < value; i++) { Vector3 val2 = Quaternion.AngleAxis(num * (float)i, Vector3.up) * val; ProjectileManager.instance.FireProjectile(orbProjectilePrefab, position, Util.QuaternionSafeLookRotation(val2), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * waveProjectileDamageCoefficient, waveProjectileForce, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterDirection.forward; } if (Object.op_Implicit((Object)(object)modelTransform)) { Transform val3 = ((BaseState)this).FindModelChild(muzzleString); if (Object.op_Implicit((Object)(object)val3)) { blastAttack = new BlastAttack(); blastAttack.attacker = ((EntityState)this).gameObject; blastAttack.inflictor = ((EntityState)this).gameObject; blastAttack.teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject); blastAttack.baseDamage = base.damageStat * damageCoefficient; blastAttack.baseForce = forceMagnitude; blastAttack.position = val3.position; blastAttack.radius = radius; blastAttack.bonusForce = new Vector3(0f, upwardForce, 0f); blastAttack.Fire(); } } if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 3) { Transform val4 = ((BaseState)this).FindModelChild(muzzleString); float num2 = waveProjectileArc / (float)waveProjectileCount; Vector3 val5 = Vector3.ProjectOnPlane(((EntityState)this).characterDirection.forward, Vector3.up); Vector3 val6 = ((EntityState)this).characterBody.footPosition; if (Object.op_Implicit((Object)(object)val4)) { val6 = val4.position; } for (int j = 0; j < waveProjectileCount; j++) { Vector3 val7 = Quaternion.AngleAxis(num2 * ((float)j - (float)waveProjectileCount / 2f), Vector3.up) * val5; ProjectileManager.instance.FireProjectileWithoutDamageType(waveProjectilePrefab, val6, Util.QuaternionSafeLookRotation(val7), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * waveProjectileDamageCoefficient, waveProjectileForce, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } ProjectileManager.instance.FireProjectileWithoutDamageType(pillarProjectilePrefab, val6, Quaternion.identity, ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * pillarDamageCoefficient, 0f, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } } } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { if (!(((EntityState)this).fixedAge <= durationBeforePriorityReduces)) { return (InterruptPriority)1; } return (InterruptPriority)2; } } public class UmbralBash : BasicMeleeAttack { public static float durationBeforePriorityReduces = 0.5f; public override void PlayAnimation() { ((EntityState)this).PlayCrossfade("FullBody Override", "SprintBash", "SprintBash.playbackRate", base.duration, 0.05f); } public override void OnEnter() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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) //IL_00bb: Expected O, but got Unknown //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: 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_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) base.baseDuration = 4f; base.damageCoefficient = 2f; base.hitBoxGroupName = "Weapon"; base.hitEffectPrefab = UmbralMithrix.umbralSlamHitEffect; base.procCoefficient = 1f; base.pushAwayForce = 6000f; base.forceVector = new Vector3(0f, 2000f, 0f); base.hitPauseDuration = 0.1f; base.swingEffectPrefab = UmbralMithrix.umbralSwingEffect; base.swingEffectMuzzleString = "MuzzleSprintBash"; base.mecanimHitboxActiveParameter = "weapon.hitBoxActive"; base.shorthopVelocityFromHit = 0f; base.beginStateSoundString = "Play_moonBrother_swing_horizontal"; base.forceForwardVelocity = true; base.impactSound = UmbralMithrix.umbralSlamHitSound; base.forwardVelocityCurve = new AnimationCurve(); ((BasicMeleeAttack)this).OnEnter(); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); if (((Object)((EntityState)this).characterBody).name == "BrotherBody(Clone)") { for (int i = 0; i < 6; i++) { Util.PlaySound(FireUmbralShards.fireSound, ((EntityState)this).gameObject); ProjectileManager.instance.FireProjectile(FireUmbralShards.projectilePrefab, ((Ray)(ref aimRay)).origin, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, (float)((double)((EntityState)this).characterBody.damage * 0.100000001490116 / 12.0), 0f, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase != 1 && ModConfig.addShockwave.Value) { Vector3 val = Vector3.ProjectOnPlane(((EntityState)this).inputBank.aimDirection, Vector3.up); Vector3 footPosition = ((EntityState)this).characterBody.footPosition; Vector3 val2 = Quaternion.AngleAxis(0f, Vector3.up) * val; ProjectileManager.instance.FireProjectile(WeaponSlam.waveProjectilePrefab, footPosition, Util.QuaternionSafeLookRotation(val2), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * WeaponSlam.waveProjectileDamageCoefficient, WeaponSlam.waveProjectileForce, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } } AimAnimator aimAnimator = ((EntityState)this).GetAimAnimator(); if (Object.op_Implicit((Object)(object)aimAnimator)) { ((Behaviour)aimAnimator).enabled = true; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.forward = ((EntityState)this).inputBank.aimDirection; } } public override void FixedUpdate() { ((BasicMeleeAttack)this).FixedUpdate(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && ((EntityState)this).skillLocator.utility.IsReady() && ((ButtonState)(ref ((EntityState)this).inputBank.skill3)).justPressed) { ((EntityState)this).skillLocator.utility.ExecuteIfReady(); } } public override void OnExit() { Transform val = ((BaseState)this).FindModelChild("SpinnyFX"); if (Object.op_Implicit((Object)(object)val)) { ((Component)val).gameObject.SetActive(false); } ((EntityState)this).PlayCrossfade("FullBody Override", "BufferEmpty", 0.1f); ((BasicMeleeAttack)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { if ((double)((EntityState)this).fixedAge <= (double)SprintBash.durationBeforePriorityReduces) { return (InterruptPriority)2; } return (InterruptPriority)1; } } public class EnterUmbralLeap : BaseState { public static float baseDuration = 0.25f; public static string soundString = "Play_voidRaid_snipe_shoot_final"; private float duration; private static int EnterUmbralLeapStateHash = Animator.StringToHash("EnterSkyLeap"); private static int BufferEmptyStateHash = Animator.StringToHash("BufferEmpty"); private static int SkyLeapParamHash = Animator.StringToHash("SkyLeap.playbackRate"); public override void OnEnter() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; Util.PlaySound(soundString, ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Body", EnterUmbralLeapStateHash, SkyLeapParamHash, duration); ((EntityState)this).PlayAnimation("FullBody Override", BufferEmptyStateHash); ((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterDirection.forward; ((EntityState)this).characterBody.AddTimedBuff(Buffs.ArmorBoost, baseDuration); AimAnimator aimAnimator = ((EntityState)this).GetAimAnimator(); if (Object.op_Implicit((Object)(object)aimAnimator)) { ((Behaviour)aimAnimator).enabled = true; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !((double)((EntityState)this).fixedAge <= (double)duration)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new HoldUmbralLeap()); } } } public class ExitUmbralLeap : BaseState { public static float baseDuration = 3f; public static string soundString = "Play_moonBrother_phaseJump_land_impact"; public static GameObject waveProjectilePrefab = UmbralMithrix.umbralLeapWave; public static int waveProjectileCount = ModConfig.JumpWaveCount.Value; public static float waveProjectileDamageCoefficient = 4f; public static float waveProjectileForce = 400f; private float duration; private static int ExitUmbralLeapStateHash = Animator.StringToHash("ExitSkyLeap"); private static int BufferEmptyStateHash = Animator.StringToHash("BufferEmpty"); private static int SkyLeapParamHash = Animator.StringToHash("SkyLeap.playbackRate"); public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; Util.PlaySound(soundString, ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Body", ExitUmbralLeapStateHash, SkyLeapParamHash, duration); ((EntityState)this).PlayAnimation("FullBody Override", BufferEmptyStateHash); ((EntityState)this).characterBody.AddTimedBuff(Buffs.ArmorBoost, baseDuration); AimAnimator aimAnimator = ((EntityState)this).GetAimAnimator(); if (Object.op_Implicit((Object)(object)aimAnimator)) { ((Behaviour)aimAnimator).enabled = true; } if (((EntityState)this).isAuthority) { FireRingAuthority(); } if (!Object.op_Implicit((Object)(object)PhaseCounter.instance) || PhaseCounter.instance.phase != 1) { GenericSkill val = (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) ? ((EntityState)this).skillLocator.special : null); if (Object.op_Implicit((Object)(object)val)) { val.SetSkillOverride((object)((EntityState)this).outer, ChannelUmbralUlt.replacementSkillDef, (SkillOverridePriority)4); } } } private void FireRingAuthority() { //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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_0037: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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) float num = 360f / (float)waveProjectileCount; Vector3 val = Vector3.ProjectOnPlane(((EntityState)this).inputBank.aimDirection, Vector3.up); Vector3 footPosition = ((EntityState)this).characterBody.footPosition; for (int i = 0; i < waveProjectileCount; i++) { Vector3 val2 = Quaternion.AngleAxis(num * (float)i, Vector3.up) * val; if (((EntityState)this).isAuthority) { ProjectileManager.instance.FireProjectileWithoutDamageType(waveProjectilePrefab, footPosition, Util.QuaternionSafeLookRotation(val2), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * waveProjectileDamageCoefficient, waveProjectileForce, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !((double)((EntityState)this).fixedAge <= (double)duration)) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class HoldUmbralLeap : BaseState { public static float duration = ModConfig.CrushingLeap.Value; private CharacterModel characterModel; private HurtBoxGroup hurtboxGroup; private int originalLayer; public override void OnEnter() { //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Invalid comparison between Unknown and I4 //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_017c: 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_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_019b: 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_01b9: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent(); hurtboxGroup = ((Component)modelTransform).GetComponent(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount + 1; obj.invisibilityCount = invisibilityCount; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup obj2 = hurtboxGroup; int invisibilityCount = obj2.hurtBoxesDeactivatorCounter + 1; obj2.hurtBoxesDeactivatorCounter = invisibilityCount; } ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); Util.PlaySound("Play_moonBrother_phaseJump_land_preWhoosh", ((EntityState)this).gameObject); originalLayer = ((EntityState)this).gameObject.layer; ((EntityState)this).gameObject.layer = LayerIndex.GetAppropriateFakeLayerForTeam(((EntityState)this).teamComponent.teamIndex).intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); if (!((EntityState)this).isAuthority) { return; } List list = new List(); foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList) { if ((int)readOnlyInstances.teamIndex == 1) { CharacterBody body = readOnlyInstances.GetBody(); if (Object.op_Implicit((Object)(object)body) && body.isPlayerControlled) { list.Add(body); } } } if (list.Count > 0) { Vector3 footPosition = list[Random.Range(0, list.Count)].footPosition; RaycastHit val = default(RaycastHit); if (Physics.Raycast(new Ray(footPosition, Vector3.down), ref val, 500f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(((RaycastHit)(ref val)).point + new Vector3(0f, 10f, 0f), Quaternion.identity, true); } else { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(footPosition, Quaternion.identity, true); } } GameObject val2 = Object.Instantiate(UmbralMithrix.leapIndicatorPrefab, ((EntityState)this).characterBody.footPosition, Quaternion.identity); float num = ((EntityState)this).characterBody.radius / 2f; val2.transform.localScale = new Vector3(num, num, num); val2.AddComponent(); UmbralMithrix.leapIndicator = val2; if (NetworkServer.active) { NetworkServer.Spawn(val2); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !((double)((EntityState)this).fixedAge <= (double)HoldSkyLeap.duration)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitUmbralLeap()); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount - 1; obj.invisibilityCount = invisibilityCount; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup obj2 = hurtboxGroup; int invisibilityCount = obj2.hurtBoxesDeactivatorCounter - 1; obj2.hurtBoxesDeactivatorCounter = invisibilityCount; } ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); ((EntityState)this).gameObject.layer = originalLayer; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((EntityState)this).OnExit(); } } } namespace UmbralMithrix.Components { public class PersistentOverlayController : MonoBehaviour { public Material OverlayMaterial; public AssetReferenceT OverlayMaterialReference; private AssetOrDirectReference _overlayReference; private CharacterModel _characterModel; private TemporaryOverlayInstance _temporaryOverlay; private void Awake() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) _characterModel = ((Component)this).GetComponent(); _overlayReference = new AssetOrDirectReference { unloadType = (AsyncReferenceHandleUnloadType)2, address = OverlayMaterialReference, directRef = OverlayMaterial }; } private void OnDestroy() { _overlayReference?.Reset(); _overlayReference = null; } private void OnEnable() { if (_overlayReference.IsLoaded()) { setOverlayMaterial(_overlayReference.Result); } _overlayReference.onValidReferenceDiscovered += onOverlayMaterialDiscovered; } private void OnDisable() { _overlayReference.onValidReferenceDiscovered -= onOverlayMaterialDiscovered; setOverlayMaterial(null); } private void onOverlayMaterialDiscovered(Material overlayMaterial) { setOverlayMaterial(overlayMaterial); } private void setOverlayMaterial(Material overlayMaterial) { bool flag = Object.op_Implicit((Object)(object)overlayMaterial); bool flag2 = _temporaryOverlay != null; if (flag != flag2 || (flag2 && !((Object)(object)_temporaryOverlay.originalMaterial == (Object)(object)overlayMaterial))) { TemporaryOverlayInstance temporaryOverlay = _temporaryOverlay; if (temporaryOverlay != null) { temporaryOverlay.CleanupEffect(); } _temporaryOverlay = null; if (flag) { _temporaryOverlay = TemporaryOverlayManager.AddOverlay(((Component)this).gameObject); _temporaryOverlay.duration = float.PositiveInfinity; _temporaryOverlay.originalMaterial = overlayMaterial; _temporaryOverlay.AddToCharacterModel(_characterModel); } } } } }