using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using EntityStates; using EntityStates.FlyingVermin.Mode; using EntityStates.Huntress; using EntityStates.Merc; using KinematicCharacterController; using On.RoR2; using R2API; using R2API.Utils; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.Audio; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("Wooper")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Wooper")] [assembly: AssemblyTitle("Wooper")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Wooper; internal class Assets { public static AssetBundle MainAssetBundle; public static T Load(string name) where T : Object { return MainAssetBundle.LoadAsset(name); } public static void PopulateAssets() { Assembly executingAssembly = Assembly.GetExecutingAssembly(); if ((Object)(object)MainAssetBundle == (Object)null) { using Stream stream = executingAssembly.GetManifestResourceStream("Wooper.AssetBundle." + "Wooper".ToLower() + "assets"); MainAssetBundle = AssetBundle.LoadFromStream(stream); } using Stream stream2 = executingAssembly.GetManifestResourceStream("Wooper.Wooper.bnk"); byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } } internal class Behaviour : MonoBehaviour { private CharacterBody body; public bool playSound; public string soundID = "Play_beetle_queen_impact"; private void Awake() { body = ((Component)this).GetComponent(); } private void FixedUpdate() { if (playSound) { playSound = false; AkSoundEngine.PostEvent(soundID, ((Component)this).gameObject); } } } internal class DelayedGravity : MonoBehaviour { private Rigidbody rigid; public float delay = 0.5f; private float stopwatch; private void Awake() { rigid = ((Component)this).GetComponent(); } private void FixedUpdate() { if (!rigid.useGravity) { stopwatch += Time.fixedDeltaTime; if (stopwatch >= delay) { rigid.useGravity = true; } } } } internal class SoakedOverlayBehaviour : MonoBehaviour { private CharacterBody body; private ModelLocator modelLocator; private TemporaryOverlayInstance overlay; private float stopwatch; private void Start() { body = ((Component)this).GetComponent(); modelLocator = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)modelLocator) && Object.op_Implicit((Object)(object)modelLocator.modelTransform)) { CharacterModel component = ((Component)modelLocator.modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { overlay = TemporaryOverlayManager.AddOverlay(((Component)component).gameObject); overlay.originalMaterial = Prefabs.soakedOverlay; overlay.destroyComponentOnEnd = true; overlay.animateShaderAlpha = true; overlay.duration = 999999f; overlay.alphaCurve = AnimationCurve.Constant(0f, 1f, 1f); overlay.AddToCharacterModel(component); } } } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (!(stopwatch < 0.1f)) { stopwatch = 0f; if (!body.HasBuff(Prefabs.soakedDebuff)) { Object.Destroy((Object)(object)this); } } } private void OnDestroy() { if (overlay != null) { overlay.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); overlay.duration = 0.4f; overlay.stopwatch = 0f; } } } internal class SoundLoop : MonoBehaviour { public string soundID; private uint ID; private void Start() { ID = AkSoundEngine.PostEvent(soundID, ((Component)this).gameObject); } private void OnDisable() { AkSoundEngine.StopPlayingID(ID); } } internal class SurfProjectileBehaviour : MonoBehaviour { public float maxDistance = 15f; private ProjectileImpactExplosion explosion; private float stopwatch; private void Awake() { explosion = ((Component)this).GetComponent(); } private void FixedUpdate() { //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_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_005b: 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) stopwatch += Time.fixedDeltaTime; if (stopwatch >= 0.1f) { stopwatch = 0f; RaycastHit val = default(RaycastHit); if (Physics.Raycast(((Component)this).transform.position + Vector3.up * 9f, ((Component)this).transform.forward, ref val, maxDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)) && !Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref val)).collider).GetComponent())) { explosion.stopwatch = 99f; } } } } internal class CharacterBodySetup { internal const bool melee = false; internal static GameObject baseBody = Prefabs.Load("RoR2/Base/Commando/CommandoBody.prefab"); internal static GameObject baseMaster; internal const string SURVIVORNAME = "Wooper"; internal const string SURVIVORNAMEKEY = "WOOPER_"; internal static Color characterColor = Color32.op_Implicit(new Color32((byte)37, (byte)150, (byte)190, byte.MaxValue)); internal static void CreateCharacterBodies() { RegisterStates(); CreateSurvivorPrefab(); } internal static void CreateSurvivorPrefab() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) GameObject val = CreateBodyPrefab("Wooper", characterColor, 100f); val.AddComponent(); CharacterBody component = val.GetComponent(); component.mainRootSpeed = 0f; component.baseMaxHealth = 130f; component.levelMaxHealth = 39f; component.baseRegen = 1.5f; component.levelRegen = 0.3f; component.baseMaxShield = 0f; component.levelMaxShield = 0f; component.baseMoveSpeed = 7f; component.levelMoveSpeed = 0f; component.baseAcceleration = 110f; component.baseJumpPower = 15f; component.levelJumpPower = 0f; component.baseDamage = 11f; component.levelDamage = 2.2f; component.baseAttackSpeed = 1f; component.levelAttackSpeed = 0f; component.baseCrit = 1f; component.levelCrit = 0f; component.baseArmor = 15f; component.levelArmor = 0f; component.baseJumpCount = 1; component.sprintingSpeedMultiplier = 1.45f; val.GetComponent().health = component.baseMaxHealth; CreateSurvivorDef(val); PassiveSetup(val); PrimarySetup(val); SecondarySetup(val); UtilitySetup(val); SpecialSetup(val); } internal static void CreateSurvivorDef(GameObject characterPrefab) { //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) CharacterBody component = characterPrefab.GetComponent(); string text = ((Object)characterPrefab).name.Replace("Body", ""); string text2 = text.Replace(" ", "").ToUpper(); string text3 = " \r\n\r\n< ! > \r\n\r\n< ! > \r\n\r\n< ! > \r\n\r\n< ! > \r\n\r\n"; string text4 = "..and so he left."; string text5 = "..and so he vanished."; string text6 = ""; LanguageAPI.Add("WOOPER_" + text2 + "_DESCRIPTION", text3); LanguageAPI.Add("WOOPER_" + text2 + "_SUBTITLE", "Smiling Swimmer"); LanguageAPI.Add("WOOPER_" + text2 + "_OUTRO", text4); LanguageAPI.Add("WOOPER_" + text2 + "_FAIL", text5); GameObject val = PrefabAPI.InstantiateClone(((Component)characterPrefab.GetComponent().modelBaseTransform).gameObject, text + "Display", false); Animator componentInChildren = val.GetComponentInChildren(); componentInChildren.runtimeAnimatorController = Assets.Load("displayAnimator"); Object.Destroy((Object)(object)((Component)componentInChildren).GetComponent()); ((Component)componentInChildren).gameObject.AddComponent().soundCenter = ((Component)componentInChildren).gameObject; SurvivorDef val2 = ScriptableObject.CreateInstance(); val2.cachedName = "WOOPER_" + text2 + "_NAME"; val2.unlockableDef = null; val2.descriptionToken = "WOOPER_" + text2 + "_DESCRIPTION"; val2.primaryColor = component.bodyColor; val2.bodyPrefab = characterPrefab; val2.displayPrefab = val; val2.outroFlavorToken = "WOOPER_" + text2 + "_OUTRO"; val2.desiredSortPosition = 22f; val2.mainEndingEscapeFailureFlavorToken = "WOOPER_" + text2 + "_FAIL"; ContentAddition.AddSurvivorDef(val2); GameObject val3 = PrefabAPI.InstantiateClone(Prefabs.Load("RoR2/Base/Commando/CommandoMonsterMaster.prefab"), text + "Master", true); ContentAddition.AddMaster(val3); CharacterMaster component2 = val3.GetComponent(); component2.bodyPrefab = characterPrefab; } internal static void RegisterStates() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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_0033: 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_0043: 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_0053: 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_0063: 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_0073: 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_0083: 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_0093: 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_00a3: 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_00b3: 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); 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); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); } internal static void PassiveSetup(GameObject characterPrefab) { SkillLocator component = characterPrefab.GetComponent(); component.passiveSkill.enabled = false; string text = "_PASSIVE"; LanguageAPI.Add("WOOPER_" + text, "Water Absorb"); LanguageAPI.Add("WOOPER_" + text + "_DESCRIPTION", "Water skills inflict Soaked on-hit for 4s. Ground skills consume Soaked on-hit, slowing, inflicting 120% damage and healing Wooper for 2% health."); LanguageAPI.Add("WOOPER_" + text + "_TOKEN", "Passive"); SkillDef skill = Utils.NewSkillDef(typeof(Idle), "Weapon", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: false, 0, 0, 0, Assets.MainAssetBundle.LoadAsset("passive"), "WOOPER_" + text, "WOOPER_" + text + "_DESCRIPTION", Array.Empty()); GenericSkill val = Utils.NewGenericSkill(characterPrefab, skill); SkillsAPI.SetLoadoutTitleTokenOverride(val, "WOOPER_" + text + "_TOKEN"); } internal static void PrimarySetup(GameObject characterPrefab) { SkillLocator component = characterPrefab.GetComponent(); string text = "_M1"; LanguageAPI.Add("WOOPER_" + text, "Water Gun"); LanguageAPI.Add("WOOPER_" + text + "_DESCRIPTION", "Water. The target is blasted with a forceful shot of water, inflicting 80% damage."); SkillDef skill = Utils.NewSkillDef(typeof(Primary), "Weapon", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: false, 0, 0, 0, Assets.MainAssetBundle.LoadAsset("primary"), "WOOPER_" + text, "WOOPER_" + text + "_DESCRIPTION", Array.Empty()); component.primary = Utils.NewGenericSkill(characterPrefab, skill); text = "_M1_ALT"; LanguageAPI.Add("WOOPER_" + text, "Mud Shot"); LanguageAPI.Add("WOOPER_" + text + "_DESCRIPTION", "Ground. Wooper attacks by hurling a blob of mud at the target, slowing and inflicting 170% damage."); skill = Utils.NewSkillDef(typeof(PrimaryAlt), "Weapon", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: false, 0, 0, 0, Assets.MainAssetBundle.LoadAsset("primaryAlt"), "WOOPER_" + text, "WOOPER_" + text + "_DESCRIPTION", Array.Empty()); Utils.AddAlt(component.primary.skillFamily, skill); } internal static void SecondarySetup(GameObject characterPrefab) { SkillLocator component = characterPrefab.GetComponent(); string text = "_M2"; LanguageAPI.Add("WOOPER_" + text, "Muddy Water"); LanguageAPI.Add("WOOPER_" + text + "_DESCRIPTION", "Water. Wooper attacks by shooting muddy water at targets, slowing and inflicting 260% damage."); SkillDef skill = Utils.NewSkillDef(typeof(Secondary), "Weapon", 1, 6f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset("secondary"), "WOOPER_" + text, "WOOPER_" + text + "_DESCRIPTION", Array.Empty()); component.secondary = Utils.NewGenericSkill(characterPrefab, skill); text = "_M2_ALT"; LanguageAPI.Add("WOOPER_" + text, "Earth Power"); LanguageAPI.Add("WOOPER_" + text + "_DESCRIPTION", "Ground. Stunning. Wooper makes the ground erupt with power, inflicting 560% damage."); skill = Utils.NewSkillDef(typeof(SecondaryAlt), "Weapon", 1, 6f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset("secondaryAlt"), "WOOPER_" + text, "WOOPER_" + text + "_DESCRIPTION", new string[1] { "KEYWORD_STUNNING" }); Utils.AddAlt(component.secondary.skillFamily, skill); text = "_M2_ALT2"; LanguageAPI.Add("WOOPER_" + text, "Whirlpool"); LanguageAPI.Add("WOOPER_" + text + "_DESCRIPTION", "Water. Wooper traps the target inside a violent, swirling whirlpool that inflicts 140% damage per second, for up to 6s."); skill = Utils.NewSkillDef(typeof(SecondaryAlt2), "Weapon", 1, 6f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset("secondaryAlt2"), "WOOPER_" + text, "WOOPER_" + text + "_DESCRIPTION", Array.Empty()); Utils.AddAlt(component.secondary.skillFamily, skill); text = "_M1_ALT2"; LanguageAPI.Add("WOOPER_" + text, "Aqua Tail"); LanguageAPI.Add("WOOPER_" + text + "_DESCRIPTION", "Water. Wooper attacks by swinging its tail, inflicting 170% damage. Every 2nd hit inflicts 200% damage. The attack stacks Soaked up to 3 times, and repeats when hitting targets that have less than 3 stacks."); skill = Utils.NewSkillDef(typeof(PrimaryAlt2), "Weapon", 1, 6f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset("primaryAlt2"), "WOOPER_" + text, "WOOPER_" + text + "_DESCRIPTION", Array.Empty()); Utils.AddAlt(component.secondary.skillFamily, skill); } internal static void UtilitySetup(GameObject characterPrefab) { SkillLocator component = characterPrefab.GetComponent(); string text = "_UTIL"; LanguageAPI.Add("WOOPER_" + text, "Dig"); LanguageAPI.Add("WOOPER_" + text + "_DESCRIPTION", "Ground. Wooper burrows into the ground for a short time, gaining invulnerability, then resurfaces inflicting 280% damage."); SkillDef skill = Utils.NewSkillDef(typeof(Utility), "Weapon", 1, 5f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: true, 1, 1, 1, Assets.MainAssetBundle.LoadAsset("utility"), "WOOPER_" + text, "WOOPER_" + text + "_DESCRIPTION", Array.Empty()); component.utility = Utils.NewGenericSkill(characterPrefab, skill); text = "_UTIL_ALT"; LanguageAPI.Add("WOOPER_" + text, "Protect"); LanguageAPI.Add("WOOPER_" + text + "_DESCRIPTION", "Wooper enters a defensive stance to block all incoming damage. This stance can be held for up to 10s."); skill = Utils.NewSkillDef(typeof(UtilityAlt), "Weapon", 1, 8f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset("utilityAlt"), "WOOPER_" + text, "WOOPER_" + text + "_DESCRIPTION", Array.Empty()); Utils.AddAlt(component.utility.skillFamily, skill); text = "_UTIL_ALT2"; LanguageAPI.Add("WOOPER_" + text, "Waterfall"); LanguageAPI.Add("WOOPER_" + text + "_DESCRIPTION", "Water. Wooper charges upwards in a torrent of water, inflicting 270% damage, then crashes down inflicting 300% damage on impact."); skill = Utils.NewSkillDef(typeof(UtilityAlt2), "Weapon", 1, 8f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset("utilityAlt2"), "WOOPER_" + text, "WOOPER_" + text + "_DESCRIPTION", Array.Empty()); Utils.AddAlt(component.utility.skillFamily, skill); } internal static void SpecialSetup(GameObject characterPrefab) { SkillLocator component = characterPrefab.GetComponent(); string text = "_SPEC"; LanguageAPI.Add("WOOPER_" + text, "Surf"); LanguageAPI.Add("WOOPER_" + text + "_DESCRIPTION", "Water. Wooper attacks everything around it by swamping its surroundings with a giant wave, inflicting 700% damage. It leaves a puddle that inflicts 70% damage per second lasting up to 6s."); SkillDef skill = Utils.NewSkillDef(typeof(Special), "Weapon", 1, 12f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset("special"), "WOOPER_" + text, "WOOPER_" + text + "_DESCRIPTION", Array.Empty()); component.special = Utils.NewGenericSkill(characterPrefab, skill); text = "_SPEC_ALT"; LanguageAPI.Add("WOOPER_" + text, "Earthquake"); LanguageAPI.Add("WOOPER_" + text + "_DESCRIPTION", "Ground. Wooper attacks by setting off an earthquake that strikes a wide area, inflicting 1200% damage."); skill = Utils.NewSkillDef(typeof(SpecialAlt), "Weapon", 1, 12f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset("specialAlt"), "WOOPER_" + text, "WOOPER_" + text + "_DESCRIPTION", Array.Empty()); Utils.AddAlt(component.special.skillFamily, skill); text = "_SPEC_ALT2"; LanguageAPI.Add("WOOPER_" + text, "Stockpile / Swallow / Spit Up"); string text2 = "【Press】Stockpile Wooper stores power and boosts its armor by 5. This move can be used up to 3 times.\n\n"; string text3 = "【Hold】Swallow The power stored using the move Stockpile is absorbed by the user to heal for 25%-100%.\n\n"; string text4 = "【Double Press】Spit Up The power stored using the move Stockpile is released at once in an attack that inflicts 450%-1350%.\n\n"; LanguageAPI.Add("WOOPER_" + text + "_DESCRIPTION", "Wooper executes an ability based on input conditions.\n\n" + text2 + text3 + text4); LanguageAPI.Add("WOOPER_" + text + "_KEYWORD", text2 + text3 + text4); skill = Utils.NewSkillDef(typeof(SpecialAlt2), "Weapon", 1, 8f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset("specialAlt2"), "WOOPER_" + text, "WOOPER_" + text + "_DESCRIPTION", new string[1] { "WOOPER_" + text + "_KEYWORD" }); Utils.AddAlt(component.special.skillFamily, skill); } internal static GameObject CreateBodyPrefab(string characterName, Color bodyColor, float mass, bool large = false, bool flying = false) { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown //IL_00f0: 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_0114: 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_012b: Expected O, but got Unknown //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0294: 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_0327: 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_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0533: 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_0579: Unknown result type (might be due to invalid IL or missing references) //IL_059c: Unknown result type (might be due to invalid IL or missing references) //IL_060e: Unknown result type (might be due to invalid IL or missing references) //IL_0679: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: Unknown result type (might be due to invalid IL or missing references) //IL_06c6: Unknown result type (might be due to invalid IL or missing references) //IL_06d5: Unknown result type (might be due to invalid IL or missing references) //IL_06df: Unknown result type (might be due to invalid IL or missing references) //IL_06e4: Unknown result type (might be due to invalid IL or missing references) //IL_0854: Unknown result type (might be due to invalid IL or missing references) //IL_0859: Unknown result type (might be due to invalid IL or missing references) //IL_086a: Unknown result type (might be due to invalid IL or missing references) //IL_086f: Unknown result type (might be due to invalid IL or missing references) //IL_0895: Unknown result type (might be due to invalid IL or missing references) //IL_089a: Unknown result type (might be due to invalid IL or missing references) string text = characterName.Replace(" ", ""); string text2 = text.ToUpper(); LanguageAPI.Add("WOOPER_" + text2 + "_NAME", characterName); GameObject val = PrefabAPI.InstantiateClone(baseBody, text + "Body", true); val.GetComponent().localPlayerAuthority = true; Object.Destroy((Object)(object)((Component)val.transform.Find("ModelBase")).gameObject); Object.Destroy((Object)(object)((Component)val.transform.Find("CameraPivot")).gameObject); Object.Destroy((Object)(object)((Component)val.transform.Find("AimOrigin")).gameObject); GameObject val2 = Assets.MainAssetBundle.LoadAsset(text + "Mdl"); GameObject val3 = new GameObject("ModelBase"); val3.transform.parent = val.transform; val3.transform.localPosition = new Vector3(0f, -0.94f, 0f); val3.transform.localRotation = Quaternion.identity; val3.transform.localScale = Vector3.one; GameObject val4 = new GameObject("AimOrigin"); val4.transform.parent = val3.transform; val4.transform.localPosition = new Vector3(0f, 1f, 0f); val4.transform.localRotation = Quaternion.identity; val4.transform.localScale = Vector3.one; Transform transform = val2.transform; transform.parent = val3.transform; transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; CharacterDirection component = val.GetComponent(); component.targetTransform = val3.transform; component.modelAnimator = val2.GetComponentInChildren(); component.turnSpeed = 720f; CharacterBody component2 = val.GetComponent(); ((Object)component2).name = text + "Body"; component2.baseNameToken = "WOOPER_" + text2 + "_NAME"; component2.subtitleNameToken = "WOOPER_" + text2 + "_SUBTITLE"; component2.bodyFlags = (BodyFlags)16; component2.aimOriginTransform = val4.transform; component2.hullClassification = (HullClassification)(large ? 1 : 0); Sprite val5 = Assets.MainAssetBundle.LoadAsset(text); component2.portraitIcon = (Texture)(object)(Object.op_Implicit((Object)(object)val5) ? val5.texture : null); component2.isChampion = false; component2.currentVehicle = null; component2.skinIndex = 0u; component2.bodyColor = bodyColor; component2.preferredPodPrefab = null; HealthComponent component3 = val.GetComponent(); component3.health = component2.baseMaxHealth; component3.shield = 0f; component3.barrier = 0f; CharacterMotor component4 = val.GetComponent(); component4.walkSpeedPenaltyCoefficient = 1f; component4.characterDirection = component; component4.muteWalkMotion = false; component4.mass = mass; component4.airControl = 0.25f; component4.disableAirControlUntilCollision = false; component4.generateParametersOnAwake = true; InputBankTest component5 = val.GetComponent(); component5.moveVector = Vector3.zero; CameraTargetParams component6 = val.GetComponent(); component6.cameraParams = baseBody.GetComponent().cameraParams; component6.cameraPivotTransform = null; component6.recoil = Vector2.zero; component6.dontRaycastToPivot = false; ModelLocator component7 = val.GetComponent(); component7.modelTransform = transform; component7.modelBaseTransform = val3.transform; component7.dontReleaseModelOnDeath = false; component7.autoUpdateModelTransform = true; component7.dontDetatchFromParent = false; component7.noCorpse = false; component7.normalizeToFloor = false; component7.preserveModel = false; ChildLocator component8 = val2.GetComponent(); CharacterModel val6 = val2.AddComponent(); SkinnedMeshRenderer[] componentsInChildren = val2.GetComponentsInChildren(); List list = new List(); foreach (SkinnedMeshRenderer val7 in componentsInChildren) { ((Renderer)val7).material = Prefabs.InstantiateDefaultSurvivorMaterial(((Renderer)val7).material.mainTexture); list.Add(new RendererInfo { renderer = (Renderer)(object)val7, defaultMaterial = ((Renderer)val7).material, defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = true }); if (!((Object)val7).name.Contains("base")) { ((Component)val7).gameObject.SetActive(false); } } RendererInfo[] array = list.ToArray(); val6.body = component2; val6.baseRendererInfos = array; val6.autoPopulateLightInfos = true; val6.temporaryOverlays = new List(); val6.mainSkinnedMeshRenderer = componentsInChildren[0]; LanguageAPI.Add(text2 + "BODY_DEFAULT_SKIN_NAME", "Default"); LanguageAPI.Add(text2 + "BODY_SKIN01_NAME", "Shiny"); LanguageAPI.Add(text2 + "BODY_SKIN02_NAME", "Paldean"); LanguageAPI.Add(text2 + "BODY_SKIN03_NAME", "Shiny Paldean"); ModelSkinController val8 = val2.AddComponent(); val8.skins = (SkinDef[])(object)new SkinDef[4] { Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_DEFAULT_SKIN_NAME", "base", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_SKIN01_NAME", "shiny", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_SKIN02_NAME", "paldean", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_SKIN03_NAME", "paldean_shiny", array)) }; Collider[] componentsInChildren2 = val2.GetComponentsInChildren(); HurtBoxGroup val9 = val2.AddComponent(); List list2 = new List(); Collider[] array2 = componentsInChildren2; foreach (Collider val10 in array2) { HurtBox val11 = ((Component)val10).gameObject.AddComponent(); ((Component)val11).gameObject.layer = LayerIndex.entityPrecise.intVal; val11.healthComponent = component3; val11.isBullseye = true; val11.damageModifier = (DamageModifier)0; val11.hurtBoxGroup = val9; val11.indexInGroup = 0; val9.mainHurtBox = val11; val9.bullseyeCount = 1; list2.Add(val11); } val9.hurtBoxes = list2.ToArray(); Utils.CreateHitbox("Tail", val2.transform, new Vector3(4f, 4f, 5f), new Vector3(0f, 0.5f, 2f)); Utils.CreateHitbox("Waterfall", val2.transform, new Vector3(5f, 8f, 5f), new Vector3(0f, 1f, 0f)).transform.localRotation = Quaternion.Euler(Vector3.up * 45f); KinematicCharacterMotor component9 = val.GetComponent(); component9.CharacterController = (ICharacterController)(object)component4; component9.playerCharacter = true; val.GetComponent().maxInteractionDistance = 3f; val.GetComponent().highlightInteractor = true; SfxLocator component10 = val.GetComponent(); component10.deathSound = "Play_ui_player_death"; component10.barkSound = ""; component10.openSound = ""; component10.landingSound = (large ? "Play_gravekeeper_land" : "Play_char_land"); component10.fallDamageSound = "Play_char_land_fall_damage"; component10.aliveLoopStart = ""; component10.aliveLoopStop = ""; val.GetComponent().mass = mass; FootstepHandler val12 = val2.AddComponent(); val12.baseFootstepString = (large ? "Play_beetle_queen_step" : "Play_player_footstep"); val12.sprintFootstepOverrideString = ""; val12.enableFootstepDust = true; val12.footstepDustPrefab = Prefabs.Load(large ? "RoR2/Base/Common/VFX/GenericHugeFootstepDust.prefab" : "RoR2/Base/Common/VFX/GenericFootstepDust.prefab"); GenericSkill[] componentsInChildren3 = val.GetComponentsInChildren(); foreach (GenericSkill val13 in componentsInChildren3) { Object.DestroyImmediate((Object)(object)val13); } if (flying) { Utils.NewStateMachine(val, "Flight"); component10.landingSound = ""; component10.fallDamageSound = ""; } EntityStateMachine component11 = ((Component)component2).GetComponent(); component11.initialStateType = new SerializableEntityStateType(typeof(SpawnState)); component11.mainStateType = new SerializableEntityStateType(typeof(CharacterMain)); CharacterDeathBehavior component12 = val.GetComponent(); component12.deathStateMachine = val.GetComponent(); component12.deathState = new SerializableEntityStateType(typeof(GenericCharacterDeath)); NetworkStateMachine component13 = ((Component)component2).GetComponent(); component13.stateMachines = ((Component)component2).GetComponents(); ContentAddition.AddBody(val); return val; } } internal class Hook { internal static void Hooks() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); } private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { if (Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(Prefabs.protect)) { damageInfo.damage = 0f; damageInfo.rejected = true; } orig.Invoke(self, damageInfo); } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { int buffCount = sender.GetBuffCount(Prefabs.stockpile); if (buffCount > 0) { args.armorAdd += (float)(buffCount * 5); } if (sender.HasBuff(Prefabs.soakedDebuff) && !Object.op_Implicit((Object)(object)((Component)sender).GetComponent())) { ((Component)sender).gameObject.AddComponent(); } } private static void GlobalEventManager_onServerDamageDealt(DamageReport damageReport) { //IL_002a: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: 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_019c: 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_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Expected O, but got Unknown //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)damageReport.attackerBody) || !Object.op_Implicit((Object)(object)damageReport.victimBody)) { return; } if (DamageAPI.HasModdedDamageType(damageReport.damageInfo, Prefabs.waterDMG)) { int buffCount = damageReport.victimBody.GetBuffCount(Prefabs.soakedDebuff); bool flag = DamageAPI.HasModdedDamageType(damageReport.damageInfo, Prefabs.aquaTail); if (buffCount > 0) { damageReport.victimBody.SetTimedBuffDurationIfPresent(Prefabs.soakedDebuff, 4f, flag); } if ((buffCount == 0 && !flag) || (flag && buffCount < 3)) { damageReport.victimBody.AddTimedBuff(Prefabs.soakedDebuff, 4f); } } if (!DamageAPI.HasModdedDamageType(damageReport.damageInfo, Prefabs.groundDMG) || !damageReport.victimBody.HasBuff(Prefabs.soakedDebuff) || damageReport.attackerBody.HasBuff(Prefabs.soakedCooldown)) { return; } damageReport.victimBody.AddTimedBuff(Buffs.Slow60, 1f); int buffCount2 = damageReport.victimBody.GetBuffCount(Prefabs.soakedDebuff); DamageInfo val = new DamageInfo { attacker = damageReport.attacker, crit = damageReport.damageInfo.crit, procCoefficient = 1f, damage = damageReport.attackerBody.damage * 1.2f * (float)buffCount2, position = damageReport.victimBody.corePosition }; EffectManager.SimpleEffect(Prefabs.groundHitSmall, val.position, Quaternion.identity, true); SphereSearch val2 = new SphereSearch { origin = val.position, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, radius = 4f }; HurtBox[] hurtBoxes = val2.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(damageReport.attackerBody.teamComponent.teamIndex)).FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); HurtBox[] array = hurtBoxes; foreach (HurtBox val3 in array) { if (val3.healthComponent.alive) { val.position = ((Component)val3).transform.position; val3.healthComponent.TakeDamage(val); EffectManager.SimpleEffect(Prefabs.groundHitSmall, val.position, Quaternion.identity, true); } } damageReport.victimBody.ClearTimedBuffs(Prefabs.soakedDebuff); damageReport.attackerBody.AddTimedBuff(Prefabs.soakedCooldown, 0.5f); HealthComponent healthComponent = damageReport.attackerBody.healthComponent; HealOrb val4 = new HealOrb(); ((Orb)val4).origin = damageReport.damageInfo.position; ((Orb)val4).target = damageReport.attackerBody.mainHurtBox; val4.healValue = healthComponent.fullHealth * 0.02f; val4.overrideDuration = 0.3f; OrbManager.instance.AddOrb((Orb)(object)val4); } } [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.Dragonyck.Wooper", "Wooper", "1.0.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.Wooper"; public const string MODNAME = "Wooper"; public const string VERSION = "1.0.0"; internal const string MODKEY = "WOOPER_"; private void Awake() { Assets.PopulateAssets(); Prefabs.CreatePrefabs(); CharacterBodySetup.CreateCharacterBodies(); Hook.Hooks(); } } internal class Prefabs { internal static GameObject waterGunProjectileGhost; internal static GameObject waterGunProjectile; internal static GameObject surfProjectileExplosion; internal static GameObject surfProjectile; internal static GameObject surfProjectileGhost; internal static GameObject shieldEffect; internal static GameObject digEffect; internal static GameObject emergeEffect; internal static GameObject groundHit; internal static GameObject groundHitSmall; internal static GameObject waterHit; internal static GameObject waterHitSmall; internal static GameObject mudProjectileGhost; internal static GameObject mudProjectile; internal static GameObject mudProjectileImpact; internal static GameObject mudPuddleProjectile; internal static GameObject mudPuddleProjectileDotZoneGhost; internal static GameObject mudPuddleProjectileDotZone; internal static GameObject waterPuddleProjectileDotZone; internal static GameObject groundSmokeImpact; internal static GameObject earthQuakeImpact; internal static GameObject whirlpoolProjectileGhost; internal static GameObject whirlpoolProjectile; internal static GameObject mudSpurtEffect; internal static GameObject mudPuddleProjectileImpact; internal static GameObject mudHit; internal static GameObject waterfallExplosion; internal static GameObject waterfallMuzzleEffect; internal static GameObject waterfallDownwardMuzzleEffect; internal static GameObject spitUpMuzzleEffect; internal static GameObject spitUpHit; internal static GameObject stockpileEffect; internal static GameObject swallowEffect; internal static GameObject spitUpProjectile; internal static GameObject spitUpProjectileGhost; internal static GameObject pokeball; internal static GameObject spawnEffect; internal static GameObject spawnEffectShiny; internal static GameObject waterMuzzleEffect; internal static GameObject mudMuzzleEffect; internal static Material soakedOverlay; internal static BuffDef soakedDebuff; internal static BuffDef soakedCooldown; internal static BuffDef protect; internal static BuffDef stockpile; internal static ModdedDamageType groundDMG; internal static ModdedDamageType waterDMG; internal static ModdedDamageType aquaTail; internal static Material baseMaterial = Load("RoR2/Base/Commando/matCommandoDualies.mat"); internal static void CreatePrefabs() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //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_00ea: 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_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0151: 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_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_0506: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Unknown result type (might be due to invalid IL or missing references) //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_05c5: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_085d: Unknown result type (might be due to invalid IL or missing references) //IL_0862: Unknown result type (might be due to invalid IL or missing references) //IL_094b: Unknown result type (might be due to invalid IL or missing references) //IL_0973: Unknown result type (might be due to invalid IL or missing references) //IL_0978: Unknown result type (might be due to invalid IL or missing references) //IL_098b: Unknown result type (might be due to invalid IL or missing references) //IL_0995: Unknown result type (might be due to invalid IL or missing references) //IL_0a28: Unknown result type (might be due to invalid IL or missing references) //IL_0a89: Unknown result type (might be due to invalid IL or missing references) //IL_0a93: Unknown result type (might be due to invalid IL or missing references) //IL_08fc: Unknown result type (might be due to invalid IL or missing references) //IL_0abb: Unknown result type (might be due to invalid IL or missing references) //IL_0ac0: Unknown result type (might be due to invalid IL or missing references) //IL_0acd: Unknown result type (might be due to invalid IL or missing references) //IL_0ad2: Unknown result type (might be due to invalid IL or missing references) //IL_0b1c: Unknown result type (might be due to invalid IL or missing references) //IL_0b58: Unknown result type (might be due to invalid IL or missing references) //IL_0b5d: Unknown result type (might be due to invalid IL or missing references) //IL_0bbc: Unknown result type (might be due to invalid IL or missing references) //IL_0bc6: Unknown result type (might be due to invalid IL or missing references) //IL_0bf6: Unknown result type (might be due to invalid IL or missing references) //IL_0bfb: Unknown result type (might be due to invalid IL or missing references) //IL_0c3b: Unknown result type (might be due to invalid IL or missing references) //IL_0c45: Unknown result type (might be due to invalid IL or missing references) //IL_0d06: Unknown result type (might be due to invalid IL or missing references) //IL_0d0b: Unknown result type (might be due to invalid IL or missing references) //IL_0d0f: Unknown result type (might be due to invalid IL or missing references) //IL_0d24: Unknown result type (might be due to invalid IL or missing references) //IL_0d26: Unknown result type (might be due to invalid IL or missing references) //IL_0e58: Unknown result type (might be due to invalid IL or missing references) //IL_0e5f: Expected O, but got Unknown //IL_0e91: Unknown result type (might be due to invalid IL or missing references) //IL_0e96: Unknown result type (might be due to invalid IL or missing references) //IL_0f9e: Unknown result type (might be due to invalid IL or missing references) //IL_0fa8: Unknown result type (might be due to invalid IL or missing references) //IL_0fc8: Unknown result type (might be due to invalid IL or missing references) //IL_0fcd: Unknown result type (might be due to invalid IL or missing references) //IL_0fd1: Unknown result type (might be due to invalid IL or missing references) //IL_0fe6: Unknown result type (might be due to invalid IL or missing references) //IL_0fe8: Unknown result type (might be due to invalid IL or missing references) //IL_105e: Unknown result type (might be due to invalid IL or missing references) //IL_1199: Unknown result type (might be due to invalid IL or missing references) //IL_119e: Unknown result type (might be due to invalid IL or missing references) //IL_12af: Unknown result type (might be due to invalid IL or missing references) //IL_1361: Unknown result type (might be due to invalid IL or missing references) //IL_1367: Unknown result type (might be due to invalid IL or missing references) //IL_136c: Unknown result type (might be due to invalid IL or missing references) //IL_1371: Unknown result type (might be due to invalid IL or missing references) //IL_1375: Unknown result type (might be due to invalid IL or missing references) //IL_138a: Unknown result type (might be due to invalid IL or missing references) //IL_138c: Unknown result type (might be due to invalid IL or missing references) //IL_143a: Unknown result type (might be due to invalid IL or missing references) //IL_1441: Expected O, but got Unknown //IL_1451: Unknown result type (might be due to invalid IL or missing references) //IL_1456: Unknown result type (might be due to invalid IL or missing references) //IL_1310: Unknown result type (might be due to invalid IL or missing references) //IL_1315: Unknown result type (might be due to invalid IL or missing references) //IL_1328: Unknown result type (might be due to invalid IL or missing references) //IL_1332: Unknown result type (might be due to invalid IL or missing references) //IL_14c6: Unknown result type (might be due to invalid IL or missing references) //IL_14cb: Unknown result type (might be due to invalid IL or missing references) //IL_151d: Unknown result type (might be due to invalid IL or missing references) //IL_1524: Expected O, but got Unknown //IL_152b: Unknown result type (might be due to invalid IL or missing references) //IL_15cf: Unknown result type (might be due to invalid IL or missing references) //IL_15d6: Expected O, but got Unknown //IL_15e6: Unknown result type (might be due to invalid IL or missing references) //IL_15eb: Unknown result type (might be due to invalid IL or missing references) //IL_1647: Unknown result type (might be due to invalid IL or missing references) //IL_1651: Unknown result type (might be due to invalid IL or missing references) //IL_1673: Unknown result type (might be due to invalid IL or missing references) //IL_1678: Unknown result type (might be due to invalid IL or missing references) //IL_167c: Unknown result type (might be due to invalid IL or missing references) //IL_169b: Unknown result type (might be due to invalid IL or missing references) //IL_16a0: Unknown result type (might be due to invalid IL or missing references) //IL_16a4: Unknown result type (might be due to invalid IL or missing references) //IL_16b9: Unknown result type (might be due to invalid IL or missing references) //IL_16bb: Unknown result type (might be due to invalid IL or missing references) //IL_17f8: Unknown result type (might be due to invalid IL or missing references) //IL_1828: Unknown result type (might be due to invalid IL or missing references) //IL_182d: Unknown result type (might be due to invalid IL or missing references) //IL_18c7: Unknown result type (might be due to invalid IL or missing references) //IL_18e2: Unknown result type (might be due to invalid IL or missing references) //IL_18e9: Expected O, but got Unknown //IL_1942: Unknown result type (might be due to invalid IL or missing references) //IL_1960: Unknown result type (might be due to invalid IL or missing references) //IL_1967: Expected O, but got Unknown //IL_1a33: Unknown result type (might be due to invalid IL or missing references) //IL_1a38: Unknown result type (might be due to invalid IL or missing references) //IL_1a3c: Unknown result type (might be due to invalid IL or missing references) //IL_1a51: Unknown result type (might be due to invalid IL or missing references) //IL_1a53: Unknown result type (might be due to invalid IL or missing references) groundDMG = DamageAPI.ReserveDamageType(); waterDMG = DamageAPI.ReserveDamageType(); aquaTail = DamageAPI.ReserveDamageType(); protect = Utils.NewBuffDef("Protect", stack: false, hidden: false, isDebuff: false, isCooldown: false, Assets.Load("reflectBuff"), Color32.op_Implicit(new Color32((byte)0, (byte)151, byte.MaxValue, byte.MaxValue))); soakedOverlay = new Material(Load("RoR2/DLC2/Chef/Buffs/matChefOiledDebuffOverlay.mat")); soakedOverlay.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)58, (byte)153, byte.MaxValue, (byte)105))); soakedOverlay.SetFloat("_AlphaBoost", 10f); soakedOverlay.SetTexture("_RemapTex", (Texture)(object)Load("RoR2/Base/Common/ColorRamps/texRampHuntressSoft.png")); Sprite sprite = Load("RoR2/Base/Common/texBuffBleedingIcon.tif"); soakedDebuff = Utils.NewBuffDef("Soaked", stack: true, hidden: false, isDebuff: true, isCooldown: false, sprite, Color32.op_Implicit(new Color32((byte)186, (byte)231, (byte)236, byte.MaxValue))); soakedCooldown = Utils.NewBuffDef("Soaked Cooldown", stack: false, hidden: false, isDebuff: false, isCooldown: true, sprite, Color32.op_Implicit(new Color32((byte)186, (byte)20, (byte)83, byte.MaxValue))); stockpile = Utils.NewBuffDef("Stockpile", stack: true, hidden: false, isDebuff: false, isCooldown: true, Assets.Load("stockpileBuff"), Color32.op_Implicit(new Color32((byte)139, (byte)147, (byte)228, byte.MaxValue))); surfProjectileExplosion = Instantiate(Assets.Load("WaveExplosion"), "SurfProjectileExplosion"); Utils.RegisterEffect(surfProjectileExplosion, 1.5f, "Play_Wooper_Water_Explosion"); swallowEffect = Instantiate(Assets.Load("SwallowEffect"), "SwallowEffect"); Utils.RegisterEffect(swallowEffect, 1f); stockpileEffect = Instantiate(Assets.Load("StockpileEffect"), "StockpileEffect"); Utils.RegisterEffect(stockpileEffect, 1.5f); GameObject obj = Assets.Load("WaterHit"); waterMuzzleEffect = Instantiate(obj, "WaterHit"); ((Component)waterMuzzleEffect.transform.GetChild(0)).transform.localScale = Vector3.one * 0.75f; Utils.RegisterEffect(waterMuzzleEffect, 1f); spawnEffect = Instantiate(Assets.Load("SpawnEffect"), "SpawnEffect"); Utils.RegisterEffect(spawnEffect, 1f); spawnEffectShiny = Instantiate(Assets.Load("SpawnEffectShiny"), "SpawnEffectShiny"); Utils.RegisterEffect(spawnEffectShiny, 1f); pokeball = Instantiate(Assets.Load("pokeballMdl"), "Pokeball"); Utils.RegisterEffect(pokeball, 0.62f); groundHit = Instantiate(Assets.Load("RockHit"), "GroundHit"); Utils.RegisterEffect(groundHit, 1f); groundHitSmall = Instantiate(Assets.Load("RockHitSmall"), "GroundHitSmall"); Utils.RegisterEffect(groundHitSmall, 1f); waterHit = Instantiate(obj, "WaterHit"); Utils.RegisterEffect(waterHit, 1f, "Play_clayGrenadier_attack2_explode"); waterHitSmall = Instantiate(obj, "WaterHitSmall"); Utils.RegisterEffect(waterHitSmall, 1f, "Play_Wooper_Water_Hit_Small"); waterfallExplosion = Instantiate(Assets.Load("WaterfallExplosion"), "WaterfallExplosion"); Utils.RegisterEffect(waterfallExplosion, 1f, "Play_Wooper_Water_Explosion"); spitUpHit = Instantiate(Assets.Load("SpitUpHitEffect"), "SpitUpHitEffect"); Utils.RegisterEffect(spitUpHit, 1f, "Play_Wooper_SpitUp_Impact"); spitUpMuzzleEffect = Instantiate(Assets.Load("SpitUpMuzzleEffect"), "SpitUpMuzzleEffect"); Utils.RegisterEffect(spitUpMuzzleEffect, 1f); waterfallMuzzleEffect = Instantiate(Assets.Load("WaterfallMuzzleEffect"), "WaterfallMuzzleEffect"); DestroyOnTimer val = waterfallMuzzleEffect.AddComponent(); val.duration = 1f; ((Behaviour)val).enabled = false; waterfallDownwardMuzzleEffect = Instantiate(Assets.Load("WaterfallDownwardMuzzleEffect"), "WaterfallDownwardMuzzleEffect"); val = waterfallDownwardMuzzleEffect.AddComponent(); val.duration = 1f; ((Behaviour)val).enabled = false; Color val2 = Color32.op_Implicit(new Color32((byte)9, (byte)4, (byte)3, byte.MaxValue)); Texture2D val3 = Load("RoR2/Base/blackbeach/texBbDecalMask1.png"); Material material = Utils.CreateClayMat("RoR2/Base/ClayBoss/matGooTrail.mat", val2); Material material2 = Utils.CreateClayMat("RoR2/Base/Common/VFX/matBloodClayLarge.mat", val2); Material material3 = Utils.CreateClayMat("RoR2/Base/Common/VFX/matBloodClaySingle.mat", val2); Material material4 = Utils.CreateClayMat("RoR2/DLC1/ClayGrenadier/matClayGrenadierShockwave.mat", val2); Material material5 = Utils.CreateClayMat("RoR2/Base/Clay/matClayGooFizzle.mat", val2); Material material6 = Utils.CreateClayMat("RoR2/Base/ClayBoss/matGooTrailLegs.mat", Color32.op_Implicit(new Color32((byte)9, (byte)5, (byte)0, byte.MaxValue))); Material material7 = Utils.CreateClayMat("RoR2/DLC1/ClayGrenadier/matClayGooDecalMediumSplat.mat", Color32.op_Implicit(new Color32((byte)19, (byte)7, (byte)4, byte.MaxValue)), "_Color"); mudMuzzleEffect = Instantiate("RoR2/Base/ClayBoss/MuzzleflashClayBoss.prefab", "MudMuzzleEffect"); mudMuzzleEffect.transform.localScale = Vector3.one * 0.15f; ParticleSystemRenderer[] componentsInChildren = mudMuzzleEffect.GetComponentsInChildren(); foreach (ParticleSystemRenderer val4 in componentsInChildren) { MainModule main = ((Component)val4).GetComponent().main; ((MainModule)(ref main)).scalingMode = (ParticleSystemScalingMode)0; switch (((Object)val4).name) { case "Goo": ((Renderer)val4).material = material2; break; case "Donut": ((Renderer)val4).material = material; break; case "Tube": ((Renderer)val4).material = material6; break; } } ContentAddition.AddEffect(mudMuzzleEffect); mudHit = Instantiate("RoR2/DLC1/ClayGrenadier/ClayGrenadierBarrelExplosion.prefab", "MudHit"); mudHit.GetComponentInChildren().Material = material7; ParticleSystemRenderer[] componentsInChildren2 = mudHit.GetComponentsInChildren(); foreach (ParticleSystemRenderer val5 in componentsInChildren2) { switch (((Object)val5).name) { case "Goo": ((Renderer)val5).material = material2; break; case "Ring": ((Renderer)val5).material = material6; break; case "Goo, Billboard": ((Renderer)val5).material = material5; break; } } ContentAddition.AddEffect(mudHit); mudPuddleProjectileImpact = Instantiate("RoR2/DLC1/ClayGrenadier/ClayGrenadierMortarExplosion.prefab", "MudPuddleProjectileImpact"); ((Component)mudPuddleProjectileImpact.GetComponentInChildren()).gameObject.SetActive(false); ((Component)mudPuddleProjectileImpact.GetComponentInChildren()).gameObject.SetActive(false); ParticleSystemRenderer[] componentsInChildren3 = mudPuddleProjectileImpact.GetComponentsInChildren(); foreach (ParticleSystemRenderer val6 in componentsInChildren3) { switch (((Object)val6).name) { case "Omni, Directional": ((Renderer)val6).material = material5; break; case "Billboard, Big Splash": case "Billboard, Splash": ((Renderer)val6).material = material2; break; case "Ring": case "Ring, Out": ((Renderer)val6).material = material4; break; case "Dust,Edge": ((Component)val6).gameObject.SetActive(false); break; } } ContentAddition.AddEffect(mudPuddleProjectileImpact); mudSpurtEffect = Instantiate("RoR2/Base/ClayBruiser/ClayShockwaveEffect.prefab", "MudSpurtEffect"); ParticleSystemRenderer[] componentsInChildren4 = mudSpurtEffect.GetComponentsInChildren(); foreach (ParticleSystemRenderer val7 in componentsInChildren4) { MainModule main2 = ((Component)val7).GetComponent().main; ((MainModule)(ref main2)).scalingMode = (ParticleSystemScalingMode)0; switch (((Object)val7).name) { case "Pollen, Single": ((Renderer)val7).material = material3; break; case "Pollen, Dust": ((Renderer)val7).material = material2; break; case "Pollen, Radial": ((Renderer)val7).material = material6; break; case "Pollen, Single (1)": ((Renderer)val7).material = material3; ((Component)val7).transform.localScale = new Vector3(3f, 1f, 3f); break; } } ContentAddition.AddEffect(mudSpurtEffect); earthQuakeImpact = Instantiate("RoR2/Base/Parent/ParentSlamEffect.prefab", "EarthQuakeImpact"); earthQuakeImpact.transform.GetChild(0).localPosition = Vector3.zero; ParticleSystem[] componentsInChildren5 = earthQuakeImpact.GetComponentsInChildren(true); foreach (ParticleSystem val8 in componentsInChildren5) { MainModule main3 = val8.main; ((MainModule)(ref main3)).scalingMode = (ParticleSystemScalingMode)0; Transform transform = ((Component)val8).transform; transform.localScale /= 6f; } Utils.RegisterEffect(earthQuakeImpact, 1.2f, "Play_parent_attack1_slam", applyScale: true); groundSmokeImpact = Instantiate("RoR2/Base/Toolbot/TracerToolbotRebar.prefab", "GroundSmokeImpact"); Object.Destroy((Object)(object)groundSmokeImpact.GetComponent()); ((Component)groundSmokeImpact.GetComponentInChildren()).gameObject.SetActive(false); ((Component)groundSmokeImpact.GetComponentInChildren()).gameObject.SetActive(false); groundSmokeImpact.transform.GetChild(0).localRotation = Quaternion.identity; Utils.RegisterEffect(groundSmokeImpact, -1f, "Play_grandParent_attack1_boulderSmall_impact"); string path = "RoR2/Base/BeetleGuard/SunderGhost.prefab"; digEffect = Instantiate(path, "DigEffect"); Object.Destroy((Object)(object)digEffect.GetComponent()); digEffect.AddComponent(); digEffect.transform.localScale = Vector3.one * 0.15f; ParticleSystem[] componentsInChildren6 = digEffect.GetComponentsInChildren(true); foreach (ParticleSystem val9 in componentsInChildren6) { MainModule main4 = val9.main; ((MainModule)(ref main4)).scalingMode = (ParticleSystemScalingMode)0; EmissionModule emission = val9.emission; ((EmissionModule)(ref emission)).rateOverTimeMultiplier = 200f; } emergeEffect = Instantiate(path, "DigEmergeEffect"); Object.Destroy((Object)(object)emergeEffect.GetComponent()); emergeEffect.transform.localScale = Vector3.one; emergeEffect.GetComponent().duration = 0.6f; ParticleSystem[] componentsInChildren7 = emergeEffect.GetComponentsInChildren(true); foreach (ParticleSystem val10 in componentsInChildren7) { MainModule main5 = val10.main; ((MainModule)(ref main5)).loop = false; ((MainModule)(ref main5)).scalingMode = (ParticleSystemScalingMode)0; } Utils.RegisterEffect(emergeEffect, 1.2f, "Play_grandParent_attack1_boulderLarge_impact"); shieldEffect = Instantiate(Assets.Load("ReflectShield"), "ReflectShield"); shieldEffect.transform.localScale = Vector3.one * 0.5f; Material val11 = Object.Instantiate(Load("RoR2/Base/Engi/matDefenseMatrix.mat")); val11.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)0, (byte)89, byte.MaxValue, byte.MaxValue))); val11.SetTexture("_RemapTex", (Texture)(object)Assets.Load("shieldRamp")); val11.SetTexture("_Cloud1Tex", (Texture)(object)Assets.Load("shieldTex")); val11.SetTextureScale("_Cloud1Tex", Vector2.one * 10f); val11.SetFloat("_SoftPower", 0f); val11.SetFloat("_Boost", 0.6f); val11.SetFloat("_RimPower", 2.4f); ((Renderer)shieldEffect.GetComponentInChildren()).material = val11; waterGunProjectileGhost = Instantiate(Assets.Load("WaterProjectile"), "WaterGunProjectileGhost"); waterGunProjectileGhost.AddComponent(); Utils.AddScaleComponent(waterGunProjectileGhost, 0.1f); waterGunProjectile = Instantiate("RoR2/Base/Mage/MageIceBombProjectile.prefab", "WaterGunProjectile", registerNetwork: true); Object.Destroy((Object)(object)waterGunProjectile.GetComponent()); waterGunProjectile.GetComponent().ghostPrefab = waterGunProjectileGhost; DamageTypeCombo genericPrimary = DamageTypeCombo.GenericPrimary; DamageAPI.AddModdedDamageType(ref genericPrimary, waterDMG); waterGunProjectile.GetComponent().damageType = genericPrimary; waterGunProjectile.AddComponent().radius = 0.5f; ProjectileSimple component = waterGunProjectile.GetComponent(); component.lifetime = 1.5f; ProjectileImpactExplosion val12 = waterGunProjectile.AddComponent(); val12.destroyOnWorld = true; val12.impactOnWorld = true; val12.lifetime = component.lifetime; ((ProjectileExplosion)val12).blastRadius = 0f; ((ProjectileExplosion)val12).blastDamageCoefficient = 0f; val12.impactEffect = waterHitSmall; ((ProjectileExplosion)val12).blastProcCoefficient = 0.9f; waterGunProjectile.AddComponent(); waterGunProjectile.GetComponent().impactEffect = waterHitSmall; waterGunProjectile.AddComponent().soundID = "Play_Wooper_Water_Projectile_Small"; ContentAddition.AddProjectile(waterGunProjectile); Material val13 = Load("RoR2/Base/LunarExploder/matLunarExploderDeathDecal.mat"); GameObject obj2 = Load("RoR2/Base/LunarExploder/LunarExploderProjectileDotZone.prefab"); waterPuddleProjectileDotZone = Instantiate(obj2, "WaterPuddleProjectileDotZone", registerNetwork: true); ProjectileDotZone component2 = waterPuddleProjectileDotZone.GetComponent(); component2.damageCoefficient = 1f; component2.fireFrequency = 1f; component2.resetFrequency = 1f; component2.lifetime = 6f; Material val14 = new Material(val13); val14.SetTexture("_MaskTex", (Texture)(object)Load("RoR2/Base/Common/VFX/ParticleMasks/texGlowPaintMask.png")); val14.SetColor("_Color", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, (byte)165))); val14.SetTexture("_Cloud1Tex", (Texture)(object)Load("RoR2/Base/Common/TiledTextures/texCloudWaterRipples.png")); val14.SetTexture("_Cloud2Tex", (Texture)(object)Load("RoR2/Base/Common/TiledTextures/texCloudOrganic1.png")); val14.SetTexture("_RemapTex", (Texture)(object)Load("RoR2/Base/Common/ColorRamps/texRampHuntress.png")); val14.SetFloat("_AlphaBoost", 3f); waterPuddleProjectileDotZone.GetComponentInChildren().Material = val14; waterPuddleProjectileDotZone.GetComponentInChildren().range = 18f; ((Component)waterPuddleProjectileDotZone.GetComponentInChildren()).gameObject.SetActive(false); EnumerableExtensions.ForEachTry((IEnumerable)waterPuddleProjectileDotZone.GetComponentsInChildren(), (Action)delegate(ParticleSystem x) { ((Component)x).gameObject.SetActive(false); }, (IDictionary)null); ContentAddition.AddProjectile(waterPuddleProjectileDotZone); surfProjectileGhost = Instantiate(Assets.Load("WaveProjectile"), "SurfProjectileGhost"); surfProjectileGhost.AddComponent(); surfProjectileGhost.transform.localScale = Vector3.one * 2f; surfProjectile = Instantiate("RoR2/Base/Brother/BrotherSunderWave.prefab", "SurfProjectile", registerNetwork: true); genericPrimary = DamageTypeCombo.GenericPrimary; DamageAPI.AddModdedDamageType(ref genericPrimary, waterDMG); surfProjectile.GetComponent().damageType = genericPrimary; surfProjectile.GetComponent().ghostPrefab = surfProjectileGhost; surfProjectile.GetComponent().radius = 0f; ProjectileCharacterController component3 = surfProjectile.GetComponent(); component3.velocity = 20f; component3.lifetime = 8f; ((Component)surfProjectile.transform.GetChild(0)).transform.localScale = new Vector3(45f, 30f, 20f); ProjectileOverlapAttack component4 = surfProjectile.GetComponent(); component4.impactEffect = waterHit; component4.resetInterval = 2f; component4.pushAwayForce = 2400f; ProjectileImpactExplosion val15 = surfProjectile.AddComponent(); val15.destroyOnWorld = false; val15.impactOnWorld = false; val15.destroyOnEnemy = false; val15.detonateOnEnemy = false; val15.lifetime = 4f; ((ProjectileExplosion)val15).fireChildren = true; ((ProjectileExplosion)val15).childrenCount = 1; ((ProjectileExplosion)val15).childrenInheritDamageType = true; ((ProjectileExplosion)val15).childrenProjectilePrefab = waterPuddleProjectileDotZone; ((ProjectileExplosion)val15).childrenDamageCoefficient = 0.1f; val15.impactEffect = surfProjectileExplosion; val15.explodeOnLifeTimeExpiration = false; surfProjectile.AddComponent(); surfProjectile.AddComponent().soundID = "Play_Wooper_Water_Projectile_Low"; ContentAddition.AddProjectile(surfProjectile); mudProjectileImpact = Instantiate("RoR2/DLC1/ClayGrenadier/ClayGrenadierBarrelExplosion.prefab", "MudProjectileImpact"); Object.Destroy((Object)(object)mudProjectileImpact.GetComponent()); ((Component)mudProjectileImpact.GetComponentInChildren()).gameObject.SetActive(false); ParticleSystem[] componentsInChildren8 = mudProjectileImpact.GetComponentsInChildren(); foreach (ParticleSystem val16 in componentsInChildren8) { MainModule main6 = val16.main; ((MainModule)(ref main6)).loop = false; ParticleSystemRenderer component5 = ((Component)val16).GetComponent(); switch (((Object)val16).name) { case "Flash": ((Component)val16).gameObject.SetActive(false); break; case "Goo": ((Renderer)component5).material = material2; break; case "Ring": ((Renderer)component5).material = material6; break; case "Goo, Billboard": ((Renderer)component5).material = material5; break; } } ContentAddition.AddEffect(mudProjectileImpact); mudProjectileGhost = Instantiate("RoR2/Base/ClayBoss/TarballGhost.prefab", "MudProjectileGhost"); TrailRenderer componentInChildren = mudProjectileGhost.GetComponentInChildren(); componentInChildren.widthMultiplier = 0.7f; componentInChildren.time = 0.35f; ((Renderer)componentInChildren).material = material; MeshRenderer componentInChildren2 = mudProjectileGhost.GetComponentInChildren(); ((Renderer)componentInChildren2).enabled = false; ((Component)componentInChildren2).transform.localPosition = Vector3.zero; ParticleSystemRenderer[] componentsInChildren9 = mudProjectileGhost.GetComponentsInChildren(); foreach (ParticleSystemRenderer val17 in componentsInChildren9) { string name = ((Object)val17).name; if (name == "Goo") { ((Renderer)val17).material = material2; } else { ((Renderer)val17).material = material; } MainModule main7 = ((Component)val17).GetComponent().main; ((MainModule)(ref main7)).loop = true; Transform transform2 = ((Component)val17).transform; transform2.localScale *= 0.35f; } mudProjectile = Instantiate("RoR2/DLC1/ClayGrenadier/ClayGrenadierBarrelProjectile.prefab", "MudProjectile", registerNetwork: true); genericPrimary = DamageTypeCombo.GenericPrimary | DamageTypeCombo.op_Implicit((DamageType)8); DamageAPI.AddModdedDamageType(ref genericPrimary, groundDMG); mudProjectile.GetComponent().damageType = genericPrimary; mudProjectile.GetComponent().ghostPrefab = mudProjectileGhost; mudProjectile.GetComponent().impactEffect = mudProjectileImpact; mudProjectile.GetComponent().useGravity = false; mudProjectile.AddComponent(); ContentAddition.AddProjectile(mudProjectile); Texture2D val18 = Load("RoR2/Base/Common/ColorRamps/texRampAreaIndicator.png"); mudPuddleProjectileDotZoneGhost = Instantiate("RoR2/Base/ClayBoss/ClayBossSpawnEffect.prefab", "MudPuddleProjectileDotZoneGhost"); Object.Destroy((Object)(object)mudPuddleProjectileDotZoneGhost.GetComponent()); mudPuddleProjectileDotZoneGhost.AddComponent(); mudPuddleProjectileDotZoneGhost.GetComponent().maxDistance = 10f; Material val19 = new Material(Load("RoR2/Base/Clay/matClayBossGooDecal.mat")); val19.SetColor("_Color", Color32.op_Implicit(new Color32((byte)19, (byte)7, (byte)4, byte.MaxValue))); val19.SetFloat("_DecalSrcBlend", 5f); val19.SetFloat("_DecalDstBlend", 12f); val19.SetTexture("_RemapTex", (Texture)(object)val18); mudPuddleProjectileDotZoneGhost.GetComponentInChildren(true).Material = val19; ParticleSystem[] componentsInChildren10 = mudPuddleProjectileDotZoneGhost.GetComponentsInChildren(true); foreach (ParticleSystem val20 in componentsInChildren10) { MainModule main8 = val20.main; ((MainModule)(ref main8)).duration = 1f; ((MainModule)(ref main8)).loop = true; ParticleSystemRenderer component6 = ((Component)val20).GetComponent(); string name2 = ((Object)val20).name; if (name2 == "FizzBurst") { ((Renderer)component6).material = material5; continue; } Material val21 = new Material(((Renderer)component6).material); val21.SetColor("_EmissionColor", val2); ((Renderer)component6).material = val21; } mudPuddleProjectileDotZone = Instantiate(obj2, "MudPuddleProjectileDotZone", registerNetwork: true); HitBox[] hitBoxes = mudPuddleProjectileDotZone.GetComponent().hitBoxes; foreach (HitBox val22 in hitBoxes) { ((Component)val22).transform.parent = mudPuddleProjectileDotZone.transform; } Object.Destroy((Object)(object)((Component)mudPuddleProjectileDotZone.transform.GetChild(0)).gameObject); TeamAreaIndicator componentInChildren3 = mudPuddleProjectileDotZone.GetComponentInChildren(); Material val23 = new Material(val13); val23.SetColor("_Color", Color32.op_Implicit(new Color32((byte)19, (byte)7, (byte)4, byte.MaxValue))); val23.SetTexture("_MaskTex", (Texture)(object)val3); val23.SetFloat("_DecalSrcBlend", 5f); val23.SetFloat("_DecalDstBlend", 12f); val23.SetTexture("_Cloud1Tex", (Texture)(object)Load("RoR2/Base/Common/texCloudWaterFoam2.psd")); val23.SetTextureScale("_Cloud1Tex", Vector2.one * 12f); val23.SetTexture("_RemapTex", (Texture)(object)val18); Object.Destroy((Object)(object)componentInChildren3); genericPrimary = DamageTypeCombo.Generic; DamageAPI.AddModdedDamageType(ref genericPrimary, waterDMG); mudPuddleProjectileDotZone.GetComponent().ghostPrefab = mudPuddleProjectileDotZoneGhost; genericPrimary = DamageTypeCombo.GenericSecondary; DamageAPI.AddModdedDamageType(ref genericPrimary, waterDMG); mudPuddleProjectileDotZone.GetComponent().damageType = genericPrimary; ProjectileDotZone component7 = mudPuddleProjectileDotZone.GetComponent(); component7.lifetime = 7f; component7.damageCoefficient = 0.25f; component7.overlapProcCoefficient = 0.3f; component7.fireFrequency = 4f; ContentAddition.AddProjectile(mudPuddleProjectileDotZone); mudPuddleProjectile = Instantiate(mudProjectile, "MudPuddleProjectile", registerNetwork: true); mudPuddleProjectile.GetComponent().desiredForwardSpeed = 10f; ProjectileImpactExplosion component8 = mudPuddleProjectile.GetComponent(); ((ProjectileExplosion)component8).childrenCount = 1; ((ProjectileExplosion)component8).fireChildren = true; ((ProjectileExplosion)component8).childrenDamageCoefficient = 1f; ((ProjectileExplosion)component8).childrenProjectilePrefab = mudPuddleProjectileDotZone; ((ProjectileExplosion)component8).blastDamageCoefficient = 0f; component8.destroyOnEnemy = false; component8.detonateOnEnemy = false; component8.destroyOnWorld = true; component8.impactOnWorld = true; ((ProjectileExplosion)component8).blastRadius = 20f; component8.impactEffect = mudPuddleProjectileImpact; ((ProjectileExplosion)component8).childrenInheritDamageType = false; mudPuddleProjectile.GetComponent().useGravity = true; ContentAddition.AddProjectile(mudPuddleProjectile); Texture2D val24 = Load("RoR2/DLC2/Items/SpeedBoostPickup/texElusiveAntlersRamp.png"); whirlpoolProjectileGhost = Instantiate("RoR2/Base/ElementalRings/FireTornadoGhost.prefab", "WhirlpoolProjectileGhost"); whirlpoolProjectileGhost.GetComponentInChildren(true).color = Color.cyan; ParticleSystemRenderer[] componentsInChildren11 = whirlpoolProjectileGhost.GetComponentsInChildren(true); foreach (ParticleSystemRenderer val25 in componentsInChildren11) { MainModule main9 = ((Component)val25).GetComponent().main; ((MainModule)(ref main9)).simulationSpeed = 2f; ((MainModule)(ref main9)).duration = 0.6f; switch (((Object)val25).name) { case "TornadoMeshCore": { ((Component)val25).transform.localScale = new Vector3(8f, 8f, 0.05f); ((MainModule)(ref main9)).loop = true; Material val27 = new Material(((Renderer)val25).material); val27.SetTexture("_MainTex", (Texture)(object)Load("RoR2/Base/Common/TiledTextures/texCloudWaterRipples.png")); val27.SetTexture("_RemapTex", (Texture)(object)val24); val27.SetTexture("_Cloud2Tex", (Texture)null); ((Renderer)val25).material = val27; break; } case "TornadoMeshCore, Wide": { ((Component)val25).transform.localScale = new Vector3(1.4f, 1.4f, 2f); ((MainModule)(ref main9)).loop = true; Material val26 = new Material(Load("RoR2/Base/Common/VFX/mageMageFireStarburst.mat")); val26.SetTexture("_RemapTex", (Texture)(object)val24); val26.SetTexture("_Cloud1Tex", (Texture)(object)val3); val26.SetTexture("_Cloud2Tex", (Texture)null); ((Renderer)val25).material = val26; break; } case "TornadoBurst": case "RuneRings": case "Embers": ((Component)val25).gameObject.SetActive(false); break; } } whirlpoolProjectile = Instantiate(obj2, "WhirlpoolProjectile", registerNetwork: true); HitBox[] hitBoxes2 = whirlpoolProjectile.GetComponent().hitBoxes; foreach (HitBox val28 in hitBoxes2) { ((Component)val28).transform.parent = whirlpoolProjectile.transform; } Object.Destroy((Object)(object)((Component)whirlpoolProjectile.transform.GetChild(0)).gameObject); genericPrimary = DamageTypeCombo.GenericSecondary; DamageAPI.AddModdedDamageType(ref genericPrimary, waterDMG); whirlpoolProjectile.GetComponent().damageType = genericPrimary; ProjectileController component9 = whirlpoolProjectile.GetComponent(); component9.ghostPrefab = whirlpoolProjectileGhost; component9.flightSoundLoop = Load("RoR2/Base/ElementalRings/lsdFireTornado.asset"); RadialForce val29 = whirlpoolProjectile.AddComponent(); val29.radius = 15f; val29.damping = 0.5f; val29.forceMagnitude = -1500f; val29.forceCoefficientAtEdge = 0.5f; val29.alwaysApply = true; ((Component)whirlpoolProjectile.transform.GetChild(0).GetChild(0)).gameObject.SetActive(false); ProjectileDotZone component10 = whirlpoolProjectile.GetComponent(); component10.lifetime = 6f; component10.damageCoefficient = 0.25f; component10.overlapProcCoefficient = 0.3f; component10.fireFrequency = 4f; ContentAddition.AddProjectile(whirlpoolProjectile); spitUpProjectileGhost = Instantiate(Assets.Load("SpitUpProjectile"), "SpitUpProjectileGhost"); spitUpProjectileGhost.AddComponent(); spitUpProjectile = Instantiate("RoR2/Base/Lemurian/Fireball.prefab", "SpitUpProjectile", registerNetwork: true); spitUpProjectile.GetComponent().ghostPrefab = spitUpProjectileGhost; spitUpProjectile.GetComponent().impactEffect = spitUpHit; spitUpProjectile.AddComponent().soundID = "Play_Wooper_SpitUp_Fire"; ContentAddition.AddProjectile(spitUpProjectile); } internal static T Load(string path) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Addressables.LoadAssetAsync((object)path).WaitForCompletion(); } internal static GameObject Instantiate(string path, string name, bool registerNetwork = false) { return PrefabAPI.InstantiateClone(Load(path), name, registerNetwork); } internal static GameObject Instantiate(GameObject obj, string name, bool registerNetwork = false) { return PrefabAPI.InstantiateClone(obj, name, registerNetwork); } public static Material InstantiateDefaultSurvivorMaterial(Texture tex) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001d: 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) Material val = new Material(baseMaterial); if (Object.op_Implicit((Object)(object)val)) { val.SetColor("_Color", Color.white); val.SetTexture("_MainTex", tex); val.SetColor("_EmColor", Color.black); val.SetFloat("_EmPower", 0f); val.SetTexture("_EmTex", (Texture)null); val.SetFloat("_NormalStrength", 1f); val.SetTexture("_NormalTex", (Texture)null); return val; } return val; } public static Material InstantiateDefaultSurvivorMaterial(Color color, Texture tex, Color emColor, float emPower, Texture emTex, float normStr, Texture normTex) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001d: 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) Material val = new Material(baseMaterial); if (Object.op_Implicit((Object)(object)val)) { val.SetColor("_Color", color); val.SetTexture("_MainTex", tex); val.SetColor("_EmColor", emColor); val.SetFloat("_EmPower", emPower); val.SetTexture("_EmTex", emTex); val.SetFloat("_NormalStrength", 1f); val.SetTexture("_NormalTex", normTex); return val; } return val; } } internal class FireAimAreaIndicatorState : WooperState { public Vector3 point; public override void OnSerialize(NetworkWriter writer) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(point); } public override void OnDeserialize(NetworkReader reader) { //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) ((BaseSkillState)this).OnDeserialize(reader); point = reader.ReadVector3(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class AimAreaIndicatorState : WooperState { private GameObject areaIndicator; public bool valid; public Vector3 point; public virtual float radius => 12f; public virtual float distance => 9999f; public override void OnEnter() { //IL_0030: 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) base.OnEnter(); ((BaseState)this).StartAimMode(2f, false); areaIndicator = Object.Instantiate(ArrowRain.areaIndicatorPrefab); areaIndicator.transform.localScale = Vector3.one * radius; } public override void Update() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0089: 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) ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)areaIndicator)) { Ray aimRay = ((BaseState)this).GetAimRay(); areaIndicator.transform.forward = Utils.GetForwardDirection(((Ray)(ref aimRay)).direction); RaycastHit val = default(RaycastHit); if (Physics.Raycast(aimRay, ref val, distance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { areaIndicator.SetActive(true); areaIndicator.transform.position = ((RaycastHit)(ref val)).point; point = ((RaycastHit)(ref val)).point; valid = true; } else { valid = false; areaIndicator.SetActive(false); } } } public virtual FireAimAreaIndicatorState GetState() { return null; } public override void FixedUpdate() { //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) base.FixedUpdate(); if (!((EntityState)this).isAuthority || ((BaseSkillState)this).IsKeyDownAuthority()) { return; } if (valid) { FireAimAreaIndicatorState state = GetState(); if (state != null) { state.point = point; ((EntityState)this).outer.SetNextState((EntityState)(object)state); return; } } ((EntityState)this).outer.SetNextStateToMain(); } public override void OnExit() { if (Object.op_Implicit((Object)(object)areaIndicator)) { EntityState.Destroy((Object)(object)areaIndicator); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class BasicMeleeSkillState : BaseSkillState { private float duration = 0.2f; private Vector3 dir; private OverlapAttack attack; private float damageCoefficient = 4.2f; private GameObject hitEffectPrefab = null; private bool parried; public Animator animator; private uint ID; private string hitboxGroupName = ""; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); if (!animator.GetBool("slide")) { ((BaseState)this).StartAimMode(1f, true); } ((EntityState)this).PlayAnimation("LeftArm, Override", "MeleeAttack"); AkSoundEngine.PostEvent(ID, ((EntityState)this).gameObject); attack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, ((EntityState)this).GetModelTransform(), hitboxGroupName); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { attack.Fire((List)null); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class CharacterMain : GenericCharacterMain { } internal class MeleeSkillState : BaseSkillState { public float attackDuration; private bool hopped; private bool hasSwung; public bool isInHitPause; public float hitPauseDuration; public float hopVelocity; public float hitPauseTimer; public float stopwatch; public HitStopCachedState hitStopCachedState; public OverlapAttack overlapAttack; public bool hasHit; private bool hasAnimParameter; private float attackSpeedScaling; public Animator animator; public int attackIndex = 1; private GameObject swingEffectInstance; public List hitList = new List(); public virtual float baseAttackDuration => 0f; public virtual float earlyExitDurationPercentage => 0f; public virtual float damageCoefficient => 0f; public virtual float forceMagnitude => 440f; public virtual float rootMotionSpeed => 25f; public virtual float baseHopVelocity => 4f; public virtual string layerName => "Gesture, Override"; public virtual string animationStateName => ""; public virtual string animParameter => "M1"; public virtual string hitBoxGroupName => ""; public virtual string hitBoxActiveParameter => "Curve"; public virtual string swingMuzzle => ""; public virtual GameObject swingEffectPrefab => null; public virtual bool hopOnHit => true; public virtual bool rootMotion => false; public virtual bool rootMotionWhileHitting => false; public virtual string swingSound => ""; public virtual DamageTypeCombo damageType => DamageTypeCombo.op_Implicit((DamageType)0); public virtual DamageColorIndex damageColor => (DamageColorIndex)0; public virtual Vector3 bonusForce => Vector3.zero; public virtual GameObject hitEffectPrefab => null; public virtual bool crossfade => false; public virtual bool finisher => attackIndex == 2; public virtual bool scaleSwingEffectSpeed => false; public virtual bool isButtonDown => ((EntityState)this).inputBank.skill1.down; public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(attackIndex); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); attackIndex = reader.ReadInt32(); } public override void OnEnter() { //IL_00b4: 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) ((BaseState)this).OnEnter(); attackSpeedScaling = Math.Min(((BaseState)this).attackSpeedStat, 6f); attackDuration = baseAttackDuration / attackSpeedScaling; hitPauseDuration = GroundLight.hitPauseDuration / attackSpeedScaling; hopVelocity = baseHopVelocity / attackSpeedScaling; animator = ((EntityState)this).GetModelAnimator(); animator.SetFloat(hitBoxActiveParameter, 0f); overlapAttack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, ((EntityState)this).GetModelTransform(), hitBoxGroupName); overlapAttack.pushAwayForce = 1f; overlapAttack.damageType = damageType; hasAnimParameter = !Utility.IsNullOrWhiteSpace(animParameter); if (hasAnimParameter && !Utility.IsNullOrWhiteSpace(animationStateName)) { if (crossfade) { ((EntityState)this).PlayAnimation("Additive, Override", animationStateName, animParameter, attackDuration, 0f); ((EntityState)this).PlayCrossfade(layerName, animationStateName, animParameter, attackDuration, 0.1f); } else { ((EntityState)this).PlayAnimation(layerName, animationStateName, animParameter, attackDuration, 0f); } } } public virtual Vector3 rootMotionDirection() { //IL_0007: 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) //IL_000f: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).characterDirection.forward; } public override void FixedUpdate() { //IL_0030: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011b: 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_0125: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { bool flag = FireMeleeAttack(overlapAttack, animator, hitBoxActiveParameter, forceMagnitude, bonusForce); hasHit = flag || hasHit; if (hasHit) { if (hopOnHit && !((EntityState)this).characterMotor.isGrounded && !hopped) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity); hopped = true; } if (!rootMotionWhileHitting && !isInHitPause && hasAnimParameter) { isInHitPause = true; } } if (animator.GetFloat(hitBoxActiveParameter) > 0.1f && rootMotion && !isInHitPause) { Vector3 val = rootMotionDirection(); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += val * rootMotionSpeed * Time.fixedDeltaTime; } if (hitPauseTimer >= hitPauseDuration && isInHitPause) { isInHitPause = false; animator.speed = 1f; } if (!isInHitPause) { stopwatch += Time.fixedDeltaTime; } else { hitPauseTimer += Time.fixedDeltaTime; animator.speed = 0f; } if (stopwatch >= attackDuration * earlyExitDurationPercentage) { if (isButtonDown) { SetState(); } if (stopwatch >= attackDuration) { BaseSkillState val2 = StateOverride(); if (val2 != null) { ((EntityState)this).outer.SetNextState((EntityState)(object)val2); } else { ((EntityState)this).outer.SetNextStateToMain(); } return; } } } if (!(animator.GetFloat(hitBoxActiveParameter) >= 0.11f) || hasSwung) { return; } hasSwung = true; AkSoundEngine.PostEvent(swingSound, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)swingEffectPrefab) && !Utility.IsNullOrWhiteSpace(swingMuzzle)) { if (scaleSwingEffectSpeed) { SpawnSwingEffect(swingMuzzle); } else { EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, swingMuzzle, false); } } float num = 4.2f; ((BaseState)this).AddRecoil(-0.1f * num, 0.1f * num, -1f * num, 1f * num); } public override void OnExit() { if (Object.op_Implicit((Object)(object)swingEffectInstance)) { EntityState.Destroy((Object)(object)swingEffectInstance); } ((EntityState)this).OnExit(); } public void SpawnSwingEffect(string muzzle) { //IL_0011: 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) Transform val = ((BaseState)this).FindModelChild(muzzle); swingEffectInstance = Object.Instantiate(swingEffectPrefab, val.position, val.rotation, val); ScaleParticleSystemDuration component = swingEffectInstance.GetComponent(); component.initialDuration = attackDuration; component._newDuration = attackDuration; } public bool FireMeleeAttack(OverlapAttack attack, Animator animator, string mecanimHitboxActiveParameter, float forceMagnitude, Vector3 bonusForce) { //IL_0042: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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) bool result = false; if (Object.op_Implicit((Object)(object)animator) && animator.GetFloat(mecanimHitboxActiveParameter) > 0.1f) { attack.forceVector = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).transform.forward) * forceMagnitude + bonusForce; result = attack.Fire(hitList); } return result; } public virtual void SetState() { } public virtual BaseSkillState StateOverride() { return null; } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class Primary : WooperState { private float delay = 0.2f; private float fireRate = 0.308f; private float damageCoefficient = 0.8f; private bool startedFire = true; public override void OnEnter() { base.OnEnter(); delay /= ((BaseState)this).attackSpeedStat; fireRate /= ((BaseState)this).attackSpeedStat; ((EntityState)this).fixedAge = 1f; } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).fixedAge >= delay) { startedFire = true; } if (startedFire && ((EntityState)this).fixedAge >= fireRate) { ((EntityState)this).fixedAge = 0f; Fire(); } if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority()) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); EffectManager.SimpleEffect(Prefabs.waterMuzzleEffect, ((BaseState)this).FindModelChild("muzzle").position, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), false); ((EntityState)this).PlayAnimation("Gesture, Override", "QuickRangedAttack", "M1", fireRate, 0f); if (((EntityState)this).isAuthority) { ProjectileManager.instance.FireProjectile(Prefabs.waterGunProjectile, ((Ray)(ref aimRay)).origin, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, 50f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class PrimaryAlt : WooperState { private float duration = 0.5f; private float damageCoefficient = 0.8f; public override void OnEnter() { base.OnEnter(); duration /= ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture, Override", "QuickRangedAttack", "M1", duration, 0f); } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnCurve() { //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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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_0064: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_clayGrenadier_attack1_launch", ((EntityState)this).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); EffectManager.SimpleEffect(Prefabs.mudMuzzleEffect, ((BaseState)this).FindModelChild("muzzle").position, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), false); if (((EntityState)this).isAuthority) { ProjectileManager.instance.FireProjectile(Prefabs.mudProjectile, ((Ray)(ref aimRay)).origin, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, 50f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class PrimaryAlt2 : MeleeSkillState { private bool playEffect; private ParticleSystem effect; public override float baseAttackDuration => 0.65f; public override float earlyExitDurationPercentage => 0.55f; public override string layerName => "FullBody, Override"; public override string animationStateName => "Attack2Quick"; public override string animParameter => "M1"; public override string hitBoxGroupName => "Tail"; public override float forceMagnitude => 600f; public override float damageCoefficient => (attackIndex == 1) ? 1.7f : 2f; public override string swingSound => "Play_Wooper_Water_Swing"; public override float baseHopVelocity => 6f; public override GameObject hitEffectPrefab => Prefabs.waterHit; public override string swingMuzzle => ""; public override bool crossfade => true; public override GameObject swingEffectPrefab => null; public override DamageTypeCombo damageType => DamageTypeCombo.GenericSecondary; public override bool rootMotion => true; public override float rootMotionSpeed => 10f; public override bool rootMotionWhileHitting => true; public override bool finisher => attackIndex == 2; public override bool scaleSwingEffectSpeed => true; public override bool isButtonDown => true; public override Vector3 rootMotionDirection() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); return ((Ray)(ref aimRay)).direction; } public override void OnEnter() { //IL_003a: 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_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_00bd: 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) base.OnEnter(); ((BaseState)this).StartAimMode(attackDuration, false); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 0.7f; Transform val = ((BaseState)this).FindModelChild("swingEffect"); effect = Object.Instantiate(((Component)val).gameObject, val.position, val.rotation, val.parent).GetComponent(); ((Component)effect).gameObject.AddComponent().duration = 2f; ParticleSystem[] componentsInChildren = ((Component)effect).GetComponentsInChildren(); foreach (ParticleSystem val2 in componentsInChildren) { MainModule main = val2.main; ((MainModule)(ref main)).simulationSpeed = ((MainModule)(ref main)).simulationSpeed * ((BaseState)this).attackSpeedStat; } DamageAPI.AddModdedDamageType(ref overlapAttack.damageType, Prefabs.waterDMG); DamageAPI.AddModdedDamageType(ref overlapAttack.damageType, Prefabs.aquaTail); } public override void SetState() { bool flag = true; foreach (HurtBox hit in hitList) { if (hit.healthComponent.body.GetBuffCount(Prefabs.soakedDebuff) < 3) { flag = false; break; } } if (!flag) { PrimaryAlt2 primaryAlt = new PrimaryAlt2(); primaryAlt.attackIndex = ((attackIndex == 2) ? 1 : 2); ((EntityState)this).outer.SetNextState((EntityState)(object)primaryAlt); } } public override void FixedUpdate() { base.FixedUpdate(); if (!playEffect && animator.GetFloat("Curve") >= 0.1f) { playEffect = true; effect.Play(true); } } public override void OnExit() { ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; if (Object.op_Implicit((Object)(object)effect)) { ((Component)effect).transform.parent = null; } base.OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class Secondary : WooperState { private float duration = 0.65f; private float damageCoefficient = 2.6f; private float dotDamageCoefficient = 0.45f; public override void OnEnter() { base.OnEnter(); duration /= ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture, Override", "ShortRangedAttack", "M2", duration, 0f); } public override void OnCurve() { //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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_00ce: 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_00e1: 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_00ee: 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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown //IL_014e: 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_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_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018b: 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_0196: 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_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_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Expected O, but got Unknown //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_clayGrenadier_attack2_explode", ((EntityState)this).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); EffectManager.SimpleEffect(Prefabs.mudSpurtEffect, ((BaseState)this).FindModelChild("muzzle").position, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), false); bool flag = ((BaseState)this).RollCrit(); if (((EntityState)this).isAuthority) { ProjectileManager.instance.FireProjectile(Prefabs.mudPuddleProjectile, ((Ray)(ref aimRay)).origin, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * dotDamageCoefficient, 50f, flag, (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } if (!NetworkServer.active) { return; } BullseyeSearch val = new BullseyeSearch { searchOrigin = ((Ray)(ref aimRay)).origin, searchDirection = ((Ray)(ref aimRay)).direction, filterByLoS = true, maxAngleFilter = 45f, maxDistanceFilter = 18f, sortMode = (SortMode)1, teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()), viewer = ((EntityState)this).characterBody }; val.RefreshCandidates(); foreach (HurtBox result in val.GetResults()) { if (result.healthComponent.alive) { DamageInfo val2 = new DamageInfo { position = ((Component)result).transform.position, damage = ((BaseState)this).damageStat * damageCoefficient, crit = flag, attacker = ((EntityState)this).gameObject, damageType = DamageTypeCombo.GenericSecondary, procCoefficient = 1f, force = Utils.GetForwardDirection(((Ray)(ref aimRay)).direction) * 500f }; DamageAPI.AddModdedDamageType(val2, Prefabs.waterDMG); result.healthComponent.TakeDamage(val2); EffectManager.SimpleEffect(Prefabs.mudHit, val2.position, Quaternion.identity, true); } } } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class SecondaryAlt : AimAreaIndicatorState { public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).isAuthority && !((BaseState)this).isGrounded) { ((EntityState)this).outer.SetNextStateToMain(); } } public override FireAimAreaIndicatorState GetState() { return new SecondaryAltFire(); } } internal class SecondaryAltFire : FireAimAreaIndicatorState { private float duration = 0.65f; private float damageCoefficient = 5.6f; public override void OnEnter() { base.OnEnter(); duration /= ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("FullBody, Override", "Attack1Quick", "M1", duration, 0f); } public override void OnCurve() { //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) EffectManager.SimpleEffect(Prefabs.groundSmokeImpact, ((BaseState)this).FindModelChild("foot.r").position, Quaternion.identity, false); } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //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_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //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_0042: 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_005a: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) float num = 12f; EffectManager.SpawnEffect(Prefabs.Load("RoR2/Base/BeetleGuard/BeetleGuardGroundSlam.prefab"), new EffectData { origin = point, scale = num }, false); EffectManager.SpawnEffect(Prefabs.Load("RoR2/Base/Parent/ParentSlamEffect.prefab"), new EffectData { origin = point, scale = num }, false); if (((EntityState)this).isAuthority) { BlastAttack val = new BlastAttack { position = point, attacker = ((EntityState)this).gameObject, attackerFiltering = (AttackerFiltering)2, baseDamage = ((BaseState)this).damageStat * damageCoefficient, crit = ((BaseState)this).RollCrit(), falloffModel = (FalloffModel)0, damageType = (DamageTypeCombo.GenericSpecial | DamageTypeCombo.op_Implicit((DamageType)32)), radius = num, teamIndex = ((BaseState)this).GetTeam(), procCoefficient = 1f, baseForce = 1f, bonusForce = Vector3.up * 3500f }; DamageAPI.AddModdedDamageType(val, Prefabs.groundDMG); val.Fire(); } ((EntityState)this).OnExit(); } } internal class SecondaryAlt2 : AimAreaIndicatorState { public override FireAimAreaIndicatorState GetState() { return new SecondaryAlt2Fire(); } } internal class SecondaryAlt2Fire : FireAimAreaIndicatorState { private float duration = 0.65f; private float damageCoefficient = 1.4f; public override void OnEnter() { base.OnEnter(); duration /= ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture, Override", "Roar", "Utility", duration, 0f); } public override void OnCurve() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { ProjectileManager.instance.FireProjectile(Prefabs.whirlpoolProjectile, point, Quaternion.identity, ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 0f, (DamageTypeCombo?)DamageTypeCombo.GenericSecondary); } } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } internal class SpawnState : EntityState { private float spawnDuration = 1.55f; private float jumpDuration = 0.25f; private float duration; private float pokeballDuration = 0.62f; private GameObject model; private bool pokeball; private bool spawn; private bool spawned; private bool spawnedServer; private bool spawnedAuthority; public override void OnEnter() { ((EntityState)this).OnEnter(); duration = spawnDuration + pokeballDuration + jumpDuration; spawn = Run.instance.stageClearCount == 0; if (!spawn) { if (((EntityState)this).isAuthority) { base.outer.SetNextStateToMain(); } } else { model = ((Component)((EntityState)this).GetModelTransform()).gameObject; model.SetActive(false); } } public override void FixedUpdate() { //IL_005f: 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) ((EntityState)this).FixedUpdate(); if (spawn) { if (!pokeball && ((EntityState)this).fixedAge >= spawnDuration) { pokeball = true; AkSoundEngine.PostEvent("Play_Wooper_Pokeball_Throw", ((EntityState)this).gameObject); EffectManager.SimpleEffect(Prefabs.pokeball, ((EntityState)this).transform.position, Quaternion.identity, false); } if (!spawned && ((EntityState)this).fixedAge >= spawnDuration + pokeballDuration) { Spawn(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { base.outer.SetNextStateToMain(); } } } private void Spawn() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_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_015a: 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) spawned = true; model.SetActive(true); if (((EntityState)this).isAuthority && !spawnedAuthority) { spawnedAuthority = true; TeleportHelper.TeleportBody(((EntityState)this).characterBody, ((EntityState)this).transform.position + Vector3.up * 0.25f, true); } AkSoundEngine.PostEvent("Play_Wooper_Spawn", ((EntityState)this).gameObject); TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(model.gameObject); val.originalMaterial = Prefabs.Load("RoR2/Base/Huntress/matHuntressFlashExpanded.mat"); val.duration = jumpDuration; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.alphaCurve.AddKey(0.65f, 1f); val.animateShaderAlpha = true; val.destroyComponentOnEnd = true; val.AddToCharacterModel(model.GetComponent()); EffectManager.SimpleMuzzleFlash((((EntityState)this).characterBody.skinIndex == 0 || ((EntityState)this).characterBody.skinIndex == 2) ? Prefabs.spawnEffect : Prefabs.spawnEffectShiny, ((EntityState)this).gameObject, "base", false); if (NetworkServer.active && !spawnedServer) { spawnedServer = true; ((EntityState)this).healthComponent.TakeDamageForce(Vector3.up * 1650f, true, false); } } public override void OnExit() { if (pokeball && !spawned) { Spawn(); } if (spawn) { AkSoundEngine.PostEvent("Play_Wooper_Cry", ((EntityState)this).gameObject); if (((EntityState)this).characterBody.skinIndex == 1) { AkSoundEngine.PostEvent("Play_Wooper_Shiny", ((EntityState)this).gameObject); } } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)9; } } internal class Special : WooperState { private float duration; private float baseDuration = 1.05f; private float damageCoefficient = 7f; public override void OnEnter() { base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(duration * 0.3f, false); ((EntityState)this).PlayAnimation("FullBody, Override", "Attack1", "M1", duration, 0f); } public override void OnCurve() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_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_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) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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_0064: 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_008f: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_Wooper_Water_Cast", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = Vector3.ProjectOnPlane(((Ray)(ref aimRay)).direction, Vector3.up); Vector3 val2 = ((EntityState)this).characterBody.footPosition + Vector3.up * 2.5f; ProjectileManager.instance.FireProjectile(Prefabs.surfProjectile, val2, Quaternion.LookRotation(val), ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, 1500f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)DamageTypeCombo.GenericSpecial); } } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class SpecialAlt : WooperState { private float duration; private float baseDuration = 0.85f; private float damageCoefficient = 12f; public override void OnEnter() { base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("FullBody, Override", "Glad", "Utility", duration, 0f); } public override void OnCurve() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0057: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00d3: 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) float num = 25f; Vector3 position = ((BaseState)this).FindModelChild("base").position; AkSoundEngine.PostEvent("Play_Wooper_Earthquake", ((EntityState)this).gameObject); EffectManager.SpawnEffect(Prefabs.earthQuakeImpact, new EffectData { origin = position, scale = num }, false); if (((EntityState)this).isAuthority) { BlastAttack val = new BlastAttack { position = position, attacker = ((EntityState)this).gameObject, attackerFiltering = (AttackerFiltering)2, baseDamage = ((BaseState)this).damageStat * damageCoefficient, crit = ((BaseState)this).RollCrit(), falloffModel = (FalloffModel)0, damageType = (DamageTypeCombo.GenericSpecial | DamageTypeCombo.op_Implicit((DamageType)32)), radius = num, teamIndex = ((BaseState)this).GetTeam(), procCoefficient = 1f }; DamageAPI.AddModdedDamageType(val, Prefabs.groundDMG); val.Fire(); } } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class SpecialAlt2 : WooperState { private float duration = 0.25f; private bool wasUp; private int buffCount; public override void OnEnter() { base.OnEnter(); buffCount = ((EntityState)this).characterBody.GetBuffCount(Prefabs.stockpile); } public override void Update() { ((EntityState)this).Update(); if (!((EntityState)this).isAuthority) { return; } if (buffCount == 0) { ((EntityState)this).outer.SetNextState((EntityState)(object)new SpecialAlt2Buff()); return; } if (!((EntityState)this).inputBank.skill4.down) { wasUp = true; } if (wasUp && ((ButtonState)(ref ((EntityState)this).inputBank.skill4)).justPressed) { ((EntityState)this).outer.SetNextState((EntityState)(object)new SpecialAlt2Fire()); } if (((EntityState)this).age >= duration) { if (buffCount >= 3 || !wasUp) { ((EntityState)this).outer.SetNextState((EntityState)(object)new SpecialAlt2Heal()); } else { ((EntityState)this).outer.SetNextState((EntityState)(object)new SpecialAlt2Buff()); } } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)9; } } internal class SpecialAlt2Buff : WooperState { private float duration = 0.5f; public override void OnEnter() { base.OnEnter(); duration /= ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture, Override", "Refresh", "Utility", duration, 0f); if (NetworkServer.active && ((EntityState)this).characterBody.GetBuffCount(Prefabs.stockpile) < 3) { ((EntityState)this).characterBody.AddBuff(Prefabs.stockpile); } EffectManager.SimpleMuzzleFlash(Prefabs.stockpileEffect, ((EntityState)this).gameObject, "center", false); AkSoundEngine.PostEvent("Play_Wooper_Stockpile", ((EntityState)this).gameObject); } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class SpecialAlt2Heal : WooperState { private float duration = 0.5f; public override void OnEnter() { //IL_00a9: 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) base.OnEnter(); duration /= ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture, Override", "Roar", "Utility", duration, 0f); if (NetworkServer.active) { int buffCount = ((EntityState)this).characterBody.GetBuffCount(Prefabs.stockpile); float num = 0f; switch (buffCount) { case 1: num = 0.25f; break; case 2: num = 0.5f; break; case 3: num = 1f; break; } ((EntityState)this).healthComponent.Heal(((EntityState)this).healthComponent.fullHealth * num, default(ProcChainMask), true); for (int i = 0; i < buffCount; i++) { ((EntityState)this).characterBody.RemoveBuff(Prefabs.stockpile); } } EffectManager.SimpleMuzzleFlash(Prefabs.swallowEffect, ((EntityState)this).gameObject, "center", false); AkSoundEngine.PostEvent("Play_Wooper_Swallow", ((EntityState)this).gameObject); } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class SpecialAlt2Fire : WooperState { private float duration = 0.5f; private float damageCoefficient = 4.5f; public override void OnEnter() { base.OnEnter(); duration /= ((BaseState)this).attackSpeedStat; int buffCount = ((EntityState)this).characterBody.GetBuffCount(Prefabs.stockpile); damageCoefficient *= buffCount; ((BaseState)this).StartAimMode(duration * 0.3f, false); ((EntityState)this).PlayAnimation("FullBody, Override", "QuickRangedAttack", "M1", duration, 0f); if (NetworkServer.active) { for (int i = 0; i < buffCount; i++) { ((EntityState)this).characterBody.RemoveBuff(Prefabs.stockpile); } } } public override void OnCurve() { //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_0036: 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_006c: Unknown result type (might be due to invalid IL or missing references) EffectManager.SimpleMuzzleFlash(Prefabs.spitUpMuzzleEffect, ((EntityState)this).gameObject, "muzzle", false); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(Prefabs.spitUpProjectile, ((Ray)(ref aimRay)).origin, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, 1000f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)DamageTypeCombo.GenericSpecial); } } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class Utility : BaseState { private float duration = 0.35f; private float startupDuration = 0.2f; private float damageCoefficient = 2.8f; private float speed = 45.5f; private bool spawnedEffect; private int layer; private GameObject effect; private CharacterModel model; private HurtBoxGroup hurtboxGroup; private AimRequest request; public override void OnEnter() { //IL_00f1: 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_0116: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration /= base.attackSpeedStat; startupDuration /= base.attackSpeedStat; speed *= ((EntityState)this).characterBody.moveSpeed / ((EntityState)this).characterBody.baseMoveSpeed; ((EntityState)this).PlayAnimation("Body", "Dig", "Utility", startupDuration, 0f); layer = ((EntityState)this).gameObject.layer; ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); model = ((Component)((EntityState)this).GetModelTransform()).GetComponent(); hurtboxGroup = ((Component)model).GetComponent(); AkSoundEngine.PostEvent("Play_beetle_guard_attack2_spikeLoop", ((EntityState)this).gameObject); Transform val = ((BaseState)this).FindModelChild("base"); effect = Object.Instantiate(Prefabs.digEffect, val.position, Quaternion.identity, ((Component)val).transform); effect.transform.localRotation = Quaternion.identity; effect.GetComponent().newDuration = startupDuration; request = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } public override void FixedUpdate() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= startupDuration) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += GetRootMotion(); CharacterMotor characterMotor2 = ((EntityState)this).characterMotor; characterMotor2.rootMotion += Vector3.down * speed * Time.fixedDeltaTime; if (!spawnedEffect) { spawnedEffect = true; CharacterModel obj = model; int invisibilityCount = obj.invisibilityCount; obj.invisibilityCount = invisibilityCount + 1; HurtBoxGroup obj2 = hurtboxGroup; invisibilityCount = obj2.hurtBoxesDeactivatorCounter; obj2.hurtBoxesDeactivatorCounter = invisibilityCount + 1; if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } } if ((((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration + startupDuration) || (((EntityState)this).fixedAge >= startupDuration && ((ButtonState)(ref ((EntityState)this).inputBank.skill3)).justPressed)) { ((EntityState)this).outer.SetNextStateToMain(); } } private Vector3 GetRootMotion() { //IL_0007: 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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).characterDirection.forward * speed * Time.fixedDeltaTime; } public override void OnExit() { //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: 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_00fb: 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_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_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_0153: 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_0161: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: 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) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: 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_01aa: 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_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Expected O, but got Unknown //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { request.Dispose(); } if (spawnedEffect) { HurtBoxGroup obj = hurtboxGroup; int hurtBoxesDeactivatorCounter = obj.hurtBoxesDeactivatorCounter; obj.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter - 1; CharacterModel obj2 = model; hurtBoxesDeactivatorCounter = obj2.invisibilityCount; obj2.invisibilityCount = hurtBoxesDeactivatorCounter - 1; } if (Object.op_Implicit((Object)(object)effect)) { EntityState.Destroy((Object)(object)effect); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } AkSoundEngine.PostEvent("Stop_beetle_guard_attack2_spikeLoop", ((EntityState)this).gameObject); ((EntityState)this).gameObject.layer = layer; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((EntityState)this).GetModelAnimator().SetTrigger("trigger"); Vector3 val = ((EntityState)this).characterBody.footPosition + GetRootMotion(); EffectManager.SimpleEffect(Prefabs.emergeEffect, val, Quaternion.LookRotation(Utils.GetForwardDirection(((EntityState)this).characterDirection.forward)), false); if (((EntityState)this).isAuthority) { BlastAttack val2 = new BlastAttack { position = val, attacker = ((EntityState)this).gameObject, attackerFiltering = (AttackerFiltering)2, baseDamage = base.damageStat * damageCoefficient, crit = ((BaseState)this).RollCrit(), falloffModel = (FalloffModel)0, damageType = (DamageTypeCombo.GenericUtility | DamageTypeCombo.op_Implicit((DamageType)32)), radius = 4f, teamIndex = ((BaseState)this).GetTeam(), procCoefficient = 1f, baseForce = 1f, bonusForce = Vector3.up * 3500f }; DamageAPI.AddModdedDamageType(val2, Prefabs.groundDMG); val2.Fire(); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class UtilityAlt : WooperState { private float duration = 10f; private GameObject shieldEffect; public override void OnEnter() { //IL_004c: 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) base.OnEnter(); ((EntityState)this).PlayAnimation("Gesture, Override", "Roar", "Utility", 0.5f, 0f); AkSoundEngine.PostEvent("Play_Wooper_Protect", ((EntityState)this).gameObject); Transform val = ((BaseState)this).FindModelChild("center"); shieldEffect = Object.Instantiate(Prefabs.shieldEffect, val.position, Quaternion.identity, val); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Prefabs.protect); } } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).isAuthority && (((EntityState)this).fixedAge >= duration || !((EntityState)this).inputBank.skill3.down)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)shieldEffect)) { EntityState.Destroy((Object)(object)shieldEffect); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Prefabs.protect); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class UtilityAlt2 : WooperState { private float upDuration = 0.65f; private float upDamageCoefficient = 2.7f; private float explosionDamageCoefficient = 3f; private float speed = 60f; private AnimationCurve curve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); private OverlapAttack attack; private GameObject upEffect; private GameObject downEffect; private Transform muzzleTransform; private uint ID; public override void OnEnter() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_0068: 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_00b2: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); speed *= ((EntityState)this).characterBody.moveSpeed / ((EntityState)this).characterBody.baseMoveSpeed; attack = ((BaseState)this).InitMeleeOverlap(upDamageCoefficient, Prefabs.waterHit, ((EntityState)this).GetModelTransform(), "Waterfall"); DamageTypeCombo genericUtility = DamageTypeCombo.GenericUtility; DamageAPI.AddModdedDamageType(ref genericUtility, Prefabs.waterDMG); attack.damageType = genericUtility; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 0f); ((EntityState)this).PlayAnimation("Body", "Jump"); muzzleTransform = ((BaseState)this).FindModelChild("center"); upEffect = Object.Instantiate(Prefabs.waterfallMuzzleEffect, muzzleTransform.position, Quaternion.identity, muzzleTransform); AkSoundEngine.PostEvent("Play_Wooper_Waterfall_Up", ((EntityState)this).gameObject); } public override void FixedUpdate() { //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010a: 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_0114: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); bool flag = ((EntityState)this).fixedAge < upDuration; if (flag && ((EntityState)this).isAuthority) { attack.Fire((List)null); } if (Object.op_Implicit((Object)(object)upEffect) && !flag) { upEffect.transform.parent = null; ((Behaviour)upEffect.GetComponent()).enabled = true; upEffect = null; downEffect = Object.Instantiate(Prefabs.waterfallDownwardMuzzleEffect, muzzleTransform.position, Quaternion.identity, muzzleTransform); ID = AkSoundEngine.PostEvent("Play_Wooper_Waterfall_Down", ((EntityState)this).gameObject); } Vector3 val = Vector3.up * (float)(flag ? 1 : (-1)); float num = speed * (flag ? curve.Evaluate(((EntityState)this).fixedAge / upDuration) : 1f) * Time.fixedDeltaTime; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += val * num; if (((EntityState)this).isAuthority && !flag && ((BaseState)this).isGrounded) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_007a: 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_008e: Expected O, but got Unknown //IL_009f: 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_00a5: 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_00ab: 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_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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_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_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_010f: Expected O, but got Unknown //IL_0111: 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) AkSoundEngine.StopPlayingID(ID); AkSoundEngine.PostEvent("Play_clayGrenadier_attack1_explode", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)upEffect)) { EntityState.Destroy((Object)(object)upEffect); } if (Object.op_Implicit((Object)(object)downEffect)) { EntityState.Destroy((Object)(object)downEffect); } float num = 8f; Vector3 position = ((BaseState)this).FindModelChild("base").position; EffectManager.SpawnEffect(Prefabs.waterfallExplosion, new EffectData { origin = position, scale = num }, false); if (((EntityState)this).isAuthority) { BlastAttack val = new BlastAttack { position = position, attacker = ((EntityState)this).gameObject, attackerFiltering = (AttackerFiltering)2, baseDamage = ((BaseState)this).damageStat * explosionDamageCoefficient, crit = ((BaseState)this).RollCrit(), falloffModel = (FalloffModel)0, damageType = DamageTypeCombo.GenericSecondary, radius = num, teamIndex = ((BaseState)this).GetTeam(), procCoefficient = 1f }; DamageAPI.AddModdedDamageType(val, Prefabs.waterDMG); val.Fire(); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class WooperState : BaseSkillState { public Animator animator; public Transform modelTransform; private bool curveFired; public virtual float curveValue => 0.11f; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); modelTransform = ((Component)animator).transform; } public virtual void OnCurve() { } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!curveFired && animator.GetFloat("Curve") >= curveValue) { curveFired = true; OnCurve(); } } } internal static class Extensions { public static float GetBuffDuration(this CharacterBody body, BuffDef buffDef) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) float num = 0f; for (int i = 0; i < body.timedBuffs.Count; i++) { if ((Object)(object)BuffCatalog.GetBuffDef(body.timedBuffs[i].buffIndex) == (Object)(object)buffDef) { float timer = body.timedBuffs[i].timer; if (num < timer) { num = timer; } } } return num; } public static GameObject NewSyringe(this GameObject g, params Material[] m) { ((Renderer)g.GetComponentsInChildren(false)[0]).material = m[0]; ((Renderer)g.GetComponent()).material = m[1]; ((Renderer)g.GetComponent()).material = m[2]; return g; } public static Material SwapTexture(this Material m, Texture2D t) { m.mainTexture = (Texture)(object)t; return m; } public static GameObject SwapMaterials(this GameObject g, Material[] m) { Renderer[] componentsInChildren = g.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if (Object.op_Implicit((Object)(object)m[i])) { componentsInChildren[i].material = m[i]; } } return g; } public static float Mult(this float f, float mult = 100f) { return f * mult; } public static Color ToRGB255(this Color c, string title, string body) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_002a: 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) return new Color(c.r / 255f, c.g / 255f, c.b / 255f); } public static void SetStrings(this TooltipProvider t, string title, string body) { t.overrideTitleText = title; t.overrideBodyText = body; } } internal class Utils { public static GameObject CreateDotZoneEffect(GameObject baseEffect, Vector3 pos, Transform parent) { //IL_0002: 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_0038: 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) GameObject val = Object.Instantiate(baseEffect, pos, Quaternion.identity, parent); float num = RoR2Application.rng.RangeFloat(0f, 0.5f); ParticleSystem[] componentsInChildren = val.GetComponentsInChildren(); foreach (ParticleSystem val2 in componentsInChildren) { MainModule main = val2.main; ((MainModule)(ref main)).startDelay = MinMaxCurve.op_Implicit(num); } return val; } public static Material CreateClayMat(string matPath, Color color, string materialProperty = "_EmissionColor") { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) Material val = new Material(Prefabs.Load(matPath)); val.SetColor(materialProperty, color); return val; } internal static void RecolorEffect(GameObject obj, Color color) { //IL_008c: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)obj)) { return; } OmniEffect component = obj.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Object.DestroyImmediate((Object)(object)obj.GetComponent()); } Renderer[] componentsInChildren = obj.GetComponentsInChildren(Object.op_Implicit((Object)(object)component)); for (int i = 0; i < componentsInChildren.Length; i++) { ((Component)componentsInChildren[i]).gameObject.SetActive(true); if (Object.op_Implicit((Object)(object)componentsInChildren[i].material) && componentsInChildren[i].material.HasProperty("_TintColor")) { componentsInChildren[i].material.SetColor("_TintColor", color); } } } public static Vector3 FindNearestNodePosition(Vector3 targetPosition, GraphType nodeGraphType) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_0032: 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_0039: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_0089: Unknown result type (might be due to invalid IL or missing references) SpawnCard val = ScriptableObject.CreateInstance(); val.hullSize = (HullClassification)1; val.nodeGraphType = nodeGraphType; val.prefab = Prefabs.Load("RoR2/Base/Common/DirectorSpawnProbeHelperPrefab.prefab"); Vector3 result = targetPosition; GameObject val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, new DirectorPlacementRule { placementMode = (PlacementMode)3, position = targetPosition }, RoR2Application.rng)); if (Object.op_Implicit((Object)(object)val2)) { result = val2.transform.position; } if (Object.op_Implicit((Object)(object)val2)) { Object.Destroy((Object)(object)val2); } Object.Destroy((Object)(object)val); return result; } public static Vector3 GetForwardDirection(Vector3 dir) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: 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_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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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_0045: Unknown result type (might be due to invalid IL or missing references) Vector2 val = Util.Vector3XZToVector2XY(dir); if (val != Vector2.zero) { ((Vector2)(ref val)).Normalize(); Vector3 val2 = new Vector3(val.x, 0f, val.y); return ((Vector3)(ref val2)).normalized; } return dir; } public static void PlayAnimation(GameObject g, string layerName, string animationStateName) { Animator component = g.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { int layerIndex = component.GetLayerIndex(layerName); component.speed = 1f; component.Update(0f); component.PlayInFixedTime(animationStateName, layerIndex, 0f); } } public static void PlayAnimation(GameObject g, string layerName, string animationStateName, string playbackRateParam, float duration) { //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) Animator component = g.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.speed = 1f; component.Update(0f); int layerIndex = component.GetLayerIndex(layerName); component.SetFloat(playbackRateParam, 1f); component.PlayInFixedTime(animationStateName, layerIndex, 0f); component.Update(0f); AnimatorStateInfo currentAnimatorStateInfo = component.GetCurrentAnimatorStateInfo(layerIndex); float length = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).length; component.SetFloat(playbackRateParam, length / duration); } } public static void AnimatorPlayAnimation(Animator modelAnimator, string layerName, string animationStateName) { int layerIndex = modelAnimator.GetLayerIndex(layerName); modelAnimator.speed = 1f; modelAnimator.Update(0f); modelAnimator.PlayInFixedTime(animationStateName, layerIndex, 0f); } public static void AnimatorPlayAnimation(Animator modelAnimator, string layerName, string animationStateName, string playbackRateParam, float duration) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) modelAnimator.speed = 1f; modelAnimator.Update(0f); int layerIndex = modelAnimator.GetLayerIndex(layerName); modelAnimator.SetFloat(playbackRateParam, 1f); modelAnimator.PlayInFixedTime(animationStateName, layerIndex, 0f); modelAnimator.Update(0f); AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex); float length = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).length; modelAnimator.SetFloat(playbackRateParam, length / duration); } public static SkillDef NewSkillDef(Type activationState, string activationStateMachineName, int baseMaxStock, float baseRechargeInterval, bool beginSkillCooldownOnSkillEnd, bool canceledFromSprinting, bool fullRestockOnAssign, InterruptPriority interruptPriority, bool isCombatSkill, bool mustKeyPress, bool cancelSprintingOnActivation, int rechargeStock, int requiredStock, int stockToConsume, Sprite icon, string skillName, string skillDescriptionToken, params string[] keywordTokens) where T : SkillDef { //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_0069: 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) T val = ScriptableObject.CreateInstance(); ((SkillDef)val).activationState = new SerializableEntityStateType(activationState); ((SkillDef)val).activationStateMachineName = activationStateMachineName; ((SkillDef)val).baseMaxStock = baseMaxStock; ((SkillDef)val).baseRechargeInterval = baseRechargeInterval; ((SkillDef)val).beginSkillCooldownOnSkillEnd = beginSkillCooldownOnSkillEnd; ((SkillDef)val).canceledFromSprinting = canceledFromSprinting; ((SkillDef)val).fullRestockOnAssign = fullRestockOnAssign; ((SkillDef)val).interruptPriority = interruptPriority; ((SkillDef)val).isCombatSkill = isCombatSkill; ((SkillDef)val).mustKeyPress = mustKeyPress; ((SkillDef)val).cancelSprintingOnActivation = cancelSprintingOnActivation; ((SkillDef)val).rechargeStock = rechargeStock; ((SkillDef)val).requiredStock = requiredStock; ((SkillDef)val).stockToConsume = stockToConsume; ((SkillDef)val).icon = icon; ((SkillDef)val).skillDescriptionToken = skillDescriptionToken; ((SkillDef)val).skillName = skillName; ((SkillDef)val).skillNameToken = ((SkillDef)val).skillName; ((SkillDef)val).keywordTokens = keywordTokens; ContentAddition.AddSkillDef((SkillDef)(object)val); return (SkillDef)(object)val; } public static Color HexTo10(string hexColor) { //IL_0025: 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_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_0039: Unknown result type (might be due to invalid IL or missing references) char[] array = hexColor.ToCharArray(); return new Color((float)(array[0] + array[1]), (float)(array[2] + array[3]), (float)(array[4] + array[5]), 255f) / 255f; } public static EntityStateMachine NewStateMachine(GameObject obj, string customName) where T : EntityState { //IL_0021: 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_0028: 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) SerializableEntityStateType val = default(SerializableEntityStateType); ((SerializableEntityStateType)(ref val))..ctor(typeof(T)); EntityStateMachine val2 = obj.AddComponent(); val2.customName = customName; val2.initialStateType = val; val2.mainStateType = val; return val2; } public static GenericSkill NewGenericSkill(GameObject obj, SkillDef skill) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0054: 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) GenericSkill val = obj.AddComponent(); SkillFamily val2 = ScriptableObject.CreateInstance(); val2.variants = (Variant[])(object)new Variant[1]; val._skillFamily = val2; SkillFamily skillFamily = val.skillFamily; Variant[] variants = skillFamily.variants; Variant val3 = new Variant { skillDef = skill }; ((Variant)(ref val3)).viewableNode = new Node(skill.skillNameToken, false, (Node)null); variants[0] = val3; ContentAddition.AddSkillFamily(skillFamily); return val; } public static void AddAlt(SkillFamily skillFamily, SkillDef SkillDef) { //IL_0029: 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_004b: Expected O, but got Unknown //IL_004c: 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) Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1); Variant[] variants = skillFamily.variants; int num = skillFamily.variants.Length - 1; Variant val = new Variant { skillDef = SkillDef }; ((Variant)(ref val)).viewableNode = new Node(SkillDef.skillNameToken, false, (Node)null); variants[num] = val; } public static BuffDef NewBuffDef(string name, bool stack, bool hidden, bool isDebuff, bool isCooldown, Sprite sprite, Color color) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); ((Object)val).name = name; val.canStack = stack; val.isHidden = hidden; val.iconSprite = sprite; val.buffColor = color; val.isDebuff = isDebuff; val.isCooldown = isCooldown; ContentAddition.AddBuffDef(val); return val; } public static ObjectScaleCurve AddScaleComponent(GameObject target, float timeMax) { ObjectScaleCurve val = target.AddComponent(); val.useOverallCurveOnly = true; val.timeMax = timeMax; val.overallCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); return val; } public static RotateAroundAxis AddRotationComponent(GameObject target, float speed, RotationAxis axis) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) RotateAroundAxis val = target.AddComponent(); val.speed = (Speed)2; val.fastRotationSpeed = speed; val.rotateAroundAxis = axis; return val; } public static AnimateShaderAlpha AddShaderAlphaComponent(GameObject target, float timeMax, AnimationCurve curve, bool destroyOnEnd = true, bool disableOnEnd = false) { AnimateShaderAlpha val = target.AddComponent(); val.timeMax = timeMax; val.alphaCurve = curve; val.destroyOnEnd = destroyOnEnd; val.disableOnEnd = disableOnEnd; return val; } internal static Sprite CreateSprite(Texture2D tex) { //IL_001a: 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) return Sprite.Create(tex, new Rect(0f, 0f, (float)((Texture)tex).width, (float)((Texture)tex).height), new Vector2(0.5f, 0.5f), 128f); } internal static SkinDefInfo CreateNewSkinDefInfo(SkinnedMeshRenderer[] childList, GameObject rootObject, string skinName, string objectToEnable, RendererInfo[] rendererInfos, UnlockableDef unlockableDef = null) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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_006e: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) SkinDefInfo result = default(SkinDefInfo); result.BaseSkins = Array.Empty(); result.MinionSkinReplacements = (MinionSkinReplacement[])(object)new MinionSkinReplacement[0]; result.ProjectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[0]; List list = new List(); foreach (SkinnedMeshRenderer val in childList) { GameObjectActivation val2 = default(GameObjectActivation); val2.gameObject = ((Component)val).gameObject; val2.shouldActivate = ((Object)val).name == objectToEnable; GameObjectActivation item = val2; list.Add(item); } result.GameObjectActivations = list.ToArray(); result.Icon = Assets.MainAssetBundle.LoadAsset(objectToEnable); result.MeshReplacements = (MeshReplacement[])(object)new MeshReplacement[0]; result.Name = skinName; result.NameToken = skinName; result.RendererInfos = rendererInfos; result.RootObject = rootObject; result.UnlockableDef = unlockableDef; return result; } internal static T CopyComponent(T original, GameObject destination) where T : Component { Type type = ((object)original).GetType(); Component val = destination.AddComponent(type); FieldInfo[] fields = type.GetFields(); FieldInfo[] array = fields; foreach (FieldInfo fieldInfo in array) { fieldInfo.SetValue(val, fieldInfo.GetValue(original)); } return (T)(object)((val is T) ? val : null); } public static Sprite CreateSpriteFromTexture(Texture2D texture) { //IL_0025: 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) if (Object.op_Implicit((Object)(object)texture)) { return Sprite.Create(texture, new Rect(0f, 0f, (float)((Texture)texture).width, (float)((Texture)texture).height), new Vector2(0.5f, 0.5f)); } return null; } public static GameObject FindInActiveObjectByName(string name) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 Transform[] array = Resources.FindObjectsOfTypeAll(); for (int i = 0; i < array.Length; i++) { if ((int)((Object)array[i]).hideFlags == 0 && ((Object)array[i]).name == name) { return ((Component)array[i]).gameObject; } } return null; } public static void CreateHitboxes(string name, Transform parent, Vector3[] sizes, Vector3[] positions) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_004f: 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_006a: 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_0082: Unknown result type (might be due to invalid IL or missing references) HitBoxGroup val = ((Component)parent).gameObject.AddComponent(); val.groupName = name; List list = new List(); for (int i = 0; i < sizes.Length; i++) { GameObject val2 = new GameObject(name + (i + 1)); val2.transform.SetParent(parent); val2.transform.localPosition = positions[i]; val2.transform.localRotation = Quaternion.Euler(Vector3.forward * 45f); val2.transform.localScale = sizes[i]; HitBox item = val2.AddComponent(); val2.layer = LayerIndex.projectile.intVal; list.Add(item); } val.hitBoxes = list.ToArray(); } public static GameObject CreateHitbox(string name, Transform parent, Vector3 scale, Vector3 localPosition) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_0048: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.transform.SetParent(parent); val.transform.localPosition = localPosition; val.transform.localRotation = Quaternion.Euler(Vector3.forward * 45f); val.transform.localScale = scale; HitBoxGroup val2 = ((Component)parent).gameObject.AddComponent(); HitBox val3 = val.AddComponent(); val.layer = LayerIndex.projectile.intVal; val2.hitBoxes = (HitBox[])(object)new HitBox[1] { val3 }; val2.groupName = name; return val; } internal static EffectComponent RegisterEffect(GameObject effect, float duration, string soundName = "", bool applyScale = false, bool parentToReferencedTransform = true, bool positionAtReferencedTransform = true) { //IL_00a6: 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) EffectComponent val = effect.GetComponent(); if (!Object.op_Implicit((Object)(object)val)) { val = effect.AddComponent(); } if (duration != -1f) { DestroyOnTimer component = effect.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { effect.AddComponent().duration = duration; } else { component.duration = duration; } } if (!Object.op_Implicit((Object)(object)effect.GetComponent())) { effect.AddComponent(); } if (!Object.op_Implicit((Object)(object)effect.GetComponent())) { effect.AddComponent().vfxPriority = (VFXPriority)2; } val.applyScale = applyScale; val.effectIndex = (EffectIndex)(-1); val.parentToReferencedTransform = parentToReferencedTransform; val.positionAtReferencedTransform = positionAtReferencedTransform; val.soundName = soundName; ContentAddition.AddEffect(effect); return val; } public static Material FindMaterial(string name) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 Material[] array = Resources.FindObjectsOfTypeAll(); for (int i = 0; i < array.Length; i++) { if ((int)((Object)array[i]).hideFlags == 0 && ((Object)array[i]).name == name) { return array[i]; } } return null; } }