Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of Spiral Invasion v1.0.2
CradleExpansion.dll
Decompiled 5 months agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using BepInEx; using BepInEx.Logging; using CradleExpansion.Handlers; using EntityStates; using EntityStates.Commando; using R2API; using R2API.ContentManagement; using R2API.ScriptableObjects; using RoR2; using RoR2.Navigation; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyVersion("0.0.0.0")] namespace CradleExpansion { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.OopsAllLemurians.CradleExpansion", "CradleExpansion", "1.0.2")] public class CradleExpansionMain : BaseUnityPlugin { public const string GUID = "com.OopsAllLemurians.CradleExpansion"; public const string MODNAME = "CradleExpansion"; public const string VERSION = "1.0.2"; public static AssetBundle assetBundle; public static ManualLogSource Logger; public static CradleExpansionMain Instance { get; private set; } private void Awake() { Instance = this; Logger = ((BaseUnityPlugin)this).Logger; LoadAssetBundle(); Logger.LogMessage((object)"I knew you were gonna do this from the moment I got out of bed today typical Steve I'm not surprised."); R2APIContentManager.AddPreExistingSerializableContentPack(assetBundle.LoadAsset<R2APISerializableContentPack>("CradleContentPack"), true); Tokens.AddTokens(); Logger.LogMessage((object)"Adding Monsters to pool..."); SpawnCardBuilder.AddMonstersToPool(); Logger.LogMessage((object)"All tasks complete! No more to load! For the Gremlin Empire!"); } private void LoadAssetBundle() { try { if ((Object)(object)assetBundle == (Object)null) { assetBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "cradleexpansion")); if ((Object)(object)assetBundle == (Object)null) { Logger.LogError((object)"Failed to load the asset bundle. Check file name/path."); return; } } Logger.LogMessage((object)"Assembly Loaded"); } catch (Exception ex) { Logger.LogError((object)("An error occurred while loading the asset bundle: " + ex.Message)); } } } } namespace CradleExpansion.Snarbolax { internal class SnarbolaxDeath : GenericCharacterDeath { public static float deathDelay = 5f; public static GameObject deathEffectPrefab = CradleExpansionMain.assetBundle.LoadAsset<GameObject>("DeathBurst"); private bool hasDied; public override void FixedUpdate() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).FixedUpdate(); if (((EntityState)this).fixedAge > deathDelay && !hasDied) { hasDied = true; ((GenericCharacterDeath)this).DestroyModel(); EffectManager.SimpleImpactEffect(deathEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.up, false); if (NetworkServer.active) { ((GenericCharacterDeath)this).DestroyBodyAsapServer(); } } } public override void OnExit() { ((GenericCharacterDeath)this).DestroyModel(); ((GenericCharacterDeath)this).OnExit(); } } internal class SnarbolaxSpawn : BaseState { private float duration; private string muzzleString; public override void OnEnter() { duration = 1.2f; muzzleString = "SpawnFX"; ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Fullbody", "Snarby_Activate"); AkSoundEngine.PostEvent("Play_wolver_spawn", ((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } } namespace CradleExpansion.Handlers { public class SpawnCardBuilder { public static void AddMonstersToPool() { CardToDirectorConverterWolver("cscWolverNormal", 12, 0, (MonsterSpawnDistance)0, (MonsterCategory)2); } private static void CardToDirectorConverterWolver(string cardId, int weight, int stageComp, MonsterSpawnDistance spacing, MonsterCategory monsterCat) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_004a: Expected O, but got Unknown //IL_004a: 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_0059: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_006c: 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_007b: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown CharacterSpawnCard val = CradleExpansionMain.assetBundle.LoadAsset<CharacterSpawnCard>(cardId); ((SpawnCard)val).forbiddenFlags = (NodeFlags)4; DirectorCard val2 = new DirectorCard { spawnCard = (SpawnCard)(object)val, selectionWeight = weight, preventOverhead = false, minimumStageCompletions = stageComp, spawnDistance = spacing }; Helpers.AddNewMonsterToStage(val2, monsterCat, (Stage)2, ""); Helpers.AddNewMonsterToStage(val2, monsterCat, (Stage)4, ""); Helpers.AddNewMonsterToStage(val2, monsterCat, (Stage)1073741824, ""); Helpers.AddNewMonsterToStage(val2, monsterCat, (Stage)8, ""); Helpers.AddNewMonsterToStage(val2, monsterCat, (Stage)64, ""); Helpers.AddNewMonsterToStage(val2, monsterCat, (Stage)131072, ""); Helpers.AddNewMonsterToStage(val2, monsterCat, (Stage)16384, ""); Helpers.AddNewMonsterToStage(val2, monsterCat, (Stage)4096, ""); } } [RequireComponent(typeof(CharacterBody))] public class SpiralTierManager : MonoBehaviour { public Material[] wolverTiersNrm = (Material[])(object)new Material[3]; public Material[] wolverTiersSho = (Material[])(object)new Material[3]; public Material[] wolverTiersFir = (Material[])(object)new Material[3]; public Material[] wolverTiersIce = (Material[])(object)new Material[3]; public Material[] wolverTiersMend = (Material[])(object)new Material[3]; public Material[] wolverTiersMal = (Material[])(object)new Material[3]; public Material[] wolverTiersCel = (Material[])(object)new Material[3]; public Material[] wolverTiersPer = (Material[])(object)new Material[3]; public Material[] wolverTiersVoi = (Material[])(object)new Material[3]; public Material[] wolverTiersGold = (Material[])(object)new Material[3]; public Material[] wolverTiersTwi = (Material[])(object)new Material[3]; public CharacterModel characterModelScript; public CharacterBody characterBody; private float updateInterval; public void MaterialSetup() { if (characterBody.HasBuff(Buffs.AffixBlue)) { UpdateSkin(wolverTiersSho); } else if (characterBody.HasBuff(Buffs.AffixRed)) { UpdateSkin(wolverTiersFir); } else if (characterBody.HasBuff(Buffs.AffixWhite)) { UpdateSkin(wolverTiersIce); } else if (characterBody.HasBuff(Buffs.EliteEarth)) { UpdateSkin(wolverTiersMend); } else if (characterBody.HasBuff(Buffs.AffixPoison)) { UpdateSkin(wolverTiersMal); } else if (characterBody.HasBuff(Buffs.AffixHaunted)) { UpdateSkin(wolverTiersCel); } else if (characterBody.HasBuff(Buffs.AffixLunar)) { UpdateSkin(wolverTiersPer); } else if (characterBody.HasBuff(Buffs.EliteVoid)) { UpdateSkin(wolverTiersVoi); } else if (characterBody.HasBuff(Buffs.EliteAurelionite)) { UpdateSkin(wolverTiersGold); } else if (characterBody.HasBuff(Buffs.EliteBead)) { UpdateSkin(wolverTiersTwi); } else { UpdateSkin(wolverTiersNrm); } updateInterval = 1f; MethodInfo method = ((object)characterModelScript).GetType().GetMethod("UpdateMaterials", BindingFlags.Instance | BindingFlags.NonPublic); if (method != null) { method.Invoke(characterModelScript, new object[0]); } else { CradleExpansionMain.Logger.LogError((object)"unable to grab slime"); } } private void UpdateSkin(Material[] skinList) { float level = characterBody.level; if (level < 20f) { characterModelScript.baseRendererInfos[0].defaultMaterial = skinList[0]; characterModelScript.baseRendererInfos[1].defaultMaterial = skinList[0]; } else if (level < 45f) { characterModelScript.baseRendererInfos[0].defaultMaterial = skinList[1]; characterModelScript.baseRendererInfos[1].defaultMaterial = skinList[1]; } else { characterModelScript.baseRendererInfos[0].defaultMaterial = skinList[2]; characterModelScript.baseRendererInfos[1].defaultMaterial = skinList[2]; } } public void FixedUpdate() { if (updateInterval > 0f) { updateInterval -= Time.fixedDeltaTime; } if (updateInterval <= 0f) { MaterialSetup(); } } } internal static class Tokens { internal static void AddTokens() { LanguageAPI.Add("OOPSLEMURIANS_" + "WOLVNORMAL_BODY_NAME", "Wolver"); LanguageAPI.Add("OOPSLEMURIANS_" + "WOLVNORMAL_BODY_SUBTITLE", "Strength in Unity"); LanguageAPI.Add("OOPSLEMURIANS_" + "SNARBOLAX_BODY_NAME", "Weakened Snarbolax"); LanguageAPI.Add("OOPSLEMURIANS_" + "SNARBOLAX_BODY_SUBTITLE", "The Frumious Fang"); LanguageAPI.Add("OOPSLEMURIANS_" + "WOLVER_LOGBOOK_UNLOCK", "Gloaming Wildwoods: Wolver"); LanguageAPI.Add("OOPSLEMURIANS_" + "WOLVNORMAL_BODY_LORE", "Small wolf-like monsters that are rarely found alone. They would try to sneak upon their prey to take a bite out of them."); } } } namespace CradleExpansion.GunPuppy { internal class GunPuppyDeath : GenericCharacterDeath { public static float deathDelay = 1.3f; public static GameObject deathEffectPrefab = CradleExpansionMain.assetBundle.LoadAsset<GameObject>("DeathBurst"); private bool hasDied; public override void FixedUpdate() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).FixedUpdate(); if (((EntityState)this).fixedAge > deathDelay && !hasDied) { hasDied = true; ((GenericCharacterDeath)this).DestroyModel(); EffectManager.SimpleImpactEffect(deathEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.up, false); if (NetworkServer.active) { ((GenericCharacterDeath)this).DestroyBodyAsapServer(); } } } public override void OnExit() { ((GenericCharacterDeath)this).DestroyModel(); ((GenericCharacterDeath)this).OnExit(); } } internal class GunPuppySpawn : BaseState { private float duration; private string muzzleString; public override void OnEnter() { duration = 1.2f; muzzleString = "SpawnFX"; ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Fullbody", "gun_spawn"); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class NormalOrbATK : BaseSkillState { public static float damageCoefficient = 0.5f; public static float procCoefficient = 1f; public static float baseDuration = 1f; public static float throwForce = 80f; public float damageInterval; private float duration = 2f; private float fireTime; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireTime = 0.35f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayAnimation("Fullbody", "open_mouth", "gun_fire_orb.playbackRate", duration, 0f); } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("Fullbody", "close_mouth", "gun_fire_orb.playbackRate", duration, 0f); } private void Fire() { if (!hasFired) { hasFired = true; ((EntityState)this).PlayAnimation("Fullbody", "gun_fire_orb", "gun_fire_orb.playbackRate", duration, 0f); if (((EntityState)this).isAuthority) { CradleExpansionMain.Logger.LogMessage((object)"Firing Bullet from Gunpup!"); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } else if (((EntityState)this).fixedAge >= fireTime) { Fire(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace CradleExpansion.Generic { public class EmptySkill : BaseSkillState { public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void OnExit() { ((EntityState)this).OnExit(); } } public class OALDeathState : GenericCharacterDeath { public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator)) { if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelBaseTransform)) { EntityState.Destroy((Object)(object)((Component)((EntityState)this).modelLocator.modelBaseTransform).gameObject); } if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelTransform)) { EntityState.Destroy((Object)(object)((Component)((EntityState)this).modelLocator.modelTransform).gameObject); } } if (NetworkServer.active) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } } public class OALSpawnState : BaseState { public GameObject effectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Lemurian/SpawnLemurian.prefab").WaitForCompletion(), "spawnEffectGunPuppy"); public float duration = 1f; public override void OnEnter() { //IL_0012: 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) ((BaseState)this).OnEnter(); EffectManager.SimpleEffect(effectPrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation, true); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } } namespace CradleExpansion.Wolver { public class TripleBite : BaseState { private string muzzleString = "BiteFX"; public float skillDuration = 5f; public float chargeDuration = 0.9f; public float soundBiteBreak = 0.8f; private Animator modelAnimator; private GameObject hitEffectPrefab; private float damageCoefficient = 1.5f; private OverlapAttack attack; private GameObject biteEffect; private bool hasVFXFired; private bool hasSFXBorked; public override void OnEnter() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //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) ((BaseState)this).OnEnter(); ((BaseState)this).StartAimMode(0.5f, false); modelAnimator = ((EntityState)this).GetModelAnimator(); attack = new OverlapAttack(); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = TeamComponent.GetObjectTeam(attack.attacker); attack.damage = damageCoefficient * base.damageStat; attack.hitEffectPrefab = hitEffectPrefab; attack.pushAwayForce = 0f; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { attack.hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Bitezone"); } biteEffect = CradleExpansionMain.assetBundle.LoadAsset<GameObject>("WolverBite"); ((EntityState)this).PlayAnimation("Fullbody", "triple_attack_1_charge"); } public override void OnExit() { ((EntityState)this).OnExit(); } private void FireSFXBork() { AkSoundEngine.PostEvent("Play_wolver_bite", ((EntityState)this).gameObject); hasSFXBorked = true; } private void FireVFXBite() { EffectManager.SimpleMuzzleFlash(biteEffect, ((EntityState)this).gameObject, muzzleString, true); hasVFXFired = true; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= soundBiteBreak && !hasSFXBorked) { FireSFXBork(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= chargeDuration && Object.op_Implicit((Object)(object)modelAnimator) && modelAnimator.GetFloat("bite.hitBoxActive") >= 0.5f) { attack.Fire((List<HurtBox>)null); if (!hasVFXFired) { FireVFXBite(); } } if (((EntityState)this).fixedAge >= skillDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class WolverDodge : BaseState { public static float duration = 0.5f; public static float initialSpeedCoefficient = 6f; public static float finalSpeedCoefficient = 2.5f; public static string dodgeSoundString = "SpiralHopDodge"; public static float dodgeFOV = DodgeState.dodgeFOV; private float rollSpeed; private Vector3 forwardDirection; private Animator animator; private Vector3 previousPosition; public override void OnEnter() { //IL_0098: 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_009d: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); forwardDirection = ((Vector3)(ref val)).normalized; } ((BaseState)this).StartAimMode(5f, false); Vector3 val2 = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : forwardDirection); Vector3 val3 = Vector3.Cross(Vector3.up, val2); Vector3.Dot(forwardDirection, val2); Vector3.Dot(forwardDirection, val3); RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity.y = 0f; ((EntityState)this).characterMotor.velocity = forwardDirection * rollSpeed; } Vector3 val4 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val4; } private void RecalculateRollSpeed() { rollSpeed = base.moveSpeedStat * Mathf.Lerp(initialSpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / duration); } public override void FixedUpdate() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: 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_00e7: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.forward = forwardDirection; } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = Mathf.Lerp(dodgeFOV, 60f, ((EntityState)this).fixedAge / duration); } Vector3 val = ((EntityState)this).transform.position - previousPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && normalized != Vector3.zero) { Vector3 val2 = normalized * rollSpeed; float num = Mathf.Max(Vector3.Dot(val2, forwardDirection), 0f); val2 = forwardDirection * num; val2.y = 0f; ((EntityState)this).characterMotor.velocity = val2; } previousPosition = ((EntityState)this).transform.position; if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = -1f; } ((EntityState)this).OnExit(); ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } } public class BiteAttack : BaseSkillState { private string muzzleString = "BiteFX"; public float skillDuration = 1f; public float chargeDuration = 0.9f; public float soundBiteBreak = 0.8f; private Animator modelAnimator; private GameObject hitEffectPrefab; private float damageCoefficient = 1.5f; private OverlapAttack attack; private GameObject biteEffect; private bool hasVFXFired; private bool hasSFXBorked; public override void OnEnter() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //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) ((BaseState)this).OnEnter(); ((BaseState)this).StartAimMode(0.5f, false); modelAnimator = ((EntityState)this).GetModelAnimator(); attack = new OverlapAttack(); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = TeamComponent.GetObjectTeam(attack.attacker); attack.damage = damageCoefficient * ((BaseState)this).damageStat; attack.hitEffectPrefab = hitEffectPrefab; attack.pushAwayForce = 0f; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { attack.hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Bitezone"); } biteEffect = CradleExpansionMain.assetBundle.LoadAsset<GameObject>("WolverBite"); ((EntityState)this).PlayAnimation("Fullbody", "wolver_bite"); } public override void OnExit() { ((EntityState)this).OnExit(); } private void FireSFXBork() { AkSoundEngine.PostEvent("Play_wolver_bite", ((EntityState)this).gameObject); hasSFXBorked = true; } private void FireVFXBite() { EffectManager.SimpleMuzzleFlash(biteEffect, ((EntityState)this).gameObject, muzzleString, true); hasVFXFired = true; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= soundBiteBreak && !hasSFXBorked) { FireSFXBork(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= chargeDuration && Object.op_Implicit((Object)(object)modelAnimator) && modelAnimator.GetFloat("bite.hitBoxActive") >= 0.5f) { attack.Fire((List<HurtBox>)null); if (!hasVFXFired) { FireVFXBite(); } } if (((EntityState)this).fixedAge >= skillDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class Bork : BaseSkillState { private float duration; private string muzzleString; private GameObject effectPrefab; private float barkTime; private bool hasBorked; public override void OnEnter() { duration = 2f; hasBorked = false; barkTime = 0.5f; muzzleString = "BarkFX"; ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Fullbody", "wolver_bark"); effectPrefab = CradleExpansionMain.assetBundle.LoadAsset<GameObject>("BarkBork"); } private void TimedBark() { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, muzzleString, true); AkSoundEngine.PostEvent("Play_bark_full", ((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); AkSoundEngine.StopAll(((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= barkTime && !hasBorked) { TimedBark(); hasBorked = true; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } internal class WolverBaseSpawn : BaseState { private float duration; private GameObject wolverDustSpawnFX; private GameObject wolverBurstSpawnFX; private string muzzleString; public SpiralTierManager spiralManager; public override void OnEnter() { spiralManager = ((EntityState)this).gameObject.GetComponent<SpiralTierManager>(); spiralManager.MaterialSetup(); duration = 1.2f; muzzleString = "SpawnFX"; ((BaseState)this).OnEnter(); wolverDustSpawnFX = CradleExpansionMain.assetBundle.LoadAsset<GameObject>("WolverSpawnFX"); wolverBurstSpawnFX = CradleExpansionMain.assetBundle.LoadAsset<GameObject>("WolverLeafSpawnFX"); EffectManager.SimpleMuzzleFlash(wolverDustSpawnFX, ((EntityState)this).gameObject, muzzleString, true); EffectManager.SimpleMuzzleFlash(wolverBurstSpawnFX, ((EntityState)this).gameObject, muzzleString, true); ((EntityState)this).PlayAnimation("Fullbody", "wolver_spawn"); AkSoundEngine.PostEvent("Play_wolver_spawn", ((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } internal class WolverDeath : GenericCharacterDeath { public static float deathDelay = 1.3f; public static GameObject deathEffectPrefab = CradleExpansionMain.assetBundle.LoadAsset<GameObject>("DeathBurst"); private bool hasDied; public override void FixedUpdate() { //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) ((GenericCharacterDeath)this).FixedUpdate(); if (((EntityState)this).fixedAge > deathDelay && !hasDied) { hasDied = true; EffectManager.SimpleImpactEffect(deathEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.up, true); ((GenericCharacterDeath)this).DestroyModel(); if (NetworkServer.active) { ((GenericCharacterDeath)this).DestroyBodyAsapServer(); } } } public override void OnExit() { ((GenericCharacterDeath)this).DestroyModel(); ((GenericCharacterDeath)this).OnExit(); } } public class WolverHurtState : BaseState { private float stopwatch; private float duration = 0.35f; public override void OnEnter() { ((BaseState)this).OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).sfxLocator) && ((EntityState)this).sfxLocator.barkSound != "") { Util.PlaySound(((EntityState)this).sfxLocator.barkSound, ((EntityState)this).gameObject); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.isSprinting = false; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } }