Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of Fiddlesticks v1.0.0
Fiddlesticks.dll
Decompiled 11 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using EntityStates; using EntityStates.AI; using EntityStates.AI.Walker; using EntityStates.Huntress; using EntityStates.Merc; using JetBrains.Annotations; using KinematicCharacterController; using R2API; using R2API.Utils; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.Achievements; using RoR2.CharacterAI; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Skills; using RoR2.UI; using TMPro; 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("Fiddlesticks")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Fiddlesticks")] [assembly: AssemblyTitle("Fiddlesticks")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Fiddlesticks; public static class Achievements { [RegisterAchievement("FIDDLE_MASTERY", "ACHIEVEMENT_FIDDLE_MASTERY_UNLOCKABLE_ID", null, 10u, null)] public class MasteryUnlockable : BasePerSurvivorClearGameMonsoonAchievement { public override BodyIndex LookUpRequiredBodyIndex() { //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_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("FiddlesticksBody"); } } internal static UnlockableDef masteryUnlock; public static void RegisterUnlockables() { masteryUnlock = NewUnlockable<MasteryUnlockable>("MASTERY", Assets.Load<Sprite>("skin"), "FIDDLE: Mastery", "As Fiddlesticks, beat the game or obliterate on Monsoon."); } private static UnlockableDef NewUnlockable<T>(string AchievementIdentifier, Sprite Icon, string Title, string Description) where T : BaseAchievement { string text = "ACHIEVEMENT_FIDDLE_"; UnlockableDef val = ScriptableObject.CreateInstance<UnlockableDef>(); string langName = text + AchievementIdentifier + "_NAME"; string langDesc = text + AchievementIdentifier + "_DESCRIPTION"; LanguageAPI.Add(langName, Title); LanguageAPI.Add(langDesc, Description); Func<string> func = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString(langName), Language.GetString(langDesc) }); Type typeFromHandle = typeof(T); val.cachedName = text + AchievementIdentifier + "_UNLOCKABLE_ID"; val.getHowToUnlockString = func; val.getUnlockedString = func; val.achievementIcon = Icon; val.sortScore = 200; val.hidden = false; ContentAddition.AddUnlockableDef(val); return val; } } internal class Assets { public static AssetBundle MainAssetBundle; public static T Load<T>(string name) where T : Object { return MainAssetBundle.LoadAsset<T>(name); } public static void PopulateAssets() { Assembly executingAssembly = Assembly.GetExecutingAssembly(); if ((Object)(object)MainAssetBundle == (Object)null) { using Stream stream = executingAssembly.GetManifestResourceStream("Fiddlesticks.AssetBundle." + "Fiddlesticks".ToLower() + "assets"); MainAssetBundle = AssetBundle.LoadFromStream(stream); } using Stream stream2 = executingAssembly.GetManifestResourceStream("Fiddlesticks.Fiddlesticks.bnk"); byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } } internal class DecoyBehaviour : MonoBehaviour { private Animator animator; private Rigidbody rigid; private ModelSkinController skinController; public CharacterBody ownerBody; private TeamMask mask; private SphereSearch search = new SphereSearch(); private Dictionary<HurtBox, AIFollowDecoy> aiDict = new Dictionary<HurtBox, AIFollowDecoy>(); private float stopwatch; public bool forceFlee; private bool fleeing; private float fleeStopwatch; public float speed = 450f; public float maxFleeDuration = 3f; public float deathDuration = 1.5f; private bool dead; private uint skinIndex; private void Awake() { animator = ((Component)this).GetComponent<Animator>(); rigid = ((Component)this).GetComponent<Rigidbody>(); skinController = ((Component)this).GetComponent<ModelSkinController>(); } private void Start() { //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) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) EntityState.PlayAnimationOnAnimator(animator, "Body", "DummySpawn"); search.radius = 12f; search.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; mask = TeamMask.GetEnemyTeams(ownerBody.teamComponent.teamIndex); skinIndex = ownerBody.skinIndex; if (skinIndex == 1) { skinController.ApplySkin(1); } AkSoundEngine.PostEvent((skinIndex == 0) ? 2995597660u : 787025785u, ((Component)this).gameObject); } private void Update() { } private void FixedUpdate() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)rigid)) { return; } rigid.isKinematic = !fleeing; stopwatch += Time.fixedDeltaTime; if (!dead && stopwatch >= 0.1f) { stopwatch = 0f; search.origin = ((Component)this).transform.position; HurtBox[] hurtBoxes = search.RefreshCandidates().FilterCandidatesByHurtBoxTeam(mask).FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); HurtBox[] array = hurtBoxes; foreach (HurtBox val in array) { if (!aiDict.TryGetValue(val, out var value) && Object.op_Implicit((Object)(object)val.healthComponent) && Object.op_Implicit((Object)(object)val.healthComponent.body) && Object.op_Implicit((Object)(object)val.healthComponent.body.master)) { value = ((Component)val.healthComponent.body.master).gameObject.AddComponent<AIFollowDecoy>(); value.target = ((Component)this).gameObject; aiDict.Add(val, value); } } if ((!fleeing && aiDict.Count > 0) || forceFlee) { fleeing = true; animator.SetBool("isMoving", true); animator.SetFloat("moveSpeed", 7f); Transform transform = ((Component)this).transform; Vector3 val2 = ((Component)this).transform.position - ((Component)aiDict.FirstOrDefault().Key).transform.position; transform.forward = Utils.GetForwardDirection(((Vector3)(ref val2)).normalized); } } else if (stopwatch >= deathDuration) { AkSoundEngine.PostEvent((skinIndex == 0) ? 763556074u : 1264228149u, ((Component)this).gameObject); Object.Destroy((Object)(object)((Component)this).gameObject); } if (fleeing) { fleeStopwatch += Time.fixedDeltaTime; if (fleeStopwatch <= maxFleeDuration) { rigid.velocity = ((Component)this).transform.forward * speed * Time.fixedDeltaTime; } else if (!dead) { rigid.velocity = Vector3.zero; stopwatch = 0f; dead = true; animator.Play("DecoyDeath", 0); } } } } internal class AIFollowDecoy : MonoBehaviour { private BaseAI ai; private AISkillDriver driver; private EntityStateMachine machine; public GameObject target; private void Start() { //IL_0087: 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_009f: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) machine = ((Component)this).GetComponent<EntityStateMachine>(); if (Object.op_Implicit((Object)(object)machine)) { machine.SetNextState((EntityState)(object)new AIFolowDecoyState()); } ai = ((Component)this).GetComponent<BaseAI>(); if (Object.op_Implicit((Object)(object)ai)) { ai.currentEnemy.Reset(); driver = ((Component)this).gameObject.AddComponent<AISkillDriver>(); driver.customName = "FollowDecoy"; driver.moveTargetType = (TargetType)3; driver.movementType = (MovementType)1; driver.aimType = (AimType)4; driver.ignoreNodeGraph = true; driver.buttonPressType = (ButtonPressType)0; driver.skillSlot = (SkillSlot)(-1); ai.currentEnemy.gameObject = target; ai.customTarget.gameObject = target; ai.selectedSkilldriverName = "FollowDecoy"; ai.skillDriverEvaluation = new SkillDriverEvaluation { aimTarget = ai.customTarget, target = ai.customTarget, dominantSkillDriver = driver }; } } private void FixedUpdate() { if (!Object.op_Implicit((Object)(object)target)) { Object.Destroy((Object)(object)this); } if (Object.op_Implicit((Object)(object)ai)) { ai.skillDriverUpdateTimer = 0.1f; } } private void OnDisable() { if (Object.op_Implicit((Object)(object)ai)) { ai.customTarget.gameObject = null; ai.currentEnemy.Reset(); } if (Object.op_Implicit((Object)(object)driver)) { Object.Destroy((Object)(object)driver); } } } internal class AIFolowDecoyState : Wander { public override void OnEnter() { ((Wander)this).OnEnter(); } public override void OnExit() { ((Wander)this).OnExit(); } public override void FixedUpdate() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) ((Wander)this).FixedUpdate(); base.lookTimer = 1f; if (Object.op_Implicit((Object)(object)((BaseAIState)this).ai) && Object.op_Implicit((Object)(object)((BaseAIState)this).ai.customTarget.gameObject)) { base.targetPosition = ((BaseAIState)this).ai.customTarget.gameObject.transform.position; ((BaseAIState)this).ai.SetGoalPosition(base.targetPosition); ((BaseAIState)this).ai.localNavigator.targetPosition = base.targetPosition.Value; } else { ((EntityState)this).outer.SetNextStateToMain(); } } } internal class FiddleBehaviour : NetworkBehaviour { public GenericSkill passive; public CharacterBody body; public bool spawnDecoy = true; private float decoyStopwatch; private float decoyCD = 30f; private SphereSearch sphereSearch = new SphereSearch(); private float searchStopwatch; public int nearbyTargets; public VObehaviour voBehaviour; public bool inUlt; private void Awake() { body = ((Component)this).GetComponent<CharacterBody>(); voBehaviour = ((Component)this).GetComponent<VObehaviour>(); } private void Update() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(MainPlugin.passiveKey.Value) && Util.HasEffectiveAuthority(((Component)this).gameObject) && Object.op_Implicit((Object)(object)passive) && passive.CanExecute()) { passive.ExecuteIfReady(); } } private void FixedUpdate() { //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_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_0084: 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) searchStopwatch += Time.fixedDeltaTime; if (searchStopwatch >= 0.1f) { searchStopwatch = 0f; sphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; sphereSearch.origin = ((Component)this).transform.position; sphereSearch.radius = 13f + body.radius; sphereSearch.queryTriggerInteraction = (QueryTriggerInteraction)0; sphereSearch.RefreshCandidates(); sphereSearch.FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(body.teamComponent.teamIndex)); sphereSearch.OrderCandidatesByDistance(); sphereSearch.FilterCandidatesByDistinctHurtBoxEntities(); sphereSearch.FilterByLiveEntities(); nearbyTargets = sphereSearch.GetHurtBoxes().Length; sphereSearch.ClearCandidates(); } if (spawnDecoy) { decoyStopwatch += Time.fixedDeltaTime; if (decoyStopwatch >= decoyCD) { decoyStopwatch = 0f; spawnDecoy = true; } } } [ClientRpc] public void RpcSpawnDecoy() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) if (spawnDecoy) { GameObject val = Object.Instantiate<GameObject>(Prefabs.model, ((Component)this).transform.position, Quaternion.LookRotation(-body.characterDirection.forward)); val.GetComponent<Animator>().SetBool("dummy", true); DecoyBehaviour component = val.GetComponent<DecoyBehaviour>(); component.ownerBody = body; component.forceFlee = true; spawnDecoy = false; } } } internal class HUDTracker : MonoBehaviour { public GameObject skillRoot; public GameObject sprintCluster; public GameObject inventoryCluster; public SkillIcon icon; public MPEventSystemLocator mpLocator; public HUD hud; public FiddleBehaviour behaviour; private bool hadBehaviour; public HGTextMeshProUGUI text; public string passiveKeybind; private void Awake() { hud = ((Component)this).GetComponent<HUD>(); } private void FixedUpdate() { //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)behaviour)) { if (hadBehaviour && skillRoot.activeInHierarchy) { sprintCluster.SetActive(true); skillRoot.gameObject.SetActive(false); } if (!Object.op_Implicit((Object)(object)hud) || !Object.op_Implicit((Object)(object)hud.targetBodyObject)) { return; } behaviour = hud.targetBodyObject.GetComponent<FiddleBehaviour>(); if (Object.op_Implicit((Object)(object)behaviour) && Object.op_Implicit((Object)(object)skillRoot) && Object.op_Implicit((Object)(object)sprintCluster) && Object.op_Implicit((Object)(object)mpLocator) && Object.op_Implicit((Object)(object)icon)) { hadBehaviour = true; if (Object.op_Implicit((Object)(object)sprintCluster)) { sprintCluster.transform.localPosition = Vector2.op_Implicit(new Vector2(-474.0534f, -10.17963f)); } if (Object.op_Implicit((Object)(object)inventoryCluster)) { inventoryCluster.transform.localPosition = Vector2.op_Implicit(new Vector2(-555.6793f, -10.17968f)); } icon.targetSkill = hud.targetBodyObject.GetComponents<GenericSkill>()[0]; mpLocator.eventSystemProvider = ((Component)hud).GetComponent<MPEventSystemProvider>(); skillRoot.gameObject.SetActive(true); } } else if (Object.op_Implicit((Object)(object)text) && ((TMP_Text)text).text != passiveKeybind) { ((TMP_Text)text).text = passiveKeybind; } } public HUDTracker() { //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) KeyCode value = MainPlugin.passiveKey.Value; passiveKeybind = ((object)(KeyCode)(ref value)).ToString(); ((MonoBehaviour)this)..ctor(); } } internal class ModelBehaviour : MonoBehaviour { private CharacterModel model; private Animator animator; private GameObject trail; private void Awake() { model = ((Component)this).GetComponent<CharacterModel>(); animator = ((Component)this).GetComponent<Animator>(); } private void FixedUpdate() { if (Object.op_Implicit((Object)(object)model) && Object.op_Implicit((Object)(object)model.body) && !Object.op_Implicit((Object)(object)animator)) { } } } internal class SuccTether : MonoBehaviour { public GameObject activeVfx; private bool setvfx; private TetherVfxOrigin tetherVfxOrigin; private NetworkedBodyAttachment attachment; private SphereSearch sphereSearch = new SphereSearch(); private float stopwatch = 1f; private List<HurtBox> hurtboxes = new List<HurtBox>(); private List<Transform> transforms = new List<Transform>(); private float damageCoefficient = 2f; private float finalTickDamageCoefficient = 3.5f; private bool skin; private void Awake() { attachment = ((Component)this).GetComponent<NetworkedBodyAttachment>(); SiphonNearbyController component = ((Component)this).GetComponent<SiphonNearbyController>(); tetherVfxOrigin = component.tetherVfxOrigin; Object.Destroy((Object)(object)component); } private void FixedUpdate() { if (!Object.op_Implicit((Object)(object)attachment.attachedBody)) { return; } if (!setvfx) { setvfx = true; skin = attachment.attachedBody.skinIndex == 1; ChildLocator component = activeVfx.GetComponent<ChildLocator>(); if (!skin) { ((Component)component.FindChild("base")).gameObject.SetActive(true); } else { ((Component)component.FindChild("skin")).gameObject.SetActive(true); } tetherVfxOrigin.tetherPrefab = ((!skin) ? Prefabs.tetherVFXPrefab : Prefabs.tetherVFXPrefabSkin); } stopwatch += Time.fixedDeltaTime; if (stopwatch >= 0.25f / attachment.attachedBody.attackSpeed) { stopwatch = 0f; Tick(); } } private void Tick() { hurtboxes.Clear(); transforms.Clear(); SearchForTargets(hurtboxes); if (hurtboxes.Count > 0) { DamageTargets(damageCoefficient); } tetherVfxOrigin.SetTetheredTransforms(transforms); activeVfx.SetActive(hurtboxes.Count > 0); } protected void SearchForTargets(List<HurtBox> dest) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_0027: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) sphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; sphereSearch.origin = ((Component)this).transform.position; sphereSearch.radius = 13f + attachment.attachedBody.radius; sphereSearch.queryTriggerInteraction = (QueryTriggerInteraction)0; sphereSearch.RefreshCandidates(); sphereSearch.FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(attachment.attachedBody.teamComponent.teamIndex)); sphereSearch.OrderCandidatesByDistance(); sphereSearch.FilterCandidatesByDistinctHurtBoxEntities(); sphereSearch.FilterByLiveEntities(); sphereSearch.GetHurtBoxes(dest); sphereSearch.ClearCandidates(); } private void DamageTargets(float damage, bool finalTick = false) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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_00c0: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_011f: 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_012b: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0186: 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_0067: Unknown result type (might be due to invalid IL or missing references) foreach (HurtBox hurtbox in hurtboxes) { if (finalTick) { Transform coreTransform = hurtbox.healthComponent.body.coreTransform; EffectManager.SimpleEffect(skin ? Prefabs.skinHitEffectSimple : Prefabs.succHitVFX, Object.op_Implicit((Object)(object)coreTransform) ? coreTransform.position : ((Component)hurtbox).transform.position, Quaternion.identity, true); } CharacterBody body = hurtbox.healthComponent.body; Transform val = (((Object)(object)body != (Object)null) ? body.coreTransform : null) ?? ((Component)hurtbox).transform; transforms.Add(val); if (NetworkServer.active) { DamageInfo val2 = new DamageInfo(); val2.attacker = attachment.attachedBodyObject; val2.inflictor = ((Component)this).gameObject; val2.position = val.position; val2.crit = attachment.attachedBody.RollCrit(); val2.damage = attachment.attachedBody.damage * damage; val2.damageColorIndex = (DamageColorIndex)0; val2.force = Vector3.zero; val2.procCoefficient = 0f; val2.damageType = DamageTypeCombo.GenericSecondary; val2.procChainMask = default(ProcChainMask); hurtbox.healthComponent.TakeDamage(val2); HealthComponent healthComponent = attachment.attachedBody.healthComponent; healthComponent.Heal(healthComponent.fullCombinedHealth * 0.01f, default(ProcChainMask), true); } } } private void OnDisable() { AkSoundEngine.PostEvent(skin ? "Play_sfx_FiddlesticksSkin06_FiddlesticksW_finaltick" : "Play_sfx_Fiddlesticks_FiddlesticksW_finaltick", ((Component)this).gameObject); if (hurtboxes.Count > 0) { DamageTargets(finalTickDamageCoefficient, finalTick: true); } } } internal class VObehaviour : NetworkBehaviour { public enum VOType { Attack, Death, M2, Util, Spec, Kill, Dummy, Idle } private struct VOStopwatch { public float stopwatch; public bool canPlay; public float cooldown; public string ID; public VOStopwatch(float baseCooldown, string id) { cooldown = baseCooldown; stopwatch = 0f; canPlay = true; ID = id; } } private float globalCD; private float globalMinCD = 3f; private uint currentID; private CharacterBody body; private VOStopwatch[] stopwatches; private VOStopwatch Attack; private VOStopwatch Death; private VOStopwatch M2; private VOStopwatch Util; private VOStopwatch Spec; private VOStopwatch Kill; private VOStopwatch Dummy; private VOStopwatch Idle; [ClientRpc] public void RpcPlayVO(int voIndex) { PlayVO(voIndex); } [Command] public void CmdPlayVO(int voIndex) { RpcPlayVO(voIndex); } public void PlayVO(int voIndex) { if ((!(globalCD < globalMinCD) || voIndex == 1) && MainPlugin.enableVO.Value && body.skinIndex == 1 && stopwatches[voIndex].canPlay) { AkSoundEngine.StopPlayingID(currentID); stopwatches[voIndex].stopwatch = 0f; stopwatches[voIndex].canPlay = false; currentID = AkSoundEngine.PostEvent(stopwatches[voIndex].ID, ((Component)this).gameObject); globalCD = 0f; } } private void Awake() { body = ((Component)this).GetComponent<CharacterBody>(); } private void Start() { Attack = new VOStopwatch(6f, "Play_vo_FiddlesticksSkin06_Attack2DGeneral"); Death = new VOStopwatch(0f, "Play_vo_FiddlesticksSkin06_Death3D"); M2 = new VOStopwatch(5f, "Play_vo_FiddlesticksSkin06_FiddlesticksW_cast3D"); Util = new VOStopwatch(3f, "Play_vo_FiddlesticksSkin06_FiddlesticksQ_cast3D"); Spec = new VOStopwatch(4f, "Play_vo_FiddlesticksSkin06_FiddlesticksR_cast3D"); Kill = new VOStopwatch(8f, "Play_vo_FiddlesticksSkin06_Kill3DGeneral"); Dummy = new VOStopwatch(5f, "Play_vo_FiddlesticksSkin06_Move"); Idle = new VOStopwatch(14f, "Play_vo_FiddlesticksSkin06_PassiveCast"); stopwatches = new VOStopwatch[8] { Attack, Death, M2, Util, Spec, Kill, Dummy, Idle }; } private void FixedUpdate() { globalCD += Time.fixedDeltaTime; for (int i = 0; i < stopwatches.Length; i++) { if (!stopwatches[i].canPlay) { stopwatches[i].stopwatch += Time.fixedDeltaTime; if (stopwatches[i].stopwatch >= stopwatches[i].cooldown) { stopwatches[i].canPlay = true; stopwatches[i].stopwatch = 0f; } } } } } internal class FiddleOrb : Orb { public List<HealthComponent> bouncedObjects; public float speed = 100f; public GameObject attacker; public TeamIndex teamIndex; public ProcChainMask procChainMask; public float procCoefficient = 1f; public float damage; public DamageColorIndex damageColorIndex; public float range = 20f; public DamageType damageType; public bool isCrit; public GameObject inflictor; private BullseyeSearch search; public int bouncesRemaining; public override void Begin() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / speed; CharacterBody component = attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect((component.skinIndex == 1) ? Prefabs.orbEffectSkin : Prefabs.orbEffect, val, true); } } public override void OnArrival() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //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) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_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_0105: 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_004f: 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_0197: 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_01da: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0248: 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_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)base.target)) { return; } if (Object.op_Implicit((Object)(object)attacker)) { EffectManager.SimpleEffect((attacker.GetComponent<CharacterBody>().skinIndex == 0) ? Prefabs.orbHitEffect : Prefabs.orbHitEffectSkin, ((Component)base.target).transform.position, Quaternion.identity, true); } HealthComponent healthComponent = base.target.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent)) { DamageInfo val = new DamageInfo(); val.damage = damage; val.attacker = attacker; val.inflictor = inflictor; val.force = Vector3.zero; val.crit = isCrit; val.procChainMask = procChainMask; val.procCoefficient = procCoefficient; val.position = ((Component)base.target).transform.position; val.damageColorIndex = damageColorIndex; val.damageType = DamageTypeCombo.op_Implicit(damageType); healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)healthComponent).gameObject); GlobalEventManager.instance.OnHitAll(val, ((Component)healthComponent).gameObject); } if (bouncesRemaining > 0) { if (bouncedObjects != null) { bouncedObjects.Clear(); bouncedObjects.Add(base.target.healthComponent); } HurtBox val2 = PickNextTarget(((Component)base.target).transform.position); if (Object.op_Implicit((Object)(object)val2)) { FiddleOrb fiddleOrb = new FiddleOrb(); fiddleOrb.search = search; ((Orb)fiddleOrb).origin = ((Component)base.target).transform.position; ((Orb)fiddleOrb).target = val2; fiddleOrb.attacker = attacker; fiddleOrb.inflictor = inflictor; fiddleOrb.teamIndex = teamIndex; fiddleOrb.damage = damage; fiddleOrb.bouncesRemaining = bouncesRemaining - 1; fiddleOrb.isCrit = isCrit; fiddleOrb.bouncedObjects = bouncedObjects; fiddleOrb.procChainMask = procChainMask; fiddleOrb.procCoefficient = procCoefficient; fiddleOrb.damageColorIndex = damageColorIndex; fiddleOrb.speed = speed; fiddleOrb.range = range; fiddleOrb.damageType = damageType; OrbManager.instance.AddOrb((Orb)(object)fiddleOrb); } } } public HurtBox PickNextTarget(Vector3 position) { //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_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_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_0053: 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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown if (search == null) { search = new BullseyeSearch(); } search.searchOrigin = position; search.searchDirection = Vector3.zero; search.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref search.teamMaskFilter)).RemoveTeam(teamIndex); search.filterByLoS = false; search.sortMode = (SortMode)1; search.maxDistanceFilter = range; search.RefreshCandidates(); if (Object.op_Implicit((Object)(object)base.target)) { search.FilterOutGameObject(((Component)base.target).gameObject); } HurtBox val = (from v in search.GetResults() where !bouncedObjects.Contains(v.healthComponent) select v).FirstOrDefault(); if (Object.op_Implicit((Object)(object)val)) { bouncedObjects.Add(val.healthComponent); } return val; } } internal class Hook { internal static void Hooks() { GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; } private static void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport) { if (Object.op_Implicit((Object)(object)damageReport.attacker)) { VObehaviour component = damageReport.attacker.GetComponent<VObehaviour>(); if (Object.op_Implicit((Object)(object)component)) { component.CmdPlayVO(5); } } } private static void GlobalEventManager_onServerDamageDealt(DamageReport damageReport) { HealthComponent victim = damageReport.victim; FiddleBehaviour fiddleBehaviour = (Object.op_Implicit((Object)(object)victim) ? ((Component)victim).GetComponent<FiddleBehaviour>() : null); if (Object.op_Implicit((Object)(object)victim) && Object.op_Implicit((Object)(object)fiddleBehaviour) && fiddleBehaviour.spawnDecoy && victim.combinedHealth <= victim.fullCombinedHealth * 0.35f) { fiddleBehaviour.RpcSpawnDecoy(); } } } [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.Fiddlesticks", "Fiddlesticks", "1.0.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.Fiddlesticks"; public const string MODNAME = "Fiddlesticks"; public const string VERSION = "1.0.0"; public const string SURVIVORNAME = "Fiddlesticks"; public const string SURVIVORNAMEKEY = "FIDDLE"; public static GameObject characterPrefab; public static readonly Color characterColor = Color32.op_Implicit(new Color32((byte)123, (byte)20, (byte)24, byte.MaxValue)); public static ConfigEntry<KeyCode> passiveKey; public static ConfigEntry<bool> enableVO; private void Awake() { passiveKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keybinds", "Passive Activation Key", (KeyCode)116, (ConfigDescription)null); enableVO = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Enable Skin VO", true, (ConfigDescription)null); Assets.PopulateAssets(); Achievements.RegisterUnlockables(); Prefabs.CreatePrefabs(); CreatePrefab(); RegisterStates(); RegisterCharacter(); Hook.Hooks(); } internal static void CreatePrefab() { //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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown //IL_017a: 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_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_066d: Unknown result type (might be due to invalid IL or missing references) //IL_068a: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_05b2: Unknown result type (might be due to invalid IL or missing references) //IL_05bf: Unknown result type (might be due to invalid IL or missing references) //IL_0759: Unknown result type (might be due to invalid IL or missing references) //IL_0763: Unknown result type (might be due to invalid IL or missing references) //IL_084a: Unknown result type (might be due to invalid IL or missing references) //IL_08b5: Unknown result type (might be due to invalid IL or missing references) //IL_08c9: Unknown result type (might be due to invalid IL or missing references) //IL_08ee: Unknown result type (might be due to invalid IL or missing references) //IL_0902: Unknown result type (might be due to invalid IL or missing references) //IL_09f4: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_0a1c: Unknown result type (might be due to invalid IL or missing references) //IL_0a21: Unknown result type (might be due to invalid IL or missing references) //IL_0a4f: Unknown result type (might be due to invalid IL or missing references) //IL_0a54: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion(); characterPrefab = PrefabAPI.InstantiateClone(val, "FiddlesticksBody", true); characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true; Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("ModelBase")).gameObject); Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("CameraPivot")).gameObject); Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("AimOrigin")).gameObject); characterPrefab.AddComponent<HuntressTracker>().maxTrackingDistance = 35f; characterPrefab.AddComponent<VObehaviour>(); GameObject val2 = Assets.MainAssetBundle.LoadAsset<GameObject>("fiddleMdl"); val2.AddComponent<ModelBehaviour>(); val2.AddComponent<AnimationEvents>().soundCenter = val2; GameObject val3 = new GameObject("ModelBase"); val3.transform.parent = characterPrefab.transform; val3.transform.localPosition = new Vector3(0f, -0.94f, 0f); val3.transform.localRotation = Quaternion.identity; val3.transform.localScale = new Vector3(1f, 1f, 1f); GameObject val4 = new GameObject("AimOrigin"); val4.transform.parent = val3.transform; val4.transform.localPosition = new Vector3(0f, 1.4f, 0f); val4.transform.localRotation = Quaternion.identity; val4.transform.localScale = Vector3.one; Transform transform = val2.transform; transform.parent = val3.transform; transform.localPosition = Vector3.zero; transform.localScale = Vector3.one; transform.localRotation = Quaternion.identity; CharacterDirection component = characterPrefab.GetComponent<CharacterDirection>(); component.targetTransform = val3.transform; component.modelAnimator = val2.GetComponentInChildren<Animator>(); component.turnSpeed = 720f; CharacterBody component2 = characterPrefab.GetComponent<CharacterBody>(); ((Object)component2).name = "FiddlesticksBody"; component2.baseNameToken = "FIDDLE_NAME"; component2.subtitleNameToken = "FIDDLE_SUBTITLE"; component2.bodyFlags = (BodyFlags)16; component2.rootMotionInMainState = false; component2.mainRootSpeed = 0f; component2.baseMaxHealth = 110f; component2.levelMaxHealth = 35f; component2.baseRegen = 1.5f; component2.levelRegen = 0.2f; component2.baseMaxShield = 0f; component2.levelMaxShield = 0f; component2.baseMoveSpeed = 7f; component2.levelMoveSpeed = 0f; component2.baseAcceleration = 110f; component2.baseJumpPower = 15f; component2.levelJumpPower = 0f; component2.baseDamage = 12f; component2.levelDamage = 2.4f; component2.baseAttackSpeed = 1f; component2.levelAttackSpeed = 0f; component2.baseCrit = 1f; component2.levelCrit = 0f; component2.baseArmor = 0f; component2.levelArmor = 0f; component2.baseJumpCount = 1; component2.sprintingSpeedMultiplier = 1.45f; component2.wasLucky = false; component2.hideCrosshair = false; component2.aimOriginTransform = val4.transform; component2.hullClassification = (HullClassification)0; component2.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait").texture; component2.isChampion = false; component2.currentVehicle = null; component2.skinIndex = 0u; component2.bodyColor = characterColor; HealthComponent component3 = characterPrefab.GetComponent<HealthComponent>(); component3.health = component2.baseMaxHealth; component3.shield = 0f; component3.barrier = 0f; CharacterMotor component4 = characterPrefab.GetComponent<CharacterMotor>(); component4.walkSpeedPenaltyCoefficient = 1f; component4.characterDirection = component; component4.muteWalkMotion = false; component4.mass = 160f; component4.airControl = 0.25f; component4.disableAirControlUntilCollision = false; component4.generateParametersOnAwake = true; InputBankTest component5 = characterPrefab.GetComponent<InputBankTest>(); component5.moveVector = Vector3.zero; CameraTargetParams component6 = characterPrefab.GetComponent<CameraTargetParams>(); component6.cameraParams = val.GetComponent<CameraTargetParams>().cameraParams; component6.cameraPivotTransform = null; component6.recoil = Vector2.zero; component6.dontRaycastToPivot = false; ModelLocator component7 = characterPrefab.GetComponent<ModelLocator>(); 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; Renderer[] componentsInChildren = val2.GetComponentsInChildren<Renderer>(true); List<RendererInfo> list = new List<RendererInfo>(); foreach (Renderer val5 in componentsInChildren) { string name = ((Object)val5).name; if (name != "baseLanternGlow") { Texture texture = val5.material.GetTexture("_EmissionMap"); if (Object.op_Implicit((Object)(object)texture)) { val5.material = Utils.InstantiateMaterial(val5.material.mainTexture, val5.material.GetTexture("_EmissionMap")); } else { val5.material = Utils.InstantiateMaterial(val5.material.mainTexture); } } list.Add(new RendererInfo { renderer = val5, defaultMaterial = val5.material, defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }); } CharacterModel val6 = val2.AddComponent<CharacterModel>(); RendererInfo[] array = list.ToArray(); val6.body = component2; val6.baseRendererInfos = array; val6.autoPopulateLightInfos = true; val6.invisibilityCount = 0; val6.temporaryOverlays = new List<TemporaryOverlayInstance>(); val6.mainSkinnedMeshRenderer = val2.GetComponentInChildren<SkinnedMeshRenderer>(); LanguageAPI.Add("FIDDLEBODY_DEFAULT_SKIN_NAME", "Default"); LanguageAPI.Add("FIDDLEBODY_MASTERY_SKIN_NAME", "Surprise Party"); ModelSkinController val7 = val2.AddComponent<ModelSkinController>(); val7.skins = (SkinDef[])(object)new SkinDef[2] { Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, "FIDDLEBODY_DEFAULT_SKIN_NAME", "base", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, "FIDDLEBODY_MASTERY_SKIN_NAME", "skin", array)) }; Renderer[] array2 = componentsInChildren; foreach (Renderer val8 in array2) { if (!((Object)val8).name.Contains("base")) { ((Component)val8).gameObject.SetActive(false); } } Prefabs.model = Prefabs.Instantiate(val2, "FiddleMdl"); Collider[] componentsInChildren2 = Prefabs.model.GetComponentsInChildren<Collider>(); foreach (Collider val9 in componentsInChildren2) { ((Component)val9).gameObject.layer = LayerIndex.fakeActor.intVal; } Prefabs.dummy = Prefabs.Instantiate(Prefabs.model, "FiddleDummy"); CapsuleCollider val10 = Prefabs.dummy.AddComponent<CapsuleCollider>(); val10.center = Vector3.up * 1.31f; val10.radius = 0.29f; val10.height = 2.59f; Rigidbody val11 = Prefabs.dummy.AddComponent<Rigidbody>(); val11.freezeRotation = true; Prefabs.dummy.AddComponent<DecoyBehaviour>(); Collider[] componentsInChildren3 = Prefabs.dummy.GetComponentsInChildren<Collider>(); foreach (Collider val12 in componentsInChildren3) { ((Component)val12).gameObject.layer = LayerIndex.fakeActor.intVal; } Collider[] componentsInChildren4 = val2.GetComponentsInChildren<Collider>(); HurtBoxGroup val13 = val2.AddComponent<HurtBoxGroup>(); List<HurtBox> list2 = new List<HurtBox>(); Collider[] array3 = componentsInChildren4; foreach (Collider val14 in array3) { HurtBox val15 = ((Component)val14).gameObject.AddComponent<HurtBox>(); ((Component)val15).gameObject.layer = LayerIndex.entityPrecise.intVal; val15.healthComponent = component3; val15.isBullseye = true; val15.damageModifier = (DamageModifier)0; val15.hurtBoxGroup = val13; val15.indexInGroup = 0; val13.mainHurtBox = val15; val13.bullseyeCount = 1; list2.Add(val15); } val13.hurtBoxes = list2.ToArray(); Utils.CreateHitbox("Slash", val2.transform, new Vector3(6f, 6f, 7.5f), new Vector3(0f, 1f, 2.7f)); Utils.CreateHitbox("SlashBig", val2.transform, new Vector3(9f, 9f, 12f), new Vector3(0f, 1f, 3.5f)); KinematicCharacterMotor component8 = characterPrefab.GetComponent<KinematicCharacterMotor>(); component8.CharacterController = (ICharacterController)(object)component4; component8.playerCharacter = true; characterPrefab.GetComponent<Interactor>().maxInteractionDistance = 3f; characterPrefab.GetComponent<InteractionDriver>().highlightInteractor = true; SfxLocator component9 = characterPrefab.GetComponent<SfxLocator>(); component9.deathSound = "Play_ui_player_death"; component9.barkSound = ""; component9.openSound = ""; component9.landingSound = "Play_char_land"; component9.fallDamageSound = "Play_char_land_fall_damage"; component9.aliveLoopStart = ""; component9.aliveLoopStop = ""; characterPrefab.GetComponent<Rigidbody>().mass = component4.mass; FootstepHandler val16 = val2.AddComponent<FootstepHandler>(); val16.baseFootstepString = "Play_player_footstep"; val16.sprintFootstepOverrideString = ""; val16.enableFootstepDust = true; val16.footstepDustPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion(); EntityStateMachine component10 = ((Component)component2).GetComponent<EntityStateMachine>(); component10.mainStateType = new SerializableEntityStateType(typeof(CharacterMain)); CharacterDeathBehavior component11 = characterPrefab.GetComponent<CharacterDeathBehavior>(); component11.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>(); component11.deathState = new SerializableEntityStateType(typeof(DeathState)); Utils.NewStateMachine<Idle>(characterPrefab, "Passive"); NetworkStateMachine component12 = ((Component)component2).GetComponent<NetworkStateMachine>(); component12.stateMachines = ((Component)component2).GetComponents<EntityStateMachine>(); ContentAddition.AddBody(characterPrefab); } private void RegisterCharacter() { //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) string text = " <style=cSub>\r\n\r\n< ! > \r\n\r\n< ! > \r\n\r\n< ! > \r\n\r\n< ! > \r\n\r\n"; string text2 = "..and so he left."; string text3 = "..and so he vanished."; string text4 = ""; LanguageAPI.Add("FIDDLE_NAME", "Fiddlesticks"); LanguageAPI.Add("FIDDLE_DESCRIPTION", text); LanguageAPI.Add("FIDDLE_SUBTITLE", "Ancient Fear"); LanguageAPI.Add("FIDDLE_OUTRO", text2); LanguageAPI.Add("FIDDLE_FAIL", text3); SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>(); val.cachedName = "FIDDLE_NAME"; val.unlockableDef = null; val.descriptionToken = "FIDDLE_DESCRIPTION"; val.primaryColor = characterColor; val.bodyPrefab = characterPrefab; val.displayPrefab = Utils.NewDisplayModel(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "FiddlesticksDisplay"); val.outroFlavorToken = "FIDDLE_OUTRO"; val.desiredSortPosition = 22f; val.mainEndingEscapeFailureFlavorToken = "FIDDLE_FAIL"; ContentAddition.AddSurvivorDef(val); SkillSetup(); GameObject val2 = PrefabAPI.InstantiateClone(Prefabs.Load<GameObject>("RoR2/Base/Commando/CommandoMonsterMaster.prefab"), "FiddlesticksMaster", true); ContentAddition.AddMaster(val2); CharacterMaster component = val2.GetComponent<CharacterMaster>(); component.bodyPrefab = characterPrefab; } private 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) bool flag = default(bool); ContentAddition.AddEntityState<DeathState>(ref flag); ContentAddition.AddEntityState<Passive>(ref flag); ContentAddition.AddEntityState<Primary>(ref flag); ContentAddition.AddEntityState<Secondary>(ref flag); ContentAddition.AddEntityState<SecondaryEnd>(ref flag); ContentAddition.AddEntityState<Utility>(ref flag); ContentAddition.AddEntityState<Special>(ref flag); ContentAddition.AddEntityState<SpecialTransition>(ref flag); ContentAddition.AddEntityState<SpecialAOE>(ref flag); ContentAddition.AddEntityState<CharacterMain>(ref flag); ContentAddition.AddEntityState<MeleeSkillState>(ref flag); ContentAddition.AddEntityState<BasicMeleeSkillState>(ref flag); ContentAddition.AddEntityState<AIFolowDecoyState>(ref flag); OrbAPI.AddOrb<FiddleOrb>(); } private void SkillSetup() { GenericSkill[] componentsInChildren = characterPrefab.GetComponentsInChildren<GenericSkill>(); foreach (GenericSkill val in componentsInChildren) { Object.DestroyImmediate((Object)(object)val); } PassiveSetup(); PrimarySetup(); SecondarySetup(); UtilitySetup(); SpecialSetup(); } private void PassiveSetup() { LanguageAPI.Add("FIDDLE_PASSIVE_NAME", "A Harmless Scarecrow"); LanguageAPI.Add("FIDDLE_PASSIVE_DESCRIPTION", "Place an effigy that distracts nearby enemies. Upon reaching <style=cIsHealth>low health</style>, an effigy is automatically placed and runs in the opposite direction."); SkillDef skill = Utils.NewSkillDef<SkillDef>(typeof(Passive), "Passive", 1, 30f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)0, isCombatSkill: false, mustKeyPress: false, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("passive0"), "FIDDLE_PASSIVE_DESCRIPTION", "FIDDLE_PASSIVE_NAME", Array.Empty<string>()); GenericSkill passive = Utils.NewGenericSkill(characterPrefab, skill); characterPrefab.AddComponent<FiddleBehaviour>().passive = passive; } private void PrimarySetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("FIDDLE_M1", "Reap"); LanguageAPI.Add("FIDDLE_M1_DESCRIPTION", "Fiddlesticks slashes forward for <style=cIsDamage>260% damage</style>, finishing with a scythe slash for <style=cIsDamage>375% damage</style>."); SkillDef skill = Utils.NewSkillDef<SkillDef>(typeof(Primary), "Weapon", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: true, 0, 0, 0, Assets.MainAssetBundle.LoadAsset<Sprite>("primary0"), "FIDDLE_M1_DESCRIPTION", "FIDDLE_M1", Array.Empty<string>()); component.primary = Utils.NewGenericSkill(characterPrefab, skill); } private void SecondarySetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("FIDDLE_M2", "Bountiful Harvest"); LanguageAPI.Add("FIDDLE_M2_DESCRIPTION", "Fiddlesticks forms a tether between itself and each nearby enemy over the cast time, then channels for up to <style=cIsUtility>2s</style> to harvest their souls for <style=cIsDamage>800% damage</style> per second, with the final tick at the end of the channel dealing an additional <style=cIsDamage>350% damage</style>. Fiddlesticks <style=cIsHealing>heals</style> <style=cIsHealth>1% max health</style> per hit."); SkillDef skill = Utils.NewSkillDef<SuccSkillDef>(typeof(Secondary), "Body", 1, 4f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("secondary0"), "FIDDLE_M2_DESCRIPTION", "FIDDLE_M2", Array.Empty<string>()); component.secondary = Utils.NewGenericSkill(characterPrefab, skill); } private void UtilitySetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("FIDDLE_UTIL", "Terrify"); LanguageAPI.Add("FIDDLE_UTIL_DESCRIPTION", "Fiddlesticks launches a crow at the target enemy that bounces up to 5 times, dealing <style=cIsDamage>240% damage</style> and <style=cIsDamage>stunning</style> enemies hit."); SkillDef skill = Utils.NewSkillDef<HuntressTrackingSkillDef>(typeof(Utility), "Weapon", 1, 5f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("utility0"), "FIDDLE_UTIL_DESCRIPTION", "FIDDLE_UTIL", Array.Empty<string>()); component.utility = Utils.NewGenericSkill(characterPrefab, skill); } private void SpecialSetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("FIDDLE_SPEC", "Crowstorm"); LanguageAPI.Add("FIDDLE_SPEC_DESCRIPTION", "Fiddlesticks channels for a short time, then <style=cIsUtility>blinks</style> to the target location upon completion with a murder of crows flying wildly around it for <style=cIsUtility>5s</style>, dealing <style=cIsDamage>1000% damage</style> per second."); SkillDef skill = Utils.NewSkillDef<SkillDef>(typeof(Special), "Weapon", 1, 14f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("special0"), "FIDDLE_SPEC_DESCRIPTION", "FIDDLE_SPEC", Array.Empty<string>()); component.special = Utils.NewGenericSkill(characterPrefab, skill); } } internal class Prefabs { internal static GameObject model; internal static GameObject dummy; internal static GameObject tetherVFXPrefab; internal static GameObject tetherVFXPrefabSkin; internal static GameObject siphonAttachmentPrefab; internal static GameObject clawSwingVFX; internal static GameObject clawSwingVFXSkin; internal static GameObject clawHitVFX; internal static GameObject scytheSwingVFX; internal static GameObject scytheSwingVFXSkin; internal static GameObject scytheHitVFX; internal static GameObject succHitVFX; internal static GameObject succHitVFXSkin; internal static GameObject clawHitVFXSkin; internal static GameObject scytheHitVFXSkin; internal static GameObject areaIndicator; internal static GameObject orbEffect; internal static GameObject orbEffectSkin; internal static GameObject orbHitEffect; internal static GameObject orbHitEffectSkin; internal static GameObject crowStormEffect; internal static GameObject skinHitEffectSimple; internal static GameObject ultHitEffect; internal static GameObject skinUltHitEffect; internal static T Load<T>(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<T>((object)path).WaitForCompletion(); } internal static GameObject Instantiate(string path, string name, bool registerNetwork = false) { return PrefabAPI.InstantiateClone(Load<GameObject>(path), name, registerNetwork); } internal static GameObject Instantiate(GameObject obj, string name, bool registerNetwork = false) { return PrefabAPI.InstantiateClone(obj, name, registerNetwork); } internal static void CreatePrefabs() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //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) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Expected O, but got Unknown //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_07b1: Unknown result type (might be due to invalid IL or missing references) //IL_07bb: Expected O, but got Unknown //IL_07e4: Unknown result type (might be due to invalid IL or missing references) //IL_0805: Unknown result type (might be due to invalid IL or missing references) //IL_081c: Unknown result type (might be due to invalid IL or missing references) //IL_08bd: Unknown result type (might be due to invalid IL or missing references) //IL_08c7: Expected O, but got Unknown //IL_08e5: Unknown result type (might be due to invalid IL or missing references) //IL_08ea: Unknown result type (might be due to invalid IL or missing references) //IL_0928: Unknown result type (might be due to invalid IL or missing references) //IL_0932: Unknown result type (might be due to invalid IL or missing references) //IL_0946: Unknown result type (might be due to invalid IL or missing references) //IL_0950: Expected O, but got Unknown //IL_0967: Unknown result type (might be due to invalid IL or missing references) //IL_097e: Unknown result type (might be due to invalid IL or missing references) //IL_09d8: Unknown result type (might be due to invalid IL or missing references) //IL_09df: Expected O, but got Unknown //IL_09f3: Unknown result type (might be due to invalid IL or missing references) //IL_09f8: Unknown result type (might be due to invalid IL or missing references) //IL_0a0d: Unknown result type (might be due to invalid IL or missing references) //IL_0a14: Expected O, but got Unknown //IL_0a29: Unknown result type (might be due to invalid IL or missing references) //IL_0a2e: Unknown result type (might be due to invalid IL or missing references) //IL_0a5a: Unknown result type (might be due to invalid IL or missing references) //IL_0a61: Expected O, but got Unknown //IL_0b18: Unknown result type (might be due to invalid IL or missing references) //IL_0b22: Expected O, but got Unknown //IL_0b9d: Unknown result type (might be due to invalid IL or missing references) //IL_0ba7: Expected O, but got Unknown //IL_0683: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Unknown result type (might be due to invalid IL or missing references) //IL_06e2: Unknown result type (might be due to invalid IL or missing references) //IL_0c56: Unknown result type (might be due to invalid IL or missing references) //IL_0c60: Expected O, but got Unknown //IL_075b: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Unknown result type (might be due to invalid IL or missing references) //IL_0d2e: Unknown result type (might be due to invalid IL or missing references) //IL_0d38: Expected O, but got Unknown //IL_0d68: Unknown result type (might be due to invalid IL or missing references) //IL_0d6d: Unknown result type (might be due to invalid IL or missing references) //IL_0dca: Unknown result type (might be due to invalid IL or missing references) //IL_0dd1: Expected O, but got Unknown //IL_0dd8: Unknown result type (might be due to invalid IL or missing references) //IL_0e04: Unknown result type (might be due to invalid IL or missing references) //IL_0e0b: Expected O, but got Unknown //IL_0e12: Unknown result type (might be due to invalid IL or missing references) //IL_0e4f: Unknown result type (might be due to invalid IL or missing references) //IL_0eae: Unknown result type (might be due to invalid IL or missing references) //IL_0eb3: Unknown result type (might be due to invalid IL or missing references) //IL_0ecd: Unknown result type (might be due to invalid IL or missing references) //IL_0ed2: Unknown result type (might be due to invalid IL or missing references) //IL_0f2e: Unknown result type (might be due to invalid IL or missing references) //IL_0f33: Unknown result type (might be due to invalid IL or missing references) //IL_0f8d: Unknown result type (might be due to invalid IL or missing references) //IL_0f97: Unknown result type (might be due to invalid IL or missing references) //IL_0fba: Unknown result type (might be due to invalid IL or missing references) //IL_0fc4: Expected O, but got Unknown //IL_0fd1: Unknown result type (might be due to invalid IL or missing references) ultHitEffect = Instantiate(Load<GameObject>("RoR2/Base/LunarSkillReplacements/LunarNeedleExplosionEffect.prefab"), "UltHitEffect"); ParticleSystemRenderer[] componentsInChildren = ultHitEffect.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val in componentsInChildren) { ((Renderer)val).material = new Material(((Renderer)val).material); ((Renderer)val).material.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)161, (byte)23, (byte)22, byte.MaxValue))); } Utils.RegisterEffect(ultHitEffect, -1f, "Play_sfx_Fiddlesticks_FiddlesticksBasicAttack_OnHit"); skinUltHitEffect = Instantiate(Load<GameObject>("RoR2/DLC1/VoidSurvivor/VoidSurvivorBeamImpactCorrupt.prefab"), "SkinUltHitEffect"); ParticleSystemRenderer[] componentsInChildren2 = skinUltHitEffect.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val2 in componentsInChildren2) { ((Renderer)val2).material = new Material(((Renderer)val2).material); ((Renderer)val2).material.DisableKeyword("VERTEXCOLOR"); ((Renderer)val2).material.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)36, (byte)206, byte.MaxValue))); ((Renderer)val2).material.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampArchWisp.png")); } Utils.RegisterEffect(skinUltHitEffect, -1f, "Play_sfx_FiddleSticksSkin06_FiddleSticksBasicAttack_OnHit"); skinHitEffectSimple = Instantiate(Assets.Load<GameObject>("SkinImpactEffectSimple"), "SkinHitEffectSimple"); Utils.RegisterEffect(skinHitEffectSimple, 0.6f); crowStormEffect = Instantiate(Assets.Load<GameObject>("Crowstorm"), "CrowStormEffect"); Utils.AddScaleComponent(((Component)crowStormEffect.transform.GetChild(0)).gameObject, 0.35f, AnimationCurve.EaseInOut(0f, 0.1f, 1f, 1f)); ChildLocator component = crowStormEffect.GetComponent<ChildLocator>(); Renderer[] componentsInChildren3 = ((Component)component.FindChild("ravens")).GetComponentsInChildren<Renderer>(true); foreach (Renderer val3 in componentsInChildren3) { AnimateShaderAlpha val4 = ((Component)val3).gameObject.AddComponent<AnimateShaderAlpha>(); val4.targetRenderer = val3; val4.timeMax = 5.5f; val4.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val4.alphaCurve.AddKey(0.85f, 1f); } GameObject gameObject = ((Component)component.FindChild("skinclockwise")).gameObject; Utils.AddRotationComponent(gameObject, 325f, (RotationAxis)1); Utils.AddRotationComponent(((Component)component.FindChild("clockwise")).gameObject, 325f, (RotationAxis)1); Utils.AddRotationComponent(((Component)component.FindChild("anticlockwise")).gameObject, -225f, (RotationAxis)1); Renderer[] componentsInChildren4 = gameObject.GetComponentsInChildren<Renderer>(true); foreach (Renderer val5 in componentsInChildren4) { AnimateShaderAlpha val6 = ((Component)val5).gameObject.AddComponent<AnimateShaderAlpha>(); val6.targetRenderer = val5; val6.timeMax = 5.5f; val6.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val6.alphaCurve.AddKey(0.85f, 1f); } Utils.RegisterEffect(crowStormEffect, 5.5f); orbEffect = Instantiate("RoR2/Base/Huntress/HuntressGlaiveOrbEffect.prefab", "OrbEffect"); orbEffect.GetComponent<OrbEffect>().endEffect = null; orbEffect.GetComponentInChildren<EffectComponent>().soundName = ""; ((Component)orbEffect.transform.GetChild(0)).gameObject.SetActive(false); GameObject val7 = Object.Instantiate<GameObject>(Assets.Load<GameObject>("RavenProjectile"), orbEffect.transform.position, Quaternion.identity, orbEffect.transform); ((Component)val7.GetComponent<ChildLocator>().FindChild("base")).gameObject.SetActive(true); ContentAddition.AddEffect(orbEffect); orbEffectSkin = Instantiate(orbEffect, "OrbEffectSkin"); ChildLocator componentInChildren = orbEffectSkin.GetComponentInChildren<ChildLocator>(); ((Component)componentInChildren.FindChild("base")).gameObject.SetActive(false); ((Component)componentInChildren.FindChild("skin")).gameObject.SetActive(true); Utils.AddScaleComponent(((Component)componentInChildren.FindChild("skin")).gameObject, 0.08f); ContentAddition.AddEffect(orbEffectSkin); orbHitEffect = Instantiate("RoR2/DLC1/VoidSurvivor/VoidSurvivorBeamImpactCorrupt.prefab", "OrbHitEffect"); orbHitEffect.GetComponent<EffectComponent>().soundName = "Play_sfx_Fiddlesticks_FiddlesticksQ_OnHit"; Object.Destroy((Object)(object)orbHitEffect.GetComponent<OmniEffect>()); ParticleSystemRenderer[] componentsInChildren5 = orbHitEffect.GetComponentsInChildren<ParticleSystemRenderer>(true); foreach (ParticleSystemRenderer val8 in componentsInChildren5) { ((Component)val8).gameObject.SetActive(true); ((Renderer)val8).material = new Material(((Renderer)val8).material); ((Renderer)val8).material.SetColor("_TintColor", Color.red); } ContentAddition.AddEffect(orbHitEffect); orbHitEffectSkin = Instantiate(Assets.Load<GameObject>("SkinImpactEffect"), "OrbHitEffectSkin"); Utils.RegisterEffect(orbHitEffectSkin, 0.65f, "Play_sfx_FiddlesticksSkin06_FiddlesticksQmissilefear_OnHit"); GameObject val9 = Load<GameObject>("RoR2/Base/UI/HUDSimple.prefab"); Object.DontDestroyOnLoad((Object)(object)val9); HUDTracker hUDTracker = val9.AddComponent<HUDTracker>(); Transform val10 = val9.GetComponent<HUD>().mainUIPanel.transform.Find("SpringCanvas"); if (Object.op_Implicit((Object)(object)val10)) { Transform val11 = val10.Find("BottomRightCluster"); if (Object.op_Implicit((Object)(object)val11)) { Transform val12 = val11.Find("Scaler"); if (Object.op_Implicit((Object)(object)val12)) { Transform val13 = val12.Find("SprintCluster"); if (Object.op_Implicit((Object)(object)val13)) { hUDTracker.sprintCluster = ((Component)val13).gameObject; } Transform val14 = val12.Find("InventoryCluster"); if (Object.op_Implicit((Object)(object)val14)) { hUDTracker.inventoryCluster = ((Component)val14).gameObject; } Transform val15 = val12.Find("Skill1Root"); if (Object.op_Implicit((Object)(object)val15)) { hUDTracker.skillRoot = Object.Instantiate<GameObject>(((Component)val15).gameObject); ((Transform)(RectTransform)hUDTracker.skillRoot.transform).SetParent(val15.parent); hUDTracker.skillRoot.transform.localPosition = new Vector3(-340.0792f, -51.6797f, 0f); hUDTracker.skillRoot.transform.rotation = val15.rotation; hUDTracker.skillRoot.transform.localScale = val15.localScale; hUDTracker.icon = hUDTracker.skillRoot.GetComponent<SkillIcon>(); hUDTracker.mpLocator = hUDTracker.skillRoot.GetComponentInChildren<MPEventSystemLocator>(); ((Behaviour)hUDTracker.skillRoot.GetComponentInChildren<InputBindingDisplayController>()).enabled = false; HGTextMeshProUGUI? obj = Array.Find(hUDTracker.skillRoot.GetComponentsInChildren<HGTextMeshProUGUI>(), (HGTextMeshProUGUI x) => ((Object)x).name == "SkillKeyText"); KeyCode value = MainPlugin.passiveKey.Value; ((TMP_Text)obj).text = ((object)(KeyCode)(ref value)).ToString(); } } } } clawSwingVFX = Instantiate("RoR2/Base/Croco/CrocoSlash.prefab", "ClawSwingVFX"); ParticleSystemRenderer component2 = ((Component)clawSwingVFX.transform.GetChild(0)).GetComponent<ParticleSystemRenderer>(); ((Renderer)component2).material = new Material(Load<Material>("RoR2/Base/Croco/matCrocoSlashDiseased.mat")); ((Renderer)component2).material.SetTexture("_MainTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Lemurian/texLemurianSlash.png")); ((Renderer)component2).material.SetTextureScale("_MainTex", Vector2.one); ((Renderer)component2).material.SetTextureOffset("_MainTex", new Vector2(0.1f, 0f)); ((Renderer)component2).material.SetColor("_TintColor", Color.red); ((Renderer)component2).material.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/DLC1/Common/ColorRamps/texRampVoidFlatCoral.png")); ((Renderer)component2).material.SetFloat("_Boost", 5f); ((Renderer)component2).material.SetFloat("_AlphaBias", 0f); ((Renderer)component2).material.SetFloat("_InvFade", 1f); clawSwingVFXSkin = Instantiate(clawSwingVFX, "clawSwingVFXSkin"); component2 = ((Component)clawSwingVFXSkin.transform.GetChild(0)).GetComponent<ParticleSystemRenderer>(); ((Renderer)component2).material = new Material(((Renderer)component2).material); ((Renderer)component2).material.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)71, (byte)240, byte.MaxValue))); scytheSwingVFX = Instantiate("RoR2/Base/Merc/MercSwordSlash.prefab", "ScytheSwingVFX"); ParticleSystemRenderer component3 = ((Component)scytheSwingVFX.transform.GetChild(0)).GetComponent<ParticleSystemRenderer>(); ((Component)component3).transform.localScale = Vector3.one * 2f; ((Renderer)component3).material = new Material(((Renderer)component3).material); ((Renderer)component3).material.SetTextureScale("_MainTex", new Vector2(1f, 0.7f)); ((Renderer)component3).material.SetColor("_TintColor", Color.red); ((Renderer)component3).material.SetFloat("_Boost", 20f); ((Renderer)component3).material.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texHippoRezRamp.png")); scytheSwingVFXSkin = Instantiate(scytheSwingVFX, "ScytheSwingVFXSkin"); Material val16 = new Material(((Renderer)component3).material); val16.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)118, byte.MaxValue))); Material val17 = new Material(Load<Material>("RoR2/Base/Merc/matMercSwipe2.mat")); val17.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)90, (byte)90, byte.MaxValue))); val17.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/DLC1/Common/ColorRamps/texRampRailgun.png")); Material val18 = new Material(Load<Material>("RoR2/DLC1/VoidSurvivor/matVoidSurvivorMeleeSlash.mat")); val18.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampLunarWardDecal.png")); ParticleSystemRenderer componentInChildren2 = scytheSwingVFXSkin.GetComponentInChildren<ParticleSystemRenderer>(); ((Renderer)componentInChildren2).materials = (Material[])(object)new Material[4] { val16, default(Material), val17, val18 }; Texture2D val19 = Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampGolem.png"); clawHitVFX = Instantiate("RoR2/Base/Common/VFX/OmniImpactVFXSlash.prefab", "ClawHitVFX"); clawHitVFX.GetComponent<EffectComponent>().soundName = "Play_sfx_Fiddlesticks_FiddlesticksBasicAttackMelee_OnHit"; Object.Destroy((Object)(object)clawHitVFX.GetComponent<OmniEffect>()); ParticleSystemRenderer[] componentsInChildren6 = clawHitVFX.GetComponentsInChildren<ParticleSystemRenderer>(true); foreach (ParticleSystemRenderer val20 in componentsInChildren6) { ((Component)val20).gameObject.SetActive(true); ((Renderer)val20).material = new Material(((Renderer)val20).material); ((Renderer)val20).material.SetTexture("_RemapTex", (Texture)(object)val19); } ContentAddition.AddEffect(clawHitVFX); succHitVFX = Instantiate("RoR2/Junk/LunarSkillReplacements/WoundSlashImpact.prefab", "SuccHitVFX"); succHitVFX.GetComponent<EffectComponent>().soundName = ""; ParticleSystemRenderer[] componentsInChildren7 = succHitVFX.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val21 in componentsInChildren7) { ((Renderer)val21).material = new Material(((Renderer)val21).material); ((Renderer)val21).material.SetTexture("_RemapTex", (Texture)(object)val19); } ContentAddition.AddEffect(succHitVFX); succHitVFXSkin = Instantiate("RoR2/Junk/LunarSkillReplacements/WoundSlashImpact.prefab", "SuccHitVFXSkin"); succHitVFXSkin.GetComponent<EffectComponent>().soundName = ""; ContentAddition.AddEffect(succHitVFXSkin); scytheHitVFX = Instantiate("RoR2/Junk/LunarSkillReplacements/WoundSlashImpact.prefab", "SuccHitVFX"); scytheHitVFX.GetComponent<EffectComponent>().soundName = "Play_sfx_Fiddlesticks_FiddlesticksE_hit_slowed"; ParticleSystemRenderer[] componentsInChildren8 = scytheHitVFX.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val22 in componentsInChildren8) { ((Renderer)val22).material = new Material(((Renderer)val22).material); ((Renderer)val22).material.SetTexture("_RemapTex", (Texture)(object)val19); } ContentAddition.AddEffect(scytheHitVFX); scytheHitVFXSkin = Instantiate(scytheHitVFX, "ScytheHitVFXSkin"); scytheHitVFXSkin.GetComponent<EffectComponent>().soundName = "Play_sfx_FiddlesticksSkin06_FiddlesticksE_hit_slowed"; ContentAddition.AddEffect(scytheHitVFXSkin); clawHitVFXSkin = Instantiate(clawHitVFX, "ClawHitVFXSkin"); clawHitVFXSkin.GetComponent<EffectComponent>().soundName = "Play_sfx_FiddlesticksSkin06_FiddlesticksBasicAttackMelee_OnHit"; Object.Destroy((Object)(object)clawHitVFXSkin.GetComponent<OmniEffect>()); ParticleSystemRenderer[] componentsInChildren9 = clawHitVFXSkin.GetComponentsInChildren<ParticleSystemRenderer>(true); foreach (ParticleSystemRenderer val23 in componentsInChildren9) { ((Component)val23).gameObject.SetActive(true); ((Renderer)val23).material = new Material(((Renderer)val23).material); ((Renderer)val23).material.DisableKeyword("VERTEXCOLOR"); ((Renderer)val23).material.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)71, (byte)240, byte.MaxValue))); } ContentAddition.AddEffect(clawHitVFXSkin); tetherVFXPrefab = Instantiate("RoR2/Base/SiphonOnLowHealth/SiphonTetherVFX.prefab", "TetherVFXPrefab"); LineRenderer component4 = tetherVFXPrefab.GetComponent<LineRenderer>(); component4.widthMultiplier = 0.5f; Material val24 = new Material(Load<Material>("RoR2/DLC1/VoidSurvivor/matVoidBlinkTrailCorrupted.mat")); val24.SetColor("_TintColor", Color.red); val24.SetTexture("_Cloud2Tex", (Texture)(object)Load<Texture2D>("RoR2/DLC1/VoidJailer/texVoidJailerTentacleMask2.png")); Material val25 = new Material(Load<Material>("RoR2/DLC1/RandomEquipmentTrigger/matBottledChaosTrail.mat")); val25.SetColor("_TintColor", Color.red); val25.SetTexture("_Cloud2Tex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/texCloudLightning1.png")); val25.SetVector("_CutoffScroll", new Vector4(64f, 0f, 64f, 0f)); ((Renderer)component4).materials = (Material[])(object)new Material[2] { val24, val25 }; tetherVFXPrefabSkin = Instantiate(tetherVFXPrefab, "TetherVFXPrefabSkin"); LineRenderer component5 = tetherVFXPrefabSkin.GetComponent<LineRenderer>(); component5.textureMode = (LineTextureMode)0; component5.startColor = Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, (byte)0, byte.MaxValue)); component5.endColor = Color32.op_Implicit(new Color32((byte)122, (byte)0, byte.MaxValue, byte.MaxValue)); ((Renderer)component5).materials = (Material[])(object)new Material[2] { Assets.Load<Material>("ribbonMat1"), Assets.Load<Material>("ribbonMat2") }; siphonAttachmentPrefab = Instantiate("RoR2/Base/SiphonOnLowHealth/SiphonNearbyBodyAttachment.prefab", "SiphonAttachmentPrefab", registerNetwork: true); GameObject activeVfx = Object.Instantiate<GameObject>(Assets.Load<GameObject>("HealEffect"), siphonAttachmentPrefab.transform.position, Quaternion.identity, siphonAttachmentPrefab.transform); siphonAttachmentPrefab.GetComponent<TetherVfxOrigin>().tetherPrefab = tetherVFXPrefab; siphonAttachmentPrefab.AddComponent<SuccTether>().activeVfx = activeVfx; areaIndicator = Instantiate("RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab", "PassiveAreaIndicator"); areaIndicator.transform.localScale = Vector3.one * 12f; MeshRenderer componentInChildren3 = areaIndicator.GetComponentInChildren<MeshRenderer>(); ((Renderer)componentInChildren3).material = new Material(Load<Material>("RoR2/DLC1/VoidMegaCrab/matVoidCrabAntiMatterAreaIndicator.mat")); ((Renderer)componentInChildren3).material.SetColor("_TintColor", Color.red); ((Renderer)componentInChildren3).material.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampGalaxy.png")); ((Renderer)componentInChildren3).material.SetTexture("_Cloud2Tex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/texCloudCaustic3.jpg")); } } 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<HurtBox>)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 { private FiddleBehaviour behaviour; private VObehaviour voBehaviour; private float stopwatch; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); voBehaviour = ((EntityState)this).GetComponent<VObehaviour>(); behaviour = ((EntityState)this).GetComponent<FiddleBehaviour>(); } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch >= 3f && ((BaseCharacterMain)this).modelAnimator.GetBool("isMoving")) { stopwatch = 0f; voBehaviour.PlayVO(7); } } public override void ProcessJump() { ((GenericCharacterMain)this).ProcessJump(); if (behaviour.inUlt && base.jumpInputReceived) { ((EntityState)this).PlayAnimation("Body", "Ult_Run"); } } } internal class DeathState : GenericCharacterDeath { public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); ((EntityState)this).GetComponent<VObehaviour>().PlayVO(1); } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (NetworkServer.active) { base.fallingStopwatch = 0f; base.restStopwatch = 0f; if (((EntityState)this).fixedAge >= 2f) { ((GenericCharacterDeath)this).DestroyBodyAsapServer(); } } } } 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; private GameObject swingEffectInstance; public virtual float baseAttackDuration => 0f; public virtual float earlyExitDurationPercentage => 0f; public virtual float damageCoefficient => 0f; public virtual float forceMagnitude => 440f; public virtual float rootMotionSpeed => 12f; 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 uint swingSound => 0u; public virtual DamageType damageType => DamageTypeCombo.op_Implicit(DamageTypeCombo.GenericPrimary); public virtual DamageColorIndex damageColor => (DamageColorIndex)0; public virtual Vector3 bonusForce => Vector3.zero; public virtual GameObject hitEffectPrefab => null; 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) //IL_00be: 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 = DamageTypeCombo.op_Implicit(damageType); hasAnimParameter = !Utility.IsNullOrWhiteSpace(animParameter); if (hasAnimParameter && !Utility.IsNullOrWhiteSpace(animationStateName)) { ((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_010c: 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_0115: 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_0134: 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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_017b: 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_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { bool flag = FireMeleeAttack(overlapAttack, animator, hitBoxActiveParameter, forceMagnitude, bonusForce); hasHit = flag; if (hasHit) { if (hopOnHit && !((EntityState)this).characterMotor.isGrounded && !hopped) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity); hopped = true; } if (!rootMotionWhileHitting && !isInHitPause && hasAnimParameter) { hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, animParameter); isInHitPause = true; } } if (animator.GetFloat(hitBoxActiveParameter) > 0.1f && rootMotion && !hasHit) { Vector3 val = rootMotionDirection(); Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(val.x, 0f, val.z); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += val2 * rootMotionSpeed * Time.fixedDeltaTime; } if (hitPauseTimer >= hitPauseDuration && isInHitPause) { ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); isInHitPause = false; animator.speed = 1f; } if (!isInHitPause) { stopwatch += Time.fixedDeltaTime; } else { hitPauseTimer += Time.fixedDeltaTime; ((EntityState)this).characterMotor.velocity = Vector3.zero; animator.speed = 0f; } if (stopwatch >= attackDuration * earlyExitDurationPercentage) { if (((EntityState)this).inputBank.skill1.down) { SetState(); } if (stopwatch >= attackDuration) { BaseSkillState val3 = StateOverride(); if (val3 != null) { ((EntityState)this).outer.SetNextState((EntityState)(object)val3); } 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)) { Transform val4 = ((BaseState)this).FindModelChild(swingMuzzle); swingEffectInstance = Object.Instantiate<GameObject>(swingEffectPrefab, val4.position, val4.rotation, val4); ScaleParticleSystemDuration component = swingEffectInstance.GetComponent<ScaleParticleSystemDuration>(); if (Object.op_Implicit((Object)(object)component)) { component._newDuration = attackDuration; } } } public override void OnExit() { if (Object.op_Implicit((Object)(object)swingEffectInstance)) { EntityState.Destroy((Object)(object)swingEffectInstance); } ((EntityState)this).OnExit(); } public bool FireMeleeAttack(OverlapAttack attack, Animator animator, string mecanimHitboxActiveParameter, float forceMagnitude, Vector3 bonusForce) { //IL_0050: 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_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_0043: 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((List<HurtBox>)null); } 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 Passive : BaseSkillState { private GameObject areaIndicator; private Vector3 pos; public override void OnEnter() { //IL_0032: 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) ((BaseState)this).OnEnter(); areaIndicator = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab); areaIndicator.transform.localScale = new Vector3(1.2f, 5f, 1.2f); if (!((EntityState)this).isAuthority) { areaIndicator.SetActive(false); return; } GameObject val = Object.Instantiate<GameObject>(Prefabs.areaIndicator, areaIndicator.transform.position, Quaternion.identity); val.transform.parent = areaIndicator.transform; } public override void Update() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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) ((EntityState)this).Update(); RaycastHit val = default(RaycastHit); if (Object.op_Implicit((Object)(object)areaIndicator) && Physics.Raycast(((BaseState)this).GetAimRay(), ref val, 9999f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { areaIndicator.transform.position = ((RaycastHit)(ref val)).point; pos = ((RaycastHit)(ref val)).point; } } public override void FixedUpdate() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !Input.GetKey(MainPlugin.passiveKey.Value)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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) ((EntityState)this).GetComponent<VObehaviour>().PlayVO(6); if (pos != Vector3.zero) { GameObject val = Object.Instantiate<GameObject>(Prefabs.dummy, pos, Quaternion.LookRotation(((EntityState)this).characterDirection.forward)); val.GetComponent<Animator>().SetBool("dummy", true); val.GetComponent<DecoyBehaviour>().ownerBody = ((EntityState)this).characterBody; } if (Object.op_Implicit((Object)(object)areaIndicator)) { EntityState.Destroy((Object)(object)areaIndicator); } ((EntityState)this).OnExit(); } } internal class Primary : MeleeSkillState { public int attackIndex = 1; public override float baseAttackDuration => (attackIndex == 3) ? 0.85f : 0.55f; public override float earlyExitDurationPercentage => 0.85f; public override string layerName => "FullBody, Override"; public override string animationStateName => "Attack" + attackIndex; public override string hitBoxGroupName => (attackIndex == 3) ? "SlashBig" : "Slash"; public override float forceMagnitude => 250f; public override string swingMuzzle => animationStateName + "Muzzle"; public override float damageCoefficient => (attackIndex == 3) ? 3.75f : 2.6f; public override uint swingSound { get { if (((EntityState)this).characterBody.skinIndex == 0) { return (attackIndex == 3) ? 2939542187u : 1336317742u; } return (attackIndex == 3) ? 1710545294u : 1162920259u; } } public override float baseHopVelocity => 6f; public override bool rootMotion => true; public override GameObject hitEffectPrefab { get { if (((EntityState)this).characterBody.skinIndex == 0) { return (attackIndex == 3) ? Prefabs.scytheHitVFX : Prefabs.clawHitVFX; } return (attackIndex == 3) ? Prefabs.scytheHitVFXSkin : Prefabs.clawHitVFXSkin; } } public override GameObject swingEffectPrefab { get { if (((EntityState)this).characterBody.skinIndex == 0) { return (attackIndex == 3) ? Prefabs.scytheSwingVFX : Prefabs.clawSwingVFX; } return (attackIndex == 3) ? Prefabs.scytheSwingVFXSkin : Prefabs.clawSwingVFXSkin; } } public override DamageType damageType => (DamageType)0; 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() { base.OnEnter(); ((EntityState)this).GetComponent<VObehaviour>().PlayVO(0); } public override void SetState() { if (attackIndex != 3) { Primary primary = new Primary(); primary.attackIndex = attackIndex + 1; ((EntityState)this).outer.SetNextState((EntityState)(object)primary); } } public override void OnExit() { 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)1; } } internal class Secondary : BaseSkillState { private float duration = 2f; private NetworkedBodyAttachment attachment; private Animator animator; private uint ID; private bool skin; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); animator.SetBool("skillOver", false); animator.SetBool("inCombat", true); ((EntityState)this).PlayAnimation("FullBody, Override", "Succ"); if (NetworkServer.active) { attachment = Object.Instantiate<GameObject>(Prefabs.siphonAttachmentPrefab).GetComponent<NetworkedBodyAttachment>(); attachment.AttachToGameObjectAndSpawn(((EntityState)this).gameObject, (string)null); } skin = ((EntityState)this).characterBody.skinIndex == 1; AkSoundEngine.PostEvent(skin ? 2231533992u : 1864580443u, ((EntityState)this).gameObject); ID = AkSoundEngine.PostEvent(skin ? 75752765u : 3692113436u, ((EntityState)this).gameObject); ((EntityState)this).GetComponent<VObehaviour>().PlayVO(2); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.outOfCombat = false; if ((((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) || (!((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.5f)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new SecondaryEnd()); } } public override void OnExit() { AkSoundEngine.PostEvent(skin ? 364148197u : 2530302772u, ((EntityState)this).gameObject); AkSoundEngine.StopPlayingID(ID); animator.SetBool("skillOver", true); animator.SetBool("inCombat", false); if (Object.op_Implicit((Object)(object)attachment)) { EntityState.Destroy((Object)(object)((Component)attachment).gameObject); } ((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)7; } } public class SecondaryEnd : BaseSkillState { public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= 0.35f) { ((EntityState)this).outer.SetNextStateToMain(); } } public overri