Decompiled source of HAND OVERCLOCKED v1.4.15
plugins/HAND_Overclocked/HAND_Overclocked.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AncientScepter; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EmotesAPI; using EntityStates; using EntityStates.HAND_Overclocked; using EntityStates.HAND_Overclocked.BrokenJanitor; using EntityStates.HAND_Overclocked.Emotes; using EntityStates.HAND_Overclocked.Primary; using EntityStates.HAND_Overclocked.Secondary; using EntityStates.HAND_Overclocked.Special; using EntityStates.HAND_Overclocked.Utility; using EntityStates.Toolbot; using HANDMod; using HANDMod.Content; using HANDMod.Content.HANDSurvivor; using HANDMod.Content.HANDSurvivor.CharacterUnlock; using HANDMod.Content.HANDSurvivor.Components; using HANDMod.Content.HANDSurvivor.Components.Body; using HANDMod.Content.HANDSurvivor.Components.DroneProjectile; using HANDMod.Content.HANDSurvivor.Components.Master; using HANDMod.Content.RMORSurvivor; using HANDMod.Content.RMORSurvivor.Components.Body; using HANDMod.Content.Shared; using HANDMod.Content.Shared.Components.Body; using HANDMod.Modules; using HANDMod.Modules.Achievements; using HANDMod.Modules.Characters; using HANDMod.Modules.Survivors; using HANDMod.SkillStates.BaseStates; using HG; using HG.BlendableTypes; using Inferno; using NS_KingKombatArena; using On.RoR2; using R2API; using R2API.Utils; using Rewired.ComponentControls.Effects; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Hologram; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using TILER2; using TMPro; using ThinkInvisible.ClassicItems; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using Zio.FileSystems; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyCompany("HAND_Overclocked")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: CompilationRelaxations(8)] [assembly: AssemblyTitle("HAND_Overclocked")] [assembly: AssemblyInformationalVersion("1.0.0+9fc1e44404f21c546b36d80772096e8a0556e856")] [assembly: AssemblyProduct("HAND_Overclocked")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] public class FuckinMaterialComponent : MonoBehaviour { private Renderer[] rends; public float strenght; public float exponent; private float lastValues; private MaterialPropertyBlock matblock; private void Awake() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown matblock = new MaterialPropertyBlock(); rends = ((Component)this).GetComponentsInChildren<Renderer>(); } public void SetSpecular(float strenght_, float exponent_) { strenght = strenght_; exponent = exponent_; lastValues = strenght + exponent; } private void Update() { if (lastValues != strenght + exponent) { for (int i = 0; i < rends.Length; i++) { Renderer val = rends[i]; val.GetPropertyBlock(matblock); matblock.SetFloat("_SpecularStrength", strenght); matblock.SetFloat("_SpecularExponent", exponent); val.SetPropertyBlock(matblock); } lastValues = strenght + exponent; } } } namespace EntityStates.RMOR.Primary { public class ChargeCannon : BaseState { public static float baseDuration = 1.5f; public static string partialChargeSoundString = "Play_engi_M1_chargeStock"; public static string fullChargeSoundString = "Play_HOC_StartPunch"; public static GameObject partialChargeEffect; public static GameObject fullChargeEffect; public static int maxChargeLevel = 3; private float duration; public int chargeLevel; public override void OnEnter() { ((BaseState)this).OnEnter(); chargeLevel = 0; duration = baseDuration / base.attackSpeedStat; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (chargeLevel < maxChargeLevel && ((EntityState)this).fixedAge >= (float)(chargeLevel + 1) * duration / (float)maxChargeLevel) { chargeLevel++; string text = partialChargeSoundString; GameObject val = partialChargeEffect; if (chargeLevel >= maxChargeLevel) { text = fullChargeSoundString; val = fullChargeEffect; } Util.PlaySound(text, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(val, ((EntityState)this).gameObject, "HandL", false); EffectManager.SimpleMuzzleFlash(val, ((EntityState)this).gameObject, "HandR", false); } if (((EntityState)this).isAuthority && (!Object.op_Implicit((Object)(object)((EntityState)this).inputBank) || !((EntityState)this).inputBank.skill1.down)) { if (chargeLevel > 0) { SetNextState(); } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } public virtual void SetNextState() { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireCannon { chargeLevel = chargeLevel }); } } public class FireCannon : BaseState { public static string attackSoundString; public static GameObject projectilePrefab; public static float baseExitDuration = 0.6f; public static float baseDurationBetweenShots = 0.2f; public static float damageCoefficient = 4.2f; public static float force = 2000f; public static GameObject muzzleflashEffectPrefab; public int chargeLevel; private bool crit; private float totalDuration; private float durationBetweenShots; private float fireStopwatch; private int shotsRemaining; public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } public override void OnEnter() { ((BaseState)this).OnEnter(); shotsRemaining = chargeLevel; crit = ((BaseState)this).RollCrit(); fireStopwatch = 0f; durationBetweenShots = baseDurationBetweenShots / base.attackSpeedStat; totalDuration = baseExitDuration / base.attackSpeedStat + durationBetweenShots * (float)shotsRemaining; if (shotsRemaining > 0) { FireProjectile(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (shotsRemaining > 0) { fireStopwatch += Time.fixedDeltaTime; if (fireStopwatch >= durationBetweenShots) { FireProjectile(); fireStopwatch -= durationBetweenShots; } } else if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge > totalDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void FireProjectile() { //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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) shotsRemaining--; Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, "HandL", false); EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, "HandR", false); Ray aimRay = ((BaseState)this).GetAimRay(); if (((EntityState)this).isAuthority) { ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, force, crit, (DamageColorIndex)0, (GameObject)null, -1f); } } } } namespace EntityStates.HAND_Overclocked { public class HANDMainState : GenericCharacterMain { public LocalUser localUser; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); FindLocalUser(); } private void FindLocalUser() { if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { return; } foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody) { localUser = readOnlyLocalUsers; break; } } } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); FindLocalUser(); if (((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded && localUser != null && !localUser.isUIFocused) { if (Config.GetKeyPressed(Config.KeybindEmote1)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Sit(), (InterruptPriority)0); } else if (Config.GetKeyPressed(Config.KeybindEmote2)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Spin(), (InterruptPriority)0); } else if (Config.GetKeyPressed(Config.KeybindEmoteCSS)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new MenuPose(), (InterruptPriority)0); } } } } } namespace EntityStates.HAND_Overclocked.Utility { public class BeginFocus : BeginOverclock { public static Texture2D texGaugeNemesis; public static Texture2D texGaugeArrowNemesis; public new static Material overlayMaterial; public override void LoadStats() { cancelDef = HANDMod.Content.Shared.SkillDefs.UtilityOverclockCancel; buffDef = HANDMod.Content.Shared.Buffs.NemesisFocus; gaugeInternal = texGaugeNemesis; gaugeArrowInternal = texGaugeArrowNemesis; internalOverlayMaterial = overlayMaterial; } } public class BeginOverclock : BaseState { private float lastFUpdateTime; public float buffDuration = 4f; public BuffDef buffDef; public string startSoundString = "Play_MULT_shift_start"; public string endSoundString = "Play_MULT_shift_end"; public SkillDef cancelDef; private Animator modelAnimator; private float stopwatch = 0f; private float jetFireTime; private float jetStopwatch; private float timerSinceComplete = 0f; private bool beginExit; private int startStocks = 0; private Transform leftJet; private Transform rightJet; private TemporaryOverlayInstance tempOverlay; private CharacterModel characterModel; public static GameObject jetEffectPrefab; public static float baseExitDuration = 0.3f; public static float shortHopVelocity = 12f; public static float jetFireFrequency = 6f; public Material internalOverlayMaterial; public static Material overlayMaterial; public OverclockController overclockController; private GenericSkill skillSlot; public Texture2D gaugeInternal; public Texture2D gaugeArrowInternal; public static Texture2D texGauge; public static Texture2D texGaugeArrow; public static event Action<BeginOverclock> onAuthorityFixedUpdateGlobal; public override void OnEnter() { //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0238: 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_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0264: 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_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); lastFUpdateTime = Time.time; LoadStats(); modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetFloat("KeyCrank", 1f); } overclockController = ((EntityState)this).gameObject.GetComponent<OverclockController>(); if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded && shortHopVelocity > 0f) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, shortHopVelocity); } if (Object.op_Implicit((Object)(object)overclockController)) { overclockController.StartOverclock(gaugeInternal, gaugeArrowInternal); } } if (NetworkServer.active) { BuffDef val = buffDef; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && !((EntityState)this).characterBody.HasBuff(val)) { ((EntityState)this).characterBody.AddBuff(val); } } Util.PlaySound(startSoundString, ((EntityState)this).gameObject); skillSlot = (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) ? ((EntityState)this).skillLocator.utility : null); if (Object.op_Implicit((Object)(object)skillSlot)) { startStocks = skillSlot.stock; skillSlot.SetSkillOverride((object)this, cancelDef, (SkillOverridePriority)4); skillSlot.stock = Mathf.Min(skillSlot.maxStock, startStocks + 1); } jetFireTime = 1f / jetFireFrequency; jetStopwatch = 0f; ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { leftJet = modelChildLocator.FindChild("Jetpack.L"); rightJet = modelChildLocator.FindChild("Jetpack.R"); GameObject val2 = Object.Instantiate<GameObject>(jetEffectPrefab, leftJet); Transform transform = val2.transform; transform.localRotation *= Quaternion.Euler(0f, -60f, 0f); Transform transform2 = val2.transform; transform2.localPosition += new Vector3(0f, 0.6f, 0f); GameObject val3 = Object.Instantiate<GameObject>(jetEffectPrefab, rightJet); Transform transform3 = val3.transform; transform3.localRotation *= Quaternion.Euler(0f, 60f, 0f); Transform transform4 = val3.transform; transform4.localPosition += new Vector3(0f, 0.6f, 0f); } if (Object.op_Implicit((Object)(object)internalOverlayMaterial) && Object.op_Implicit((Object)(object)((EntityState)this).modelLocator) && Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelTransform) && Object.op_Implicit((Object)(object)((Component)((EntityState)this).modelLocator.modelTransform).gameObject)) { characterModel = ((Component)((EntityState)this).modelLocator.modelTransform).gameObject.GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)characterModel)) { tempOverlay = TemporaryOverlayManager.AddOverlay(((Component)characterModel).gameObject); tempOverlay.duration = float.PositiveInfinity; tempOverlay.animateShaderAlpha = true; tempOverlay.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); tempOverlay.destroyComponentOnEnd = true; tempOverlay.originalMaterial = internalOverlayMaterial; tempOverlay.AddToCharacterModel(characterModel); tempOverlay.Start(); } } } public virtual void LoadStats() { cancelDef = HANDMod.Content.Shared.SkillDefs.UtilityOverclockCancel; buffDef = HANDMod.Content.Shared.Buffs.Overclock; gaugeInternal = texGauge; gaugeArrowInternal = texGaugeArrow; internalOverlayMaterial = overlayMaterial; } public virtual float ExtendBuff(float stopwatch, float extensionTime) { return Mathf.Max(0f, stopwatch - extensionTime); } public override void OnExit() { if (Object.op_Implicit((Object)(object)skillSlot)) { skillSlot.UnsetSkillOverride((object)this, cancelDef, (SkillOverridePriority)4); skillSlot.stock = startStocks; } if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && ((EntityState)this).characterBody.HasBuff(buffDef)) { ((EntityState)this).characterBody.RemoveBuff(buffDef); } if (tempOverlay != null) { tempOverlay.RemoveFromCharacterModel(); tempOverlay.Destroy(); tempOverlay = null; } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)overclockController)) { overclockController.EndOverclock(); } Util.PlaySound(endSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetFloat("KeyCrank", 0f); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); float num = Time.time - lastFUpdateTime; lastFUpdateTime = Time.time; jetStopwatch += num; if (jetStopwatch >= jetFireTime) { jetStopwatch -= jetFireTime; GameObject val = Object.Instantiate<GameObject>(jetEffectPrefab, leftJet); Transform transform = val.transform; transform.localRotation *= Quaternion.Euler(0f, -60f, 0f); Transform transform2 = val.transform; transform2.localPosition += new Vector3(0f, 0.6f, 0f); GameObject val2 = Object.Instantiate<GameObject>(jetEffectPrefab, rightJet); Transform transform3 = val2.transform; transform3.localRotation *= Quaternion.Euler(0f, 60f, 0f); Transform transform4 = val2.transform; transform4.localPosition += new Vector3(0f, 0.6f, 0f); } if (!((EntityState)this).isAuthority) { return; } stopwatch += num; if (Object.op_Implicit((Object)(object)overclockController)) { stopwatch = ExtendBuff(stopwatch, overclockController.ConsumeExtensionTime()); overclockController.buffPercent = Mathf.Max(0f, buffDuration - stopwatch) / buffDuration; } if (BeginOverclock.onAuthorityFixedUpdateGlobal != null) { BeginOverclock.onAuthorityFixedUpdateGlobal(this); } if (!Object.op_Implicit((Object)(object)skillSlot) || skillSlot.stock == 0 || stopwatch >= buffDuration) { beginExit = true; } if (beginExit) { timerSinceComplete += num; if (timerSinceComplete > baseExitDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class CancelOverclock : BaseState { public static float shortHopVelocity = 24f; public static GameObject jetEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoDashJets.prefab").WaitForCompletion(); protected OverclockController overclockController; public override void OnEnter() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound("Play_commando_shift", ((EntityState)this).gameObject); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { Transform val = modelChildLocator.FindChild("Jetpack.L"); Transform val2 = modelChildLocator.FindChild("Jetpack.R"); GameObject val3 = Object.Instantiate<GameObject>(jetEffectPrefab, val); Transform transform = val3.transform; transform.localRotation *= Quaternion.Euler(-60f, -90f, -60f); Transform transform2 = val3.transform; transform2.localPosition += new Vector3(0f, 0.6f, 0f); GameObject val4 = Object.Instantiate<GameObject>(jetEffectPrefab, val2); Transform transform3 = val4.transform; transform3.localRotation *= Quaternion.Euler(-60f, 90f, -60f); Transform transform4 = val4.transform; transform4.localPosition += new Vector3(0f, 0.6f, 0f); } if (((EntityState)this).isAuthority) { if ((Object)(object)((EntityState)this).characterMotor != (Object)null) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, shortHopVelocity); } ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } } namespace EntityStates.HAND_Overclocked.Special { public class FireSeekingDrone : BaseState { private bool hasFired; public static float damageCoefficient = 2.7f; public static GameObject projectilePrefab; public static string muzzleString; public static GameObject muzzleflashEffectPrefab; public static float baseDuration = 0.25f; public static float force = 250f; private float duration; protected bool isCrit; private HurtBox initialOrbTarget = null; private HANDTargetingController targetingController; public override void OnEnter() { ((BaseState)this).OnEnter(); hasFired = false; Transform modelTransform = ((EntityState)this).GetModelTransform(); targetingController = ((EntityState)this).GetComponent<HANDTargetingController>(); Util.PlaySound("Play_HOC_Drone", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)targetingController)) { initialOrbTarget = targetingController.GetTrackingTarget(); } duration = baseDuration; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(duration + 1f); } isCrit = ((BaseState)this).RollCrit(); } public override void OnExit() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!hasFired && ((EntityState)this).isAuthority) { FireProjectile(initialOrbTarget, ((EntityState)this).inputBank.aimOrigin); } ((EntityState)this).OnExit(); } private void FireProjectile(HurtBox target, Vector3 position) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_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_0020: 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_0028: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) hasFired = true; FireProjectileInfo val = default(FireProjectileInfo); val.position = position; Ray aimRay = ((BaseState)this).GetAimRay(); val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.crit = ((BaseState)this).RollCrit(); val.damage = base.damageStat * damageCoefficient; val.damageColorIndex = (DamageColorIndex)0; val.owner = ((EntityState)this).gameObject; val.force = force; val.projectilePrefab = GetProjectile(); if (Object.op_Implicit((Object)(object)target)) { val.target = ((Component)target).gameObject; } ProjectileManager.instance.FireProjectile(val); } public override void FixedUpdate() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!hasFired && ((EntityState)this).isAuthority) { FireProjectile(initialOrbTarget, ((EntityState)this).inputBank.aimOrigin); } if (((EntityState)this).fixedAge > duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } protected virtual GameObject GetProjectile() { return projectilePrefab; } } public class FireSpeedDrone : FireSeekingDrone { public static GameObject speedDroneProjectile; protected override GameObject GetProjectile() { return speedDroneProjectile; } } } namespace EntityStates.HAND_Overclocked.Secondary { public class ChargeSlam : BaseState { private float lastUpdateTime; public static float baseMinDuration = 0.5f; public static float baseChargeDuration = 1.5f; private float minDuration; private float chargeDuration; private float charge; public float chargePercent; private Animator modelAnimator; public static GameObject chargeEffectPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/effects/omnieffect/OmniImpactVFXLoader"); private bool startedChargeAnim = false; private HammerVisibilityController hammerController; public static GameObject holdChargeVfxPrefab = ChargeSpear.holdChargeVfxPrefab; private GameObject holdChargeVfxGameObject = null; public override void OnEnter() { lastUpdateTime = Time.time; ((BaseState)this).OnEnter(); Util.PlaySound("Play_HOC_StartHammer", ((EntityState)this).gameObject); minDuration = baseMinDuration / base.attackSpeedStat; modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { ((EntityState)this).PlayAnimation("Gesture, Override", "PrepHammer", "ChargeHammer.playbackRate", minDuration, 0f); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(3f); } charge = 0f; chargePercent = 0f; chargeDuration = baseChargeDuration / base.attackSpeedStat; hammerController = ((EntityState)this).GetComponent<HammerVisibilityController>(); if (Object.op_Implicit((Object)(object)hammerController)) { hammerController.SetHammerEnabled(enabled: true); } OverclockController component = ((EntityState)this).GetComponent<OverclockController>(); bool flag = Object.op_Implicit((Object)(object)component) && component.BuffActive(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && !flag) { ((EntityState)this).characterBody.isSprinting = false; } } public override void OnExit() { if (Object.op_Implicit((Object)(object)holdChargeVfxGameObject)) { EntityState.Destroy((Object)(object)holdChargeVfxGameObject); holdChargeVfxGameObject = null; } if (!((EntityState)this).outer.destroying) { ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); } if (Object.op_Implicit((Object)(object)hammerController)) { hammerController.SetHammerEnabled(enabled: false); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Expected O, but got Unknown ((EntityState)this).FixedUpdate(); float num = Time.time - lastUpdateTime; lastUpdateTime = Time.time; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(3f); } if (((EntityState)this).fixedAge > minDuration && charge < chargeDuration) { if (!startedChargeAnim) { startedChargeAnim = true; ((EntityState)this).PlayCrossfade("Gesture, Override", "ChargeHammer", "ChargeHammer.playbackRate", chargeDuration, 0.2f); } charge += num * base.attackSpeedStat; if (charge >= chargeDuration) { ((EntityState)this).PlayCrossfade("Gesture, Override", "ChargeHammerHold", "ChargeHammer.playbackRate", 0.6f, 0.05f); Util.PlaySound("Play_HOC_StartPunch", ((EntityState)this).gameObject); charge = chargeDuration; EffectManager.SpawnEffect(chargeEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position }, false); } chargePercent = Mathf.Max(0f, (charge - baseMinDuration) / (baseChargeDuration - baseMinDuration)); } if (((EntityState)this).fixedAge >= minDuration && ((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && !((EntityState)this).inputBank.skill2.down) { SetNextState(); } } public virtual void SetNextState() { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireSlam { chargePercent = chargePercent }); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class ChargeSlamScepter : ChargeSlam { public override void SetNextState() { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireSlamScepter { chargePercent = chargePercent }); } } public class FireSlam : BaseMeleeAttack { public static GameObject swingEffect = null; public float chargePercent = 0f; public static float minDamageCoefficient = 6f; public static float maxDamageCoefficient = 15f; public static float minDownForce = 2400f; public static float maxDownForce = 3200f; public static float baseYPos = -14f; public static float baseYScale = 30f; public static float maxYScale = 60f; public static float baseZPos = 4.5f; public static float baseZScale = 30f; public static float maxZScale = 40f; public static float shortHop = 12f; public static float shortHopOnHit = 24f; public static NetworkSoundEventDef networkHitSound; public static GameObject earthquakeEffectPrefab; public static GameObject hitEffect = null; private HammerVisibilityController hammerController; private bool hitEnemy = false; public override void OnEnter() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) attackRecoil = 0f; swingEffectPrefab = null; hitEffectPrefab = null; if (Object.op_Implicit((Object)(object)networkHitSound)) { impactSound = networkHitSound.index; } damageType = (DamageType)32; hitHopVelocity = shortHopOnHit; hitStopDuration = 0.1f; hitSoundString = ""; swingSoundString = ""; hitboxName = "ChargeHammerHitbox"; damageCoefficient = Mathf.Lerp(minDamageCoefficient, maxDamageCoefficient, chargePercent); procCoefficient = 1f; baseDuration = 0.7f; baseEarlyExitTime = 0.2f; attackStartTime = 0.33f; attackEndTime = 0.5f; pushForce = 0f; bonusForce = Vector3.down * Mathf.Lerp(minDownForce, maxDownForce, chargePercent); muzzleString = "SwingCenter"; ModifyStats(); hammerController = ((EntityState)this).GetComponent<HammerVisibilityController>(); if (Object.op_Implicit((Object)(object)hammerController)) { hammerController.SetHammerEnabled(enabled: true); } if (((EntityState)this).isAuthority) { ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { Transform val = modelChildLocator.FindChild("ChargeHammerHitbox"); if (Object.op_Implicit((Object)(object)val)) { float num = Mathf.Lerp(baseYScale, maxYScale, chargePercent); float num2 = baseYPos - (num - baseYScale) * 0.5f; float num3 = Mathf.Lerp(baseZScale, maxZScale, chargePercent); float num4 = baseZPos - (num3 - baseZScale) * 0.5f; val.localScale = new Vector3(val.localScale.x, num, num3); val.localPosition = new Vector3(val.localPosition.x, num2, num4); } } } base.OnEnter(); if (attack != null) { ModifyDamageTypes(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && ((EntityState)this).characterBody.HasBuff(HANDMod.Content.Shared.Buffs.NemesisFocus)) { attack.damageColorIndex = (DamageColorIndex)12; } } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(3f); } } public virtual void ModifyStats() { } public virtual void ModifyDamageTypes() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) DamageAPI.AddModdedDamageType(attack, DamageTypes.HANDSecondary); DamageAPI.AddModdedDamageType(attack, DamageTypes.SquashOnKill); DamageAPI.AddModdedDamageType(attack, DamageTypes.ResetVictimForce); } protected override void PlayAttackAnimation() { ((EntityState)this).PlayAnimation("FullBody, Override", "FireHammer", "ChargeHammer.playbackRate", duration, 0f); } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); if (hitEnemy) { return; } hitEnemy = true; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { OverclockController component = ((EntityState)this).gameObject.GetComponent<OverclockController>(); if (Object.op_Implicit((Object)(object)component)) { component.ExtendOverclock(Mathf.Lerp(0.8f, 2f, chargePercent)); } DroneStockController component2 = ((EntityState)this).GetComponent<DroneStockController>(); if (Object.op_Implicit((Object)(object)component2)) { component2.MeleeHit(); } } } public override void OnFiredAttack() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: 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_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Expected O, but got Unknown //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound("Play_parent_attack1_slam", ((EntityState)this).gameObject); Util.PlaySound("Play_UI_podImpact", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && ((EntityState)this).characterBody.HasBuff(HANDMod.Content.Shared.Buffs.NemesisFocus)) { Util.PlaySound("Play_HOC_Focus", ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; direction.y = 0f; ((Vector3)(ref direction)).Normalize(); EffectManager.SpawnEffect(earthquakeEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position + 4f * direction - 2f * Vector3.up, scale = 0.5f }, true); EffectManager.SpawnEffect(earthquakeEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position + 8f * direction - 2f * Vector3.up, scale = 0.5f }, true); if (chargePercent >= 0.5f) { EffectManager.SpawnEffect(earthquakeEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position + 12f * direction - 2f * Vector3.up, scale = 0.5f }, true); } if (chargePercent >= 1f) { EffectManager.SpawnEffect(earthquakeEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position + 16f * direction - 2f * Vector3.up, scale = 0.5f }, true); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, shortHop); } if (Config.screenshakeScale > 0f) { ShakeEmitter val = ShakeEmitter.CreateSimpleShakeEmitter(((EntityState)this).transform.position, new Wave { amplitude = 10f * Config.screenshakeScale, cycleOffset = 0f, frequency = 5f }, 0.75f, 30f, true); ((Component)val).transform.parent = ((EntityState)this).transform; } } } public override void OnExit() { if (Object.op_Implicit((Object)(object)hammerController)) { hammerController.SetHammerEnabled(enabled: false); } if (!((EntityState)this).outer.destroying) { ((EntityState)this).PlayAnimation("FullBody, Override", "Empty"); } base.OnExit(); } protected override void SetNextState() { ((EntityState)this).outer.SetNextStateToMain(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (hasFired && ((EntityState)this).fixedAge >= duration - earlyExitTime) { return (InterruptPriority)0; } return (InterruptPriority)2; } } public class FireSlamScepter : FireSlam { public override void ModifyStats() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) bonusForce *= 1.5f; damageCoefficient *= 1.5f; } public override void ModifyDamageTypes() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) DamageAPI.AddModdedDamageType(attack, DamageTypes.HANDSecondaryScepter); DamageAPI.AddModdedDamageType(attack, DamageTypes.SquashOnKill); DamageAPI.AddModdedDamageType(attack, DamageTypes.ResetVictimForce); } } } namespace EntityStates.HAND_Overclocked.Primary { public class SwingHammer : BaseMeleeAttack { public static NetworkSoundEventDef networkHitSound = null; public static GameObject swingEffect = null; public static GameObject swingEffectFocus = null; public static GameObject hitEffect = null; public static float force = 3000f; public static float forwardSpeed = 30f; public static float recoilAmplitude = 1.3f; public static float momentumStartPercent = 0.5f; public static float momentumFadePercent = 0.6825f; public static float momentumEndPercent = 0.8f; public static ConfigEntry<bool> useForwardLunge; private float accumulatedReductionPercent = 1f; private float inputReductionPercent = 0f; private bool hitEnemy = false; private bool setNextState = false; private string animationLayer; private bool removedBuff = false; private float lastUpdateTime; public override void OnEnter() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) lastUpdateTime = Time.time; bonusForce = Vector3.zero; attackRecoil = 0f; if ((Object)(object)networkHitSound != (Object)null) { impactSound = networkHitSound.index; } damageType = (DamageType)0; hitHopVelocity = 11f; scaleHitHopWithAttackSpeed = true; hitStopDuration = 0.1f; hitSoundString = ""; swingSoundString = "Play_loader_m1_swing"; hitboxName = "HammerHitbox"; damageCoefficient = 6f; procCoefficient = 1f; baseDuration = 1.625f; baseEarlyExitTime = 0.325f; attackStartTime = 91f / 160f; attackEndTime = 0.6825f; pushForce = 0f; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; direction.y = 0f; ((Vector3)(ref direction)).Normalize(); bonusForce = force * direction; muzzleString = ((swingIndex == 1) ? "SwingCenterL" : "SwingCenterR"); animationLayer = "FullBody, Override"; Util.PlaySound("Play_HOC_StartPunch", ((EntityState)this).gameObject); OverclockController component = ((EntityState)this).GetComponent<OverclockController>(); bool flag = Object.op_Implicit((Object)(object)component) && component.BuffActive(); Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetFloat("hammerIdle", 1f); } swingEffectPrefab = swingEffect; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { if (Object.op_Implicit((Object)(object)swingEffectFocus) && ((EntityState)this).characterBody.HasBuff(HANDMod.Content.Shared.Buffs.NemesisFocus)) { swingEffectPrefab = swingEffectFocus; } if (!HandPlugin.ArenaModeActive && flag && swingIndex == 1) { damageType = (DamageType)(damageType | 0x20); } } base.OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { if (swingIndex != 0) { ((EntityState)this).characterBody.OnSkillActivated(((EntityState)this).skillLocator.primary); } ((EntityState)this).characterBody.SetAimTimer(3f); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.Slow50); } } if (attack != null) { DamageAPI.AddModdedDamageType(attack, DamageTypes.HANDPrimaryHammer); DamageAPI.AddModdedDamageType(attack, DamageTypes.ResetVictimForce); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && ((EntityState)this).characterBody.HasBuff(HANDMod.Content.Shared.Buffs.NemesisFocus)) { attack.damageColorIndex = (DamageColorIndex)12; } } HammerVisibilityController component2 = ((EntityState)this).GetComponent<HammerVisibilityController>(); if (Object.op_Implicit((Object)(object)component2)) { component2.SetHammerEnabled(enabled: true); } if (((EntityState)this).isAuthority && !flag) { ((EntityState)this).characterBody.isSprinting = false; } } public override void FixedUpdate() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: 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_01e4: 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_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) float num = Time.time - lastUpdateTime; lastUpdateTime = Time.time; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; direction.y = 0f; ((Vector3)(ref direction)).Normalize(); if (attack != null) { attack.forceVector = force * direction; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((BaseState)this).damageStat = ((EntityState)this).characterBody.damage; if (((EntityState)this).characterBody.HasBuff(HANDMod.Content.Shared.Buffs.NemesisFocus)) { swingEffectPrefab = swingEffectFocus; attack.damageColorIndex = (DamageColorIndex)12; } else { swingEffectPrefab = swingEffect; attack.damageColorIndex = (DamageColorIndex)0; } } base.FixedUpdate(); if (NetworkServer.active && !removedBuff && ((EntityState)this).fixedAge > duration * attackEndTime) { RemoveBuff(); } if (!((EntityState)this).isAuthority) { return; } if (!hasFired) { startedSkillStationary = (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((EntityState)this).inputBank.moveVector == Vector3.zero) || !useForwardLunge.Value; if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && !startedSkillStationary) { Ray aimRay2 = ((BaseState)this).GetAimRay(); Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(((EntityState)this).inputBank.moveVector.x, ((EntityState)this).inputBank.moveVector.z); Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(((Ray)(ref aimRay2)).direction.x, ((Ray)(ref aimRay2)).direction.z); float num2 = Vector2.Angle(val, val2); if (num2 < 50f) { inputReductionPercent = 0f; } else { inputReductionPercent = 1f; startedSkillStationary = true; } } } if (inHitPause || !Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) || !Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) || startedSkillStationary || !(stopwatch >= duration * momentumStartPercent)) { return; } float num3 = duration * momentumFadePercent; float num4 = duration * momentumEndPercent; if (stopwatch <= num4) { float num5 = forwardSpeed * num * (1f - inputReductionPercent) * accumulatedReductionPercent; if (stopwatch > num3) { num5 = Mathf.Lerp(num5, 0f, (stopwatch - num3) / (num4 - num3)); } if (num5 > 0f) { Vector3 val3 = ((EntityState)this).characterDirection.forward * num5; ((EntityState)this).characterMotor.AddDisplacement(new Vector3(val3.x, 0f, val3.z)); } else { startedSkillStationary = true; } } } public override void OnFiredAttack() { if (((EntityState)this).isAuthority) { ((BaseState)this).AddRecoil(-0.1f * recoilAmplitude, 0.1f * recoilAmplitude, -1f * recoilAmplitude, 1f * recoilAmplitude); } if ((Object)(object)swingEffectPrefab == (Object)(object)swingEffectFocus) { Util.PlaySound("Play_HOC_Focus", ((EntityState)this).gameObject); } } protected override void PlayAttackAnimation() { switch (swingIndex) { case 0: ((EntityState)this).PlayCrossfade(animationLayer, "HammerSwingR", "SwingHammer.playbackRate", duration * 1.4f, 0.2f * duration); break; case 1: ((EntityState)this).PlayCrossfade(animationLayer, "HammerSwingRL", "SwingHammer.playbackRate", duration * 0.8f, 0.2f * duration); break; case 2: ((EntityState)this).PlayCrossfade(animationLayer, "HammerSwingLR", "SwingHammer.playbackRate", duration * 0.8f, 0.2f * duration); break; } } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); accumulatedReductionPercent *= 0.5f; if (hitEnemy) { return; } hitEnemy = true; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { OverclockController component = ((EntityState)this).gameObject.GetComponent<OverclockController>(); if (Object.op_Implicit((Object)(object)component)) { component.ExtendOverclock(1f); } DroneStockController component2 = ((EntityState)this).GetComponent<DroneStockController>(); if (Object.op_Implicit((Object)(object)component2)) { component2.MeleeHit(); } } } protected override void SetNextState() { int num = swingIndex; switch (num) { case 1: num = 2; break; case 0: case 2: num = 1; break; } setNextState = true; ((EntityState)this).outer.SetNextState((EntityState)(object)new SwingHammer { swingIndex = num }); } public override void OnExit() { if (!((EntityState)this).outer.destroying && !setNextState) { float num = ((swingIndex == 0) ? (1.3f / ((BaseState)this).attackSpeedStat) : 0.3f); ((EntityState)this).PlayCrossfade(animationLayer, "BufferEmpty", "SwingHammer.playbackRate", num, num); } RemoveBuff(); base.OnExit(); } private void RemoveBuff() { if (!removedBuff && NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { removedBuff = true; if (((EntityState)this).characterBody.HasBuff(Buffs.Slow50)) { ((EntityState)this).characterBody.RemoveBuff(Buffs.Slow50); } } } 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; } } public class SwingPunch : BaseMeleeAttack { public static NetworkSoundEventDef networkHitSound = null; public static GameObject swingEffect = null; public static GameObject swingEffectFocus = null; public static GameObject hitEffect = null; public static AnimationCurve swingCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[3] { new Keyframe(0f, 0f, 0.25312966f, float.PositiveInfinity, 0f, 1f / 3f), new Keyframe(0.24929532f, 0.2f, -1.3447399f, -1.3447399f, 1f / 3f, 0.09076658f), new Keyframe(0.6705322f, 0f, -0.10235062f, -0.10235062f, 0.73324406f, 0f) }); private bool setNextState = false; private string animationLayer; public static float force = 1600f; private bool hitEnemy = false; public override void OnEnter() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: 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_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) bonusForce = Vector3.zero; attackRecoil = 0f; muzzleString = ((swingIndex == 1) ? "MuzzleHandL" : "MuzzleHandR"); if ((Object)(object)networkHitSound != (Object)null) { impactSound = networkHitSound.index; } damageType = (DamageType)0; hitHopVelocity = 8f; scaleHitHopWithAttackSpeed = true; hitStopDuration = 0.1f; hitSoundString = ""; swingSoundString = "Play_HOC_Punch"; hitboxName = "FistHitbox"; damageCoefficient = 3.9f; procCoefficient = 1f; baseDuration = 1.3f; baseEarlyExitTime = 0.35f; attackStartTime = 0.283f; attackEndTime = 0.565f; pushForce = 0f; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; direction.y = 0f; ((Vector3)(ref direction)).Normalize(); bonusForce = force * direction; forceForwardVelocity = true; forwardVelocityCurve = swingCurve; animationLayer = "FullBody, Override"; Util.PlaySound("Play_HOC_StartPunch", ((EntityState)this).gameObject); OverclockController component = ((EntityState)this).GetComponent<OverclockController>(); bool flag = Object.op_Implicit((Object)(object)component) && component.BuffActive(); Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetFloat("hammerIdle", 0f); } swingEffectPrefab = swingEffect; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { if (Object.op_Implicit((Object)(object)swingEffectFocus) && ((EntityState)this).characterBody.HasBuff(HANDMod.Content.Shared.Buffs.NemesisFocus)) { swingEffectPrefab = swingEffectFocus; } if (!HandPlugin.ArenaModeActive && flag && swingIndex == 1) { damageType = (DamageType)(damageType | 0x20); } } base.OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { if (swingIndex != 0) { ((EntityState)this).characterBody.OnSkillActivated(((EntityState)this).skillLocator.primary); } HammerVisibilityController component2 = ((EntityState)this).GetComponent<HammerVisibilityController>(); if (Object.op_Implicit((Object)(object)component2)) { component2.SetHammerEnabled(enabled: false); } if (((EntityState)this).isAuthority && !flag) { ((EntityState)this).characterBody.isSprinting = false; } ((EntityState)this).characterBody.SetAimTimer(3f); } if (attack != null) { DamageAPI.AddModdedDamageType(attack, DamageTypes.HANDPrimaryPunch); DamageAPI.AddModdedDamageType(attack, DamageTypes.ResetVictimForce); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && ((EntityState)this).characterBody.HasBuff(HANDMod.Content.Shared.Buffs.NemesisFocus)) { attack.damageColorIndex = (DamageColorIndex)12; } } } public override void FixedUpdate() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; direction.y = 0f; ((Vector3)(ref direction)).Normalize(); if (attack != null) { attack.forceVector = force * direction; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((BaseState)this).damageStat = ((EntityState)this).characterBody.damage; if (((EntityState)this).characterBody.HasBuff(HANDMod.Content.Shared.Buffs.NemesisFocus)) { swingEffectPrefab = swingEffectFocus; attack.damageColorIndex = (DamageColorIndex)12; } else { swingEffectPrefab = swingEffect; attack.damageColorIndex = (DamageColorIndex)0; } } base.FixedUpdate(); } public override void OnFiredAttack() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority && Config.screenshakeScale > 0f) { ShakeEmitter val = ShakeEmitter.CreateSimpleShakeEmitter(((EntityState)this).transform.position, new Wave { amplitude = 3f * Config.screenshakeScale, cycleOffset = 0f, frequency = 4f }, 0.25f, 20f, true); ((Component)val).transform.parent = ((EntityState)this).transform; } if ((Object)(object)swingEffectPrefab == (Object)(object)swingEffectFocus) { Util.PlaySound("Play_HOC_Focus", ((EntityState)this).gameObject); } } protected override void PlayAttackAnimation() { if (swingIndex == 1) { ((EntityState)this).PlayCrossfade(animationLayer, "PunchR", "Punch.playbackRate", duration, 0.2f * duration); } else { ((EntityState)this).PlayCrossfade(animationLayer, "PunchL", "Punch.playbackRate", duration, 0.2f * duration); } } public override void OnExit() { if (!((EntityState)this).outer.destroying && !setNextState) { ((EntityState)this).PlayCrossfade(animationLayer, "BufferEmpty", "Punch.playbackRate", 0.2f, 0.2f); } base.OnExit(); } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); if (hitEnemy) { return; } hitEnemy = true; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { OverclockController component = ((EntityState)this).gameObject.GetComponent<OverclockController>(); if (Object.op_Implicit((Object)(object)component)) { component.ExtendOverclock(0.8f); } DroneStockController component2 = ((EntityState)this).GetComponent<DroneStockController>(); if (Object.op_Implicit((Object)(object)component2)) { component2.MeleeHit(); } } } protected override void SetNextState() { int num = swingIndex; switch (num) { case 1: num = 2; break; case 0: case 2: num = 1; break; } setNextState = true; ((EntityState)this).outer.SetNextState((EntityState)(object)new SwingPunch { swingIndex = num }); } 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; } } } namespace EntityStates.HAND_Overclocked.Emotes { public class HANDEmotes : BaseState { public string soundString; public string animString; public float duration; public float animDuration; private Animator animator; private ChildLocator childLocator; public LocalUser localUser; public bool useHammer; private HammerVisibilityController hammerVisibility; private CharacterCameraParamsData emoteCameraParams = new CharacterCameraParamsData { maxPitch = BlendableFloat.op_Implicit(70f), minPitch = BlendableFloat.op_Implicit(-70f), pivotVerticalOffset = BlendableFloat.op_Implicit(1f), idealLocalCameraPos = BlendableVector3.op_Implicit(emoteCameraPosition), wallCushion = BlendableFloat.op_Implicit(0.1f) }; public static Vector3 emoteCameraPosition = new Vector3(0f, 0f, -7.9f); private CameraParamsOverrideHandle camOverrideHandle; public override void OnEnter() { //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); childLocator = ((EntityState)this).GetModelChildLocator(); FindLocalUser(); ((EntityState)this).characterBody.hideCrosshair = true; if (Object.op_Implicit((Object)(object)((EntityState)this).GetAimAnimator())) { ((Behaviour)((EntityState)this).GetAimAnimator()).enabled = false; } animator.SetLayerWeight(animator.GetLayerIndex("AimPitch"), 0f); animator.SetLayerWeight(animator.GetLayerIndex("AimYaw"), 0f); if (animDuration == 0f && duration != 0f) { animDuration = duration; } if (duration > 0f) { ((EntityState)this).PlayAnimation("FullBody, Override", animString, "Emote.playbackRate", duration, 0f); } else { ((EntityState)this).PlayAnimation("FullBody, Override", animString, "Emote.playbackRate", animDuration, 0f); } CameraParamsOverrideRequest val = default(CameraParamsOverrideRequest); val.cameraParamsData = emoteCameraParams; val.priority = 0f; CameraParamsOverrideRequest val2 = val; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, 0.5f); hammerVisibility = ((EntityState)this).GetComponent<HammerVisibilityController>(); if (Object.op_Implicit((Object)(object)hammerVisibility)) { hammerVisibility.SetEmote(inEmote: true); hammerVisibility.SetHammerEnabled(useHammer); } } private void FindLocalUser() { if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { return; } foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody) { localUser = readOnlyLocalUsers; break; } } } public override void OnExit() { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)hammerVisibility)) { hammerVisibility.SetHammerEnabled(enabled: false); hammerVisibility.SetEmote(inEmote: false); } ((EntityState)this).characterBody.hideCrosshair = false; if (Object.op_Implicit((Object)(object)((EntityState)this).GetAimAnimator())) { ((Behaviour)((EntityState)this).GetAimAnimator()).enabled = true; } animator.SetLayerWeight(animator.GetLayerIndex("AimPitch"), 1f); animator.SetLayerWeight(animator.GetLayerIndex("AimYaw"), 1f); ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.5f); ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); bool flag = false; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { if (!((EntityState)this).characterMotor.isGrounded) { flag = true; } if (((EntityState)this).characterMotor.velocity != Vector3.zero) { flag = true; } } if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { if (((EntityState)this).inputBank.skill1.down) { flag = true; } if (((EntityState)this).inputBank.skill2.down) { flag = true; } if (((EntityState)this).inputBank.skill3.down) { flag = true; } if (((EntityState)this).inputBank.skill4.down) { flag = true; } if (((EntityState)this).inputBank.jump.down) { flag = true; } if (((EntityState)this).inputBank.moveVector != Vector3.zero) { flag = true; } } FindLocalUser(); if (((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded && localUser != null && !localUser.isUIFocused) { if (Config.GetKeyPressed(Config.KeybindEmote1)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Sit(), (InterruptPriority)0); return; } if (Config.GetKeyPressed(Config.KeybindEmote2)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Spin(), (InterruptPriority)0); return; } if (Config.GetKeyPressed(Config.KeybindEmoteCSS)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new MenuPose(), (InterruptPriority)0); return; } } if (duration > 0f && ((EntityState)this).fixedAge >= duration) { flag = true; } if (flag) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)0; } } public class MenuPose : HANDEmotes { public override void OnEnter() { animString = "MenuPose"; animDuration = MathF.PI * 113f / 150f; useHammer = true; base.OnEnter(); Util.PlaySound("Play_HOC_StartHammer", ((EntityState)this).gameObject); } } public class Spin : HANDEmotes { private bool playedSound1 = false; private bool playedSound2 = false; private bool playedSound3 = false; private static string startSoundString = "Play_MULT_shift_start"; private static string endSoundString = "Play_MULT_shift_end"; public override void OnEnter() { animString = "Emote2"; animDuration = 4.3f; useHammer = false; base.OnEnter(); } public override void FixedUpdate() { base.FixedUpdate(); float num = ((EntityState)this).fixedAge / animDuration; if (!playedSound1 && num >= 10f / 129f) { playedSound1 = true; Util.PlaySound(startSoundString, ((EntityState)this).gameObject); } if (!playedSound2 && num >= 0.9302326f) { playedSound2 = true; Util.PlaySound(endSoundString, ((EntityState)this).gameObject); Util.PlaySound("Play_mult_shift_hit", ((EntityState)this).gameObject); } if (!playedSound3 && num >= 1.0542636f) { playedSound3 = true; Util.PlaySound("Play_HOC_StartPunch", ((EntityState)this).gameObject); } } public override void OnExit() { if (playedSound1 && !playedSound2) { Util.PlaySound(endSoundString, ((EntityState)this).gameObject); } base.OnExit(); } } public class Sit : HANDEmotes { private bool playedSound = false; public override void OnEnter() { animString = "Emote1"; animDuration = 1.2666667f; useHammer = false; base.OnEnter(); Util.PlaySound("Play_drone_deathpt1", ((EntityState)this).gameObject); } public override void FixedUpdate() { base.FixedUpdate(); if (!playedSound && ((EntityState)this).fixedAge / animDuration >= 0.7894737f) { playedSound = true; Util.PlaySound("Play_drone_deathpt2", ((EntityState)this).gameObject); } } } } namespace EntityStates.HAND_Overclocked.BrokenJanitor { public class BrokenJanitorMain : BaseState { public Interactor activator; public static event Action<BrokenJanitorMain> onBrokenJanitorPurchaseGlobal; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Body", "UnlockIdle", "Unlock.playbackRate", 0.1f, 0f); PurchaseInteraction component = ((EntityState)this).GetComponent<PurchaseInteraction>(); if (Object.op_Implicit((Object)(object)component)) { ((UnityEvent<Interactor>)(object)component.onPurchase).AddListener((UnityAction<Interactor>)DoOnPurchase); } } private void DoOnPurchase(Interactor activator) { this.activator = activator; BrokenJanitorMain.onBrokenJanitorPurchaseGlobal?.Invoke(this); ((EntityState)this).outer.SetNextState((EntityState)(object)new BrokenJanitorActivate { activator = ((Component)activator).gameObject }); } } public class BrokenJanitorActivate : BaseState { public GameObject activator; public static float spawnDelay = 0.25f; public static float baseDuration = 2f; private bool spawned = false; public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlaySound("Play_HOC_StartHammer", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Body", "UnlockActivate", "Unlock.playbackRate", baseDuration, 0f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (NetworkServer.active) { if (!spawned && ((EntityState)this).fixedAge >= spawnDelay) { SpawnAllyServer(); } if (((EntityState)this).fixedAge >= baseDuration) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } } private void SpawnAllyServer() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Invalid comparison between Unknown and I4 //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Invalid comparison between Unknown and I4 //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Invalid comparison between Unknown and I4 //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Invalid comparison between Unknown and I4 //IL_01ad: Unknown result type (might be due to invalid IL or missing references) spawned = true; if (!Object.op_Implicit((Object)(object)activator)) { return; } MasterSummon val = new MasterSummon { useAmbientLevel = true, ignoreTeamMemberLimit = true, masterPrefab = MasterAI.HANDMaster, position = ((EntityState)this).transform.position, rotation = ((EntityState)this).transform.rotation, summonerBodyObject = activator.gameObject }; CharacterMaster val2 = val.Perform(); if (!Object.op_Implicit((Object)(object)val2)) { return; } if (val2.loadout != null) { val2.loadout.bodyLoadoutManager.SetSkillVariant(BodyCatalog.FindBodyIndex("HANDOverclockedBody"), 0, 1u); CharacterBody body = val2.GetBody(); if (Object.op_Implicit((Object)(object)body)) { if (!Config.allowPlayerRepair) { ((Component)body).gameObject.AddComponent<CreateRepairOnDeath>(); } body.SetLoadoutServer(val2.loadout); body.bodyFlags = (BodyFlags)(body.bodyFlags | 1); } } Object.DontDestroyOnLoad((Object)(object)val2); Inventory inventory = val2.inventory; if (Object.op_Implicit((Object)(object)inventory)) { inventory.GiveItem(Items.BoostHp, 50); inventory.GiveItem(Items.BoostDamage, 20); ItemIndex val3 = ItemCatalog.FindItemIndex("RiskyModAllyMarkerItem"); if ((int)val3 != -1) { inventory.GiveItem(val3, 1); } ItemIndex val4 = ItemCatalog.FindItemIndex("RiskyModAllyScalingItem"); if ((int)val4 != -1) { inventory.GiveItem(val4, 1); } ItemIndex val5 = ItemCatalog.FindItemIndex("RiskyModAllyRegenItem"); if ((int)val5 != -1) { inventory.GiveItem(val5, 40); } else if ((int)val2.teamIndex == 1) { inventory.GiveItem(Items.HealWhileSafe, 7); } } } } } namespace HANDMod { public class DroneSkillDef : SkillDef { public enum TargetingMode { EnemiesAndAllies, EnemiesOnly } public TargetingMode targetingMode = TargetingMode.EnemiesAndAllies; } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.EnforcerGang.HANDOverclocked", "HAN-D Overclocked", "1.4.14")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class HandPlugin : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Init <>9__16_0; internal void <EmoteAPICompat>b__16_0(orig_Init orig) { orig.Invoke(); foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs) { if (((Object)allSurvivorDef.bodyPrefab).name == "HANDOverclockedBody") { GameObject val = Assets.mainAssetBundle.LoadAsset<GameObject>("animHANDEmote.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val, 0, true); val.GetComponentInChildren<BoneMapper>().scale = 1.5f; } } } } public const string MODUID = "com.EnforcerGang.HANDOverclocked"; public const string MODNAME = "HAN-D Overclocked"; public const string MODVERSION = "1.4.14"; public const string DEVELOPER_PREFIX = "MOFFEIN"; public static HandPlugin instance; public static bool ScepterStandaloneLoaded; public static bool ScepterClassicLoaded; public static bool EmoteAPILoaded; public static bool ArenaPluginLoaded; public static bool ArenaModeActive; public static bool InfernoPluginLoaded; public static bool RiskOfOptionsLoaded; private void Awake() { Files.PluginInfo = ((BaseUnityPlugin)this).Info; instance = this; CheckDependencies(); Log.Init(((BaseUnityPlugin)this).Logger); Assets.Initialize(); SoundBanks.Init(); Config.ReadConfig(); ItemDisplays.PopulateDisplays(); new LanguageTokens(); new SharedContent(); DamageTypes.Initialize(); new HANDSurvivor().Initialize(); if (RMORSurvivor.enabled) { new RMORSurvivor().Initialize(); } new ContentPacks().Initialize(); if (EmoteAPILoaded) { EmoteAPICompat(); } if (ArenaPluginLoaded) { Stage.onStageStartGlobal += SetArena; } RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(AddMechanicalBodies)); } private void AddMechanicalBodies() { //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_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Invalid comparison between Unknown and I4 //IL_001d: Unknown result type (might be due to invalid IL or missing references) BodyIndex val = BodyCatalog.FindBodyIndex("SniperClassicBody"); if ((int)val != -1) { DroneStockController.mechanicalBodies.Add(val); } } private void CheckDependencies() { ScepterStandaloneLoaded = Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); ScepterClassicLoaded = Chainloader.PluginInfos.ContainsKey("com.ThinkInvisible.ClassicItems"); EmoteAPILoaded = Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI"); ArenaPluginLoaded = Chainloader.PluginInfos.ContainsKey("com.Kingpinush.KingKombatArena"); RiskOfOptionsLoaded = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); InfernoPluginLoaded = Chainloader.PluginInfos.ContainsKey("HIFU.Inferno"); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void SetArena(Stage obj) { ArenaModeActive = KingKombatArenaMainPlugin.s_GAME_MODE_ACTIVE; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void EmoteAPICompat() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__16_0; if (obj == null) { hook_Init val = delegate(orig_Init orig) { orig.Invoke(); foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs) { if (((Object)allSurvivorDef.bodyPrefab).name == "HANDOverclockedBody") { GameObject val2 = Assets.mainAssetBundle.LoadAsset<GameObject>("animHANDEmote.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val2, 0, true); val2.GetComponentInChildren<BoneMapper>().scale = 1.5f; } } }; <>c.<>9__16_0 = val; obj = (object)val; } SurvivorCatalog.Init += (hook_Init)obj; } public static DifficultyDef GetInfernoDef() { if (InfernoPluginLoaded) { return GetInfernoDefInternal(); } return null; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static DifficultyDef GetInfernoDefInternal() { return Main.InfernoDiffDef; } } internal class LanguageTokens { public static SubFileSystem fileSystem; internal static string languageRoot => Path.Combine(assemblyDir, "language"); internal static string assemblyDir => Path.GetDirectoryName(Files.PluginInfo.Location); public LanguageTokens() { RegisterLanguageTokens(); } public static void RegisterLanguageTokens() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown Language.SetFolders += new hook_SetFolders(fixme); } private static void fixme(orig_SetFolders orig, Language self, IEnumerable<string> newFolders) { if (Directory.Exists(languageRoot)) { IEnumerable<string> second = Directory.EnumerateDirectories(Path.Combine(languageRoot), self.name); orig.Invoke(self, newFolders.Union(second)); } else { orig.Invoke(self, newFolders); } } } internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } } namespace HANDMod.SkillStates.BaseStates { public class BaseMeleeAttack : BaseSkillState { public int swingIndex; protected string hitboxName = "Sword"; protected DamageType damageType = (DamageType)0; protected float damageCoefficient = 3.5f; protected float procCoefficient = 1f; protected float pushForce = 300f; protected Vector3 bonusForce = Vector3.zero; protected float baseDuration = 1f; protected float attackStartTime = 0.2f; protected float attackEndTime = 0.4f; protected float baseEarlyExitTime = 0.4f; protected float hitStopDuration = 0.012f; protected float attackRecoil = 0.75f; protected float hitHopVelocity = 4f; protected bool cancelled = false; protected bool forceForwardVelocity = false; protected AnimationCurve forwardVelocityCurve; protected bool startedSkillStationary = false; protected string swingSoundString = ""; protected string hitSoundString = ""; protected string muzzleString = "SwingCenter"; protected GameObject swingEffectPrefab; protected GameObject hitEffectPrefab; protected NetworkSoundEventIndex impactSound; protected bool scaleHitHopWithAttackSpeed = false; protected float earlyExitTime; public float duration; protected bool hasFired; private float hitPauseTimer; protected OverlapAttack attack; protected bool inHitPause; private bool hasHopped; protected float stopwatch; protected Animator animator; private HitStopCachedState hitStopCachedState; private Vector3 storedVelocity; private float lastUpdateTime; public override void OnEnter() { //IL_0027: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0176: 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_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) lastUpdateTime = Time.time; ((BaseState)this).OnEnter(); startedSkillStationary = Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((EntityState)this).inputBank.moveVector == Vector3.zero; duration = baseDuration / ((BaseState)this).attackSpeedStat; earlyExitTime = baseEarlyExitTime / ((BaseState)this).attackSpeedStat; hasFired = false; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + duration, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; animator.SetBool("attacking", true); HitBoxGroup hitBoxGroup = null; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName); } PlayAttackAnimation(); attack = new OverlapAttack(); attack.damageType = DamageTypeCombo.op_Implicit(damageType); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = ((BaseState)this).GetTeam(); attack.damage = damageCoefficient * ((BaseState)this).damageStat; attack.procCoefficient = procCoefficient; attack.hitEffectPrefab = hitEffectPrefab; attack.forceVector = bonusForce; attack.pushAwayForce = pushForce; attack.hitBoxGroup = hitBoxGroup; attack.isCrit = ((BaseState)this).RollCrit(); attack.impactSound = impactSound; } protected virtual void PlayAttackAnimation() { ((EntityState)this).PlayCrossfade("Gesture, Override", "Slash" + (1 + swingIndex), "Slash.playbackRate", duration, 0.05f); } public override void OnExit() { if (!hasFired && !cancelled) { FireAttack(); } ((EntityState)this).OnExit(); animator.SetBool("attacking", false); } protected virtual void PlaySwingEffect() { if (Object.op_Implicit((Object)(object)swingEffectPrefab)) { EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, muzzleString, true); } } protected virtual void OnHitEnemyAuthority() { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound(hitSoundString, ((EntityState)this).gameObject); if (!hasHopped) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded && hitHopVelocity > 0f) { float num = hitHopVelocity; if (scaleHitHopWithAttackSpeed) { num /= Mathf.Sqrt(((BaseState)this).attackSpeedStat); } ((BaseState)this).SmallHop(((EntityState)this).characterMotor, num); } hasHopped = true; } if (!inHitPause && hitStopDuration > 0f) { storedVelocity = ((EntityState)this).characterMotor.velocity; hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "Slash.playbackRate"); hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat; inHitPause = true; } } private void FireAttack() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { CharacterDirection characterDirection = ((EntityState)this).characterDirection; Ray aimRay = ((BaseState)this).GetAimRay(); characterDirection.forward = ((Ray)(ref aimRay)).direction; } hasFired = true; Util.PlayAttackSpeedSound(swingSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); OnFiredAttack(); if (((EntityState)this).isAuthority) { PlaySwingEffect(); ((BaseState)this).AddRecoil(-1f * attackRecoil, -2f * attackRecoil, -0.5f * attackRecoil, 0.5f * attackRecoil); } } if (((EntityState)this).isAuthority && attack.Fire((List<HurtBox>)null)) { OnHitEnemyAuthority(); } } public virtual void OnFiredAttack() { } protected virtual void SetNextState() { int num = ((swingIndex == 0) ? 1 : 0); ((EntityState)this).outer.SetNextState((EntityState)(object)new BaseMeleeAttack { swingIndex = num }); } public override void FixedUpdate() { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); float num = Time.time - lastUpdateTime; lastUpdateTime = Time.time; hitPauseTimer -= num; if (!inHitPause) { stopwatch += num; } if (((EntityState)this).isAuthority) { if (hitPauseTimer <= 0f && inHitPause) { ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); inHitPause = false; ((EntityState)this).characterMotor.velocity = storedVelocity; } if (!inHitPause) { if (forceForwardVelocity && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && !startedSkillStationary) { Vector3 val = ((EntityState)this).characterDirection.forward * forwardVelocityCurve.Evaluate(((EntityState)this).fixedAge / duration); ((EntityState)this).characterMotor.AddDisplacement(new Vector3(val.x, 0f, val.z)); } } else { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat("Swing.playbackRate", 0f); } } } if (stopwatch >= duration * attackStartTime && stopwatch <= duration * attackEndTime) { FireAttack(); } if (stopwatch >= duration - earlyExitTime && ((EntityState)this).isAuthority && ((EntityState)this).inputBank.skill1.down) { if (!hasFired) { FireAttack(); } SetNextState(); } else if (((EntityState)this).isAuthority && stopwatch >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(swingIndex); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); swingIndex = reader.ReadInt32(); } } } namespace HANDMod.Modules { internal static class Assets { internal static Ass