Decompiled source of MurathMachinist v1.3.29
MurathMachinistMod.dll
Decompiled 3 months 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.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Captain.Weapon; using EntityStates.ClayBruiser.Weapon; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using EntityStates.Engi.EngiMissilePainter; using EntityStates.Engi.EngiWeapon; using EntityStates.EngiTurret.EngiTurretWeapon; using EntityStates.GolemMonster; using EntityStates.TitanMonster; using EntityStates.Wisp1Monster; using HG; using HG.BlendableTypes; using MurathMachinistMod.Achievements; using MurathMachinistMod.Modules; using MurathMachinistMod.Modules.Characters; using MurathMachinistMod.Modules.Survivors; using MurathMachinistMod.SkillStates; using MurathMachinistMod.SkillStates.BaseStates; using On.RoR2; using R2API; using R2API.Utils; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using UnityEngine; using UnityEngine.Networking; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("MurathMachinistMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("MurathMachinistMod")] [assembly: AssemblyTitle("MurathMachinistMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] namespace MurathMachinistMod { internal class AimAnimCorrecter : MonoBehaviour { public GameObject body; public AimAnimator AimAnimator; public Animator Animator; private bool enableAimAnimator = true; private bool run = true; public void Start() { } public void LateUpdate() { if (!run) { return; } Animator = ((Component)this).GetComponent<Animator>(); Animator.SetFloat("aimPitchCycle", 0.5f); GameObject[] array = Object.FindObjectsOfType<GameObject>(); foreach (GameObject val in array) { if (((Object)val.gameObject).name == "mdlMurathMachinist") { bool flag = true; ((Behaviour)AimAnimator).enabled = false; AimAnimator.enableAimWeight = false; } } run = false; } public void Update() { } } 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); } } public class IndicatorHolder : MonoBehaviour { public GameObject CreateReadyRight(ChildLocator component) { GameObject chargeReady = Assets.ChargeReady; GameObject val = Object.Instantiate<GameObject>(chargeReady, component.FindChild("FirePoint1")); val.GetComponent<ParticleSystem>().Stop(); return val; } public GameObject CreateReadyLeft(ChildLocator component) { GameObject chargeReady = Assets.ChargeReady; GameObject val = Object.Instantiate<GameObject>(chargeReady, component.FindChild("FirePoint2")); val.GetComponent<ParticleSystem>().Stop(); return val; } public bool playready(GameObject ReadyLeft, GameObject ReadyRight, ChildLocator component, GameObject baseObject, int multiplier) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) ReadyLeft.transform.position = component.FindChild("FirePoint2").position; ReadyLeft.GetComponent<ParticleSystem>().Play(); ReadyRight.transform.position = component.FindChild("FirePoint1").position; ReadyRight.GetComponent<ParticleSystem>().Play(); for (int i = 0; i < multiplier; i++) { Util.PlaySound(Paint.enterSoundString, baseObject); } return true; } public void killready(GameObject ReadyLeft, GameObject ReadyRight) { if (Object.op_Implicit((Object)(object)ReadyLeft)) { Object.Destroy((Object)(object)ReadyLeft.gameObject); } if (Object.op_Implicit((Object)(object)ReadyRight)) { Object.Destroy((Object)(object)ReadyRight.gameObject); } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.UninvitedCalamity.MurathMachinistMod", "MurathMachinist", "1.3.29")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [R2APISubmoduleDependency(new string[] { "PrefabAPI", "LanguageAPI", "SoundAPI", "UnlockableAPI" })] public class MurathMachinistPlugin : BaseUnityPlugin { public const string MODUID = "com.UninvitedCalamity.MurathMachinistMod"; public const string MODNAME = "MurathMachinistMod"; public const string MODVERSION = "1.3.29"; public const string DEVELOPER_PREFIX = "UninvitedCalamity"; public static MurathMachinistPlugin instance; private int DisplaysEnabled = 1; private static ConfigFile CustomConfigFile { get; set; } public static ConfigEntry<int> MyConfigEntry { get; set; } private void Awake() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown CustomConfigFile = new ConfigFile(Paths.ConfigPath + "\\MurathMachinist.cfg", true); MyConfigEntry = CustomConfigFile.Bind<int>("DisplaySection", "DisplayItems", 1, "Set to 1 for True, 0 for False"); DisplaysEnabled = MyConfigEntry.Value; if (Chainloader.PluginInfos.ContainsKey("com.johnedwa.RTAutoSprintEx")) { ((Component)this).SendMessage("RT_SprintDisableMessage", (object)"MurathMachinistMod.SkillStates.ElectroBoltCharge"); ((Component)this).SendMessage("RT_SprintDisableMessage", (object)"MurathMachinistMod.SkillStates.MurathAOECharge"); ((Component)this).SendMessage("RT_SprintDisableMessage", (object)"MurathMachinistMod.SkillStates.MurathOvercharge"); ((Component)this).SendMessage("RT_SprintDisableMessage", (object)"MurathMachinistMod.SkillStates.MurathScattercannon"); ((Component)this).SendMessage("RT_SprintDisableMessage", (object)"MurathMachinistMod.SkillStates.ElectroBoltCharge"); ((Component)this).SendMessage("RT_SprintDisableMessage", (object)"MurathMachinistMod.SkillStates.ElectroBoltCannon"); ((Component)this).SendMessage("RT_SprintDisableMessage", (object)"MurathMachinistMod.SkillStates.Shoot"); ((Component)this).SendMessage("RT_SprintDisableMessage", (object)"MurathMachinistMod.SkillStates.MurathScattergun"); ((Component)this).SendMessage("RT_SprintDisableMessage", (object)"MurathMachinistMod.SkillStates.MurathHurtAOECharge"); } instance = this; Log.Init(((BaseUnityPlugin)this).Logger); Assets.Initialize(); Config.ReadConfig(); States.RegisterStates(); Buffs.RegisterBuffs(); Projectiles.RegisterProjectiles(); Tokens.AddTokens(); ItemDisplays.PopulateDisplays(); MurathUnlockables.RegisterUnlockables(); new MyMurathMachinist().Initialize(); new ContentPacks().Initialize(); Hook(); } private void Hook() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); } } internal class MurathBuffCheese : MonoBehaviour { public void Start() { ProjectileDamage component = ((Component)this).GetComponent<ProjectileDamage>(); ProjectileController component2 = ((Component)this).GetComponent<ProjectileController>(); GameObject networkowner = component2.Networkowner; if (NetworkServer.active) { networkowner.GetComponent<CharacterBody>().ClearTimedBuffs(Buffs.ScatterGunBuff); for (int i = 0; (float)i < component.damage; i++) { networkowner.GetComponent<CharacterBody>().AddTimedBuff(Buffs.ScatterGunBuff, 2f, 10); } } Object.Destroy((Object)(object)((Component)this).gameObject); } } } namespace MurathMachinistMod.SkillStates { internal class ElectroBoltCannon : BaseSkillState, IStepSetter { public enum FirePort { topL, topR, BottomL, BottomR } public static float damageCoefficient = 3.4f; public static float procCoefficient = 2f; public static float baseDuration = 0.5f; public static float force = 800f; public static float recoil = 3f; public static float range = 256f; public static GameObject tracerEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/TracerGoldGat"); private float duration; private float fireTime = 0f; private bool hasFired = false; private string muzzleString; private int barrelCount = 0; protected Animator animator; private string FP = "FirePoint4"; private bool Noflamer = false; private float timer = 0f; private float staging = 0f; private Transform modelTransform; private ChildLocator component; private Transform CAMORef; private Vector3 Camo; private float thisloopFirePos = 0f; private Random rand = new Random(); private int iteration = 0; private bool pressed = false; private FirePort fireport; void IStepSetter.SetStep(int i) { switch ((FirePort)i) { case FirePort.topL: FP = "FirePoint1"; break; case FirePort.topR: FP = "FirePoint2"; break; case FirePort.BottomL: FP = "FirePoint3"; break; case FirePort.BottomR: FP = "FirePoint4"; break; } } public override void OnEnter() { //IL_00cf: 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_00e0: 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) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireTime = 0.2f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "FirePoint1"; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + duration, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; animator.SetBool("attacking", true); modelTransform = ((EntityState)this).GetModelTransform(); component = ((Component)modelTransform).GetComponent<ChildLocator>(); CAMORef = component.FindChild("CAMORef"); FP = "FirePoint2"; Camo = CAMORef.localPosition; thisloopFirePos = CAMORef.localPosition.x; float z = ((Component)CAMORef).transform.localPosition.z; float num = Mathf.Clamp(z, 0.01f, 1f); float num2 = 4f; staging = num2 + num2 / num; } public override void OnExit() { ((EntityState)this).OnExit(); } public void ElectroBoltFire(string FPoint, ChildLocator component) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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_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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) muzzleString = FPoint; Transform val = component.FindChild(FPoint); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); if (!((EntityState)this).isAuthority) { return; } Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(0f, 0f, 0f); float num = ((Component)CAMORef).transform.localPosition.z; if ((double)num < 0.2) { num = 0f; } for (int i = 0; i < 3; i++) { if (rand.NextDouble() > 0.5) { ((Vector3)(ref val2))[i] = num; } else { ((Vector3)(ref val2))[i] = num * -1f; } } Ray aimRay = ((BaseState)this).GetAimRay(); try { ProjectileManager.instance.FireProjectile(Projectiles.boltPrefab, val.position, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction + val2 / 15f), ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 0f, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } catch (NullReferenceException data) { Log.Debug(data); } } public override void FixedUpdate() { ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "FirePoint1"; ((BaseState)this).StartAimMode(0.5f + duration, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; if (timer <= 0f && !Noflamer) { if (!((EntityState)this).isAuthority) { } switch (iteration) { case 0: iteration++; ElectroBoltFire("FirePoint2", component); break; case 1: ElectroBoltFire("FirePoint1", component); iteration++; break; case 2: ElectroBoltFire("FirePoint4", component); iteration++; break; case 3: ElectroBoltFire("FirePoint3", component); iteration++; Noflamer = true; break; } timer = duration / staging; } if ((double)((EntityState)this).fixedAge >= (double)duration * 0.8 && !pressed && ((EntityState)this).inputBank.skill1.down) { pressed = true; } timer -= Time.fixedDeltaTime; ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority && Noflamer) { if (pressed) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ElectroBoltCharge()); } 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 override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write((byte)fireport); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); fireport = (FirePort)reader.ReadByte(); } } internal class ElectroBoltCharge : BaseSkillState { private float baseDuration = 0.8f; private float chargeduration2 = 0f; private float duration = 0f; private float chargeDuration = 1f; private bool released = false; private uint enterSoundID; protected Animator animator; private string FP = ""; private Transform modelTransform; private ChildLocator component; private Transform CAMORef; private Vector3 Camo; private GameObject ReadyLeft; private GameObject ReadyRight; private IndicatorHolder Creator; private float inout; private bool pinged = false; public override void OnEnter() { //IL_00a2: 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_00c3: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + duration, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; animator.SetBool("attacking", true); modelTransform = ((EntityState)this).GetModelTransform(); component = ((Component)modelTransform).GetComponent<ChildLocator>(); CAMORef = component.FindChild("CAMORef"); FP = "FirePoint2"; Camo = CAMORef.localPosition; Camo.z = 0f; CAMORef.localPosition = Camo; chargeduration2 = baseDuration / ((BaseState)this).attackSpeedStat; Creator = new IndicatorHolder(); ReadyRight = Creator.CreateReadyRight(component); ReadyLeft = Creator.CreateReadyLeft(component); } public override void Update() { ((EntityState)this).Update(); inout = Mathf.Clamp(((EntityState)this).age / chargeduration2, 0f, 1f); ((EntityState)this).characterBody.SetSpreadBloom(inout, true); } public override void FixedUpdate() { //IL_00dd: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.SetAimTimer(1f); Camo.z = 1f - inout; if (inout >= 1f && !pinged) { pinged = Creator.playready(ReadyLeft, ReadyRight, component, ((EntityState)this).gameObject, 1); } if (!((EntityState)this).isAuthority || true) { if (!released && (!Object.op_Implicit((Object)(object)((EntityState)this).inputBank) || !((EntityState)this).inputBank.skill1.down)) { released = true; } if (released) { CAMORef.localPosition = Camo; ((EntityState)this).outer.SetNextState((EntityState)(object)new ElectroBoltCannon()); } } } public override void OnExit() { Creator.killready(ReadyLeft, ReadyRight); ((EntityState)this).characterBody.SetSpreadBloom(0f, true); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class hurtAOE : MurathAOE { protected override bool getdamageBool() { return true; } } internal class MagMine : BaseSkillState { private bool hasFired = false; private ChildLocator locator; private Transform modelTransform; private MurathDataScript MD; private Animator animator; private float Duration = 0.25f; private ChildLocator component; private bool windupComplete = false; private float windup = 0.1f; public override void OnEnter() { ((BaseState)this).OnEnter(); modelTransform = ((EntityState)this).GetModelTransform(); locator = ((Component)modelTransform).GetComponent<ChildLocator>(); MD = ((EntityState)this).GetComponent<MurathDataScript>(); if (MD.MineCount == 1) { MD.MineCount = 0; } else { MD.MineCount = 1; } Duration /= ((BaseState)this).attackSpeedStat; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + Duration, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; animator.SetBool("attacking", true); modelTransform = ((EntityState)this).GetModelTransform(); component = ((Component)modelTransform).GetComponent<ChildLocator>(); } public override void FixedUpdate() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !hasFired && windupComplete) { hasFired = true; Ray aimRay = ((BaseState)this).GetAimRay(); Log.Debug("FindingChild"); Transform val = locator.FindChild("MissilePoint1"); if (MD.MineCount == 1) { val = locator.FindChild("MissilePoint2"); } try { ProjectileManager.instance.FireProjectile(Projectiles.MarkerProj, val.position, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, 10f * ((BaseState)this).damageStat, 0f, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } catch (NullReferenceException data) { Log.Debug(data); } } if (((EntityState)this).fixedAge >= Duration && (hasFired || !((EntityState)this).isAuthority) && windupComplete) { ((EntityState)this).outer.SetNextStateToMain(); } if (((EntityState)this).fixedAge >= windup) { windupComplete = true; } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class MurathAOE : BaseSkillState { public static float damageCoefficient = 0.5f; public static float procCoefficient = 2f; public static float baseDuration = 0.5f; public static float force = 800f; public float damage = 3f; public float damageMult = 1f; public static float recoil = 3f; public static float range = 256f; public float ForceMultiplier = 12f; public static GameObject tracerEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/TracerGoldGat"); private float duration; private float fireTime = 0f; private bool hasFired = false; private string muzzleString; private int barrelCount = 0; protected Animator animator; private string FP = "FirePoint4"; public bool damageBool = false; protected virtual bool getdamageBool() { return false; } public override void OnEnter() { ((BaseState)this).OnEnter(); damageBool = getdamageBool(); duration = ElectroBoltCannon.baseDuration / ((BaseState)this).attackSpeedStat; fireTime = 0.2f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + duration, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; animator.SetBool("attacking", true); ForceMultiplier = ((BaseState)this).damageStat - 11f; ElectroBoltFire(); } public override void OnExit() { ((EntityState)this).OnExit(); } public void ElectroBoltFire() { //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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) Transform modelTransform = ((EntityState)this).GetModelTransform(); ChildLocator component = ((Component)modelTransform).GetComponent<ChildLocator>(); Transform val = component.FindChild("CAMORef"); FP = "MissilePoint1"; Vector3 localPosition = val.localPosition; float y = val.localPosition.y; float num = y; if (num != 0f) { if (num == 1f) { FP = "MissilePoint2"; localPosition.y = 0f; val.localPosition = localPosition; } } else { localPosition.y = 1f; val.localPosition = localPosition; } muzzleString = FP; Transform val2 = component.FindChild(FP); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); if (!((EntityState)this).isAuthority) { return; } bool flag = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master); float num2 = val.localScale.x + 1f; if (flag) { num2 *= 2f; } Ray aimRay = ((BaseState)this).GetAimRay(); try { if (!damageBool) { ProjectileManager.instance.FireProjectile(Projectiles.bombPrefab, val2.position, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 1500f * num2, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } else { ProjectileManager.instance.FireProjectile(Projectiles.bombPrefab, val2.position, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, damage * ((BaseState)this).damageStat * num2, 15f, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } } catch (NullReferenceException data) { Log.Debug(data); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); 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)2; } } internal class MurathAOECharge : BaseSkillState { private float baseDuration = 1f; private float duration = 0f; private float chargeDuration = 2f; private bool released = false; private float maxcharge = 2f; protected Animator animator; private string FP = ""; private Transform modelTransform; private ChildLocator component; private Transform CAMORef; private Vector3 Camo; private uint enterSoundID; private GameObject ReadyLeft; private GameObject ReadyRight; private IndicatorHolder Creator; public EntityState es = (EntityState)(object)new MurathAOE(); private float inout; private float interpolate = 0f; private bool pinged = false; protected virtual EntityState getes() { return (EntityState)(object)new MurathAOE(); } public override void OnEnter() { //IL_00a2: 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_00c3: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + duration, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; animator.SetBool("attacking", true); modelTransform = ((EntityState)this).GetModelTransform(); component = ((Component)modelTransform).GetComponent<ChildLocator>(); CAMORef = component.FindChild("CAMORef"); FP = "FirePoint2"; Camo = CAMORef.localScale; Camo.x = 1f; CAMORef.localScale = Camo; maxcharge *= Mathf.Clamp(((BaseState)this).attackSpeedStat * (((BaseState)this).attackSpeedStat / 2f), 0f, 400f); enterSoundID = Util.PlayAttackSpeedSound(ChargeMegaLaser.chargeAttackSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); Creator = new IndicatorHolder(); ReadyRight = Creator.CreateReadyRight(component); ReadyLeft = Creator.CreateReadyLeft(component); es = getes(); } public override void Update() { ((EntityState)this).Update(); } public override void FixedUpdate() { //IL_016e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.SetAimTimer(1f); Camo.x = 0f * (1f - interpolate) + maxcharge * interpolate; if (interpolate >= 1f) { AkSoundEngine.StopPlayingID(((Component)modelTransform).GetComponent<ChargeSoundManager>().ChargeSound); if (!pinged) { pinged = Creator.playready(ReadyLeft, ReadyRight, component, ((EntityState)this).gameObject, 2); } } interpolate = Mathf.Clamp(interpolate + Time.deltaTime / baseDuration, 0f, 1f); ((EntityState)this).characterBody.SetSpreadBloom(interpolate, true); animator.SetFloat("GunCharge2", Mathf.Clamp(Camo.x / maxcharge, 0f, 0.9f)); if (((EntityState)this).isAuthority) { if (!released && (!Object.op_Implicit((Object)(object)((EntityState)this).inputBank) || !((EntityState)this).inputBank.skill2.down)) { released = true; } if (released) { CAMORef.localScale = Camo; ((EntityState)this).outer.SetNextState(es); } } } public override void OnExit() { Creator.killready(ReadyLeft, ReadyRight); ((EntityState)this).characterBody.SetSpreadBloom(0f, true); animator.SetFloat("GunCharge2", 0f); AkSoundEngine.StopPlayingID(((Component)modelTransform).GetComponent<ChargeSoundManager>().ChargeSound); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class MurathBoostAction : BaseSkillState { public static float duration = 0.5f; public static float initialSpeedCoefficient = 5f; public static float finalSpeedCoefficient = 2.5f; public static string dodgeSoundString = "MurathMachinistMurathBoostAction"; public static float dodgeFOV = DodgeState.dodgeFOV; private static float distance = 2500f; private Vector3 forwardDirection; private Animator animator; private Vector3 previousPosition; private Vector3 targetLocation; private Vector3 targetDirection; private Transform modelTransform; private ChildLocator component; private Transform CAMORef; private GameObject refTransform = new GameObject(); private OverlapAttack attack; private float start = -0.5f; private float end = 0.5f; private float Detour = 0f; private float a = 0f; private float b = 1f; private float c = 0f; private float velocityDisplace = 20f; public override void OnEnter() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(SlideState.soundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); component = ((Component)modelTransform).GetComponent<ChildLocator>(); CAMORef = component.FindChild("CAMORef"); animator = ((EntityState)this).GetModelAnimator(); targetDirection = getMovementVector(); targetLocation = ((EntityState)this).transform.position + targetDirection * 10f; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); previousPosition = ((EntityState)this).transform.position; ((EntityState)this).PlayAnimation("FullBody, Override", "Roll", "Roll.playbackRate", duration, 0f); ((EntityState)this).characterDirection.forward = getMovementVector(); ((Component)CAMORef).transform.LookAt(targetLocation); refTransform.transform.position = modelTransform.position; refTransform.transform.LookAt(targetLocation, Vector3.up); CharacterBody characterBody2 = ((EntityState)this).characterBody; characterBody2.bodyFlags = (BodyFlags)(characterBody2.bodyFlags | 1); } protected Vector3 getMovementVector() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).inputBank.aimDirection; } public void ql(int no) { Log.Debug("Line: " + no); } public override void FixedUpdate() { //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) ql(1); ((EntityState)this).FixedUpdate(); ql(2); float num = Mathf.Clamp(velocityDisplace * (((EntityState)this).fixedAge / duration), 0f, 1f) * Mathf.Clamp(velocityDisplace - velocityDisplace * (((EntityState)this).fixedAge / duration), 0f, 1f); ql(3); float num2 = ((EntityState)this).fixedAge / duration; ql(4); a = start * (1f - num2) + Detour * num2; b = Detour * (1f - num2) + end * num2; ql(5); c = a * (1f - num2) + b * num2; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(0f, c, 1f - c); ql(6); ql(7); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.forward = getMovementVector(); ((EntityState)this).characterMotor.velocity = num * ((Component)((EntityState)this).GetModelTransform()).transform.TransformDirection(val) * (distance * 1f / duration) * Time.fixedDeltaTime; } ql(8); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).characterMotor.velocity = ((Component)((EntityState)this).GetModelTransform()).transform.TransformDirection(val) * 50f; ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = -1f; } ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } public override void OnSerialize(NetworkWriter writer) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } } public class MurathBoostCharge : BaseSkillState { public float duration = 0.25f; public static float initialSpeedCoefficient = 5f; public static float finalSpeedCoefficient = 2.5f; private bool released = false; private float maxcharge = 2f; public static string dodgeSoundString = "MurathMachinistRoll"; public static float dodgeFOV = DodgeState.dodgeFOV; public float minDuration = 0.1f; private float rollSpeed; private Vector3 forwardDirection; private Animator animator; private Vector3 previousPosition; private Vector3 targetLocation; private Vector3 targetDirection; private Transform modelTransform; private ChildLocator component; private Transform CAMORef; private Vector3 Camo; public override void OnEnter() { //IL_0016: 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_0027: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); targetDirection = getMovementVector(); targetLocation = ((EntityState)this).transform.position + targetDirection * 10f; animator.SetBool("ThrusterWarble", true); modelTransform = ((EntityState)this).GetModelTransform(); component = ((Component)modelTransform).GetComponent<ChildLocator>(); CAMORef = component.FindChild("CAMORef"); Camo = CAMORef.localScale; previousPosition = ((EntityState)this).transform.position; int num = 1; int num2 = ((BaseSkillState)this).activatorSkillSlot.maxStock - ((BaseSkillState)this).activatorSkillSlot.baseSkill.baseMaxStock; num += num2 / 2; } protected Vector3 getMovementVector() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).inputBank.aimDirection; } public override void FixedUpdate() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.SetAimTimer(1f); ((EntityState)this).characterDirection.forward = getMovementVector(); if (((EntityState)this).isAuthority) { if (!released && (!Object.op_Implicit((Object)(object)((EntityState)this).inputBank) || !((EntityState)this).inputBank.skill3.down)) { released = true; } if (released) { ((EntityState)this).outer.SetNextState((EntityState)(object)new MurathBoostAction()); } } } public override void OnExit() { if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = -1f; } ((EntityState)this).characterBody.SetSpreadBloom(0f, true); animator.SetBool("ThrusterWarble", false); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)7; } public override void OnSerialize(NetworkWriter writer) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } } internal class MurathDirectionalBoost : BaseSkillState { private float Duration = 0.5f; private Transform modelTransform; private ChildLocator component; private Transform CAMORef; private Animator animator; private Vector3 direction; private static float DodgeMultiplier = 10f; private int layerIndex; private int AfterBurnerCount = 0; private bool presstest = false; protected Vector3 GetDirection() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); return ((Vector3)(ref val)).normalized; } protected Vector3 GetDirection2() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterMotor.velocity : ((EntityState)this).inputBank.moveVector); return ((Vector3)(ref val)).normalized; } public override void OnEnter() { //IL_00a2: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); modelTransform = ((EntityState)this).GetModelTransform(); component = ((Component)modelTransform).GetComponent<ChildLocator>(); CAMORef = component.FindChild("CAMORef"); animator = ((EntityState)this).GetModelAnimator(); animator.SetBool("EndDirectional", false); layerIndex = animator.GetLayerIndex("Fullbody, Override"); ((EntityState)this).PlayAnimation("FullBody, Override", "EnterDirectional", "EnterDirectional.playbackRate", MurathBoostAction.duration, 0f); Util.PlaySound(SlideState.soundString, ((EntityState)this).gameObject); direction = GetDirection(); direction.y = 0f; direction = ((Vector3)(ref direction)).normalized * 7f; AfterBurnerCount = 1; int num = ((BaseSkillState)this).activatorSkillSlot.maxStock - ((BaseSkillState)this).activatorSkillSlot.baseSkill.baseMaxStock; AfterBurnerCount += num / 2; } public override void FixedUpdate() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) direction = GetDirection2(); direction.y = 0f; direction = ((Vector3)(ref direction)).normalized * 7f; ((EntityState)this).FixedUpdate(); float num = ((EntityState)this).fixedAge / MurathBoostAction.duration; ((EntityState)this).characterMotor.velocity = direction * Mathf.Clamp(DodgeMultiplier - DodgeMultiplier * num, 1f, DodgeMultiplier); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= Duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)0; } public override void OnExit() { Log.Debug("Ends animation"); ((EntityState)this).GetModelAnimator().SetBool("EndDirectional", true); ((EntityState)this).OnExit(); } } internal class MurathHurtAOECharge : MurathAOECharge { protected override EntityState getes() { return (EntityState)(object)new hurtAOE(); } } internal class MurathOvercharge : BaseSkillState { public enum FirePort { topL, topR, BottomL, BottomR } public static float damageCoefficient = 2.6f; public static float procCoefficient = 2f; public static float baseDuration = 0.5f; public static float force = 800f; public static float recoil = 3f; public static float range = 256f; public static GameObject tracerEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/TracerGoldGat"); private float maxcharge = 2f; private float chargerate = 1f; private float duration; private float fireTime = 0f; private bool hasFired = false; private string muzzleString; private int barrelCount = 0; protected Animator animator; private string FP = "FirePoint4"; private Transform modelTransform; private ChildLocator component; private Transform CAMORef; private Vector3 Camo; private float thisloopFirePos = 0f; private GameObject ReadyLeft; private GameObject ReadyRight; private IndicatorHolder Creator; private uint enterSoundID; private bool released = false; private bool secondpress = false; private float progress = 0f; private bool pinged = false; private float storedAge = 0f; private ElectroBoltCannon.FirePort fireport; public override void OnEnter() { //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) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; enterSoundID = Util.PlayAttackSpeedSound(ChargeMegaLaser.chargeAttackSoundString, ((EntityState)this).gameObject, 1.5f * duration); Util.PlayAttackSpeedSound(ChargeCaptainShotgun.playChargeSoundString, ((EntityState)this).gameObject, 2.1f / duration); fireTime = 0.2f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "FirePoint1"; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + duration, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; animator.SetBool("attacking", true); modelTransform = ((EntityState)this).GetModelTransform(); component = ((Component)modelTransform).GetComponent<ChildLocator>(); CAMORef = component.FindChild("CAMORef"); FP = "FirePoint2"; Camo = CAMORef.localScale; maxcharge *= ((BaseState)this).attackSpeedStat; Creator = new IndicatorHolder(); ReadyRight = Creator.CreateReadyRight(component); ReadyLeft = Creator.CreateReadyLeft(component); } public override void OnExit() { Creator.killready(ReadyLeft, ReadyRight); ((EntityState)this).characterBody.SetSpreadBloom(0f, true); animator.SetFloat("GunCharge", 0f); AkSoundEngine.StopPlayingID(enterSoundID); ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); animator.SetBool("attacking", true); ((EntityState)this).characterBody.SetAimTimer(1f); progress = Mathf.Clamp(progress + ((BaseState)this).attackSpeedStat * Time.fixedDeltaTime * chargerate, 0f, maxcharge); Camo.y = progress; float num = Mathf.Clamp(progress / maxcharge, 0f, 1f); ((EntityState)this).characterBody.SetSpreadBloom(num, true); animator.SetFloat("GunCharge", Mathf.Clamp(num, 0f, 0.99f)); if (num >= 1f && !pinged) { AkSoundEngine.StopPlayingID(enterSoundID); pinged = Creator.playready(ReadyLeft, ReadyRight, component, ((EntityState)this).gameObject, 3); storedAge = ((EntityState)this).fixedAge; } ((EntityState)this).characterBody.SetSpreadBloom(num, true); animator.SetFloat("GunCharge", Mathf.Clamp(num, 0f, 0.99f)); CAMORef.localScale = Camo; if (!released && !((EntityState)this).inputBank.skill4.down) { released = true; } if (released && ((EntityState)this).inputBank.skill4.down) { secondpress = true; } if (secondpress && ((EntityState)this).fixedAge >= duration) { if (((EntityState)this).fixedAge - storedAge < 0.5f && num >= 1f) { Camo.y = progress * 1.5f; } CAMORef.localScale = Camo; ((EntityState)this).outer.SetNextState((EntityState)(object)new MurathScattercannon()); } } 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)3; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write((byte)fireport); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); fireport = (ElectroBoltCannon.FirePort)reader.ReadByte(); } } internal class MurathScattercannon : BaseSkillState { public static float damageCoefficient = 22.5f; public static float procCoefficient = 12f; public static float baseDuration = 0.5f; public static float force = 600f; public static float recoil = 6f; public static float range = 500f; public static GameObject tracerEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/TracerGoldGat"); private float duration; private float fireTime = 0f; private bool hasFired = false; private string muzzleString; private int barrelCount = 0; protected Animator animator; private string FP = "FirePoint4"; private Transform modelTransform; private ChildLocator component; private Transform CAMORef; private Vector3 Camo; private float thisloopFirePos = 0f; private float timeAtStart = 0f; private bool SweetSpot = false; private int i = 1; private bool flip = false; public override void OnEnter() { //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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(FireMegaLaser.playLoopSoundString, ((EntityState)this).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); duration = baseDuration; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "FirePoint1"; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + duration, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; animator.SetBool("attacking", true); modelTransform = ((EntityState)this).GetModelTransform(); component = ((Component)modelTransform).GetComponent<ChildLocator>(); CAMORef = component.FindChild("CAMORef"); FP = "FirePoint2"; Camo = CAMORef.localScale; fireTime = baseDuration * Mathf.Clamp(Camo.y + 0.1f, 0f, 10f); animator.SetFloat("GunCharge", 0.9f); ((Component)component.FindChild("OverChargeParticle1")).gameObject.transform.localScale = Vector3.zero; ((Component)component.FindChild("OverChargeParticle2")).gameObject.transform.localScale = Vector3.zero; ((Component)component.FindChild("OverchargeParticle3")).gameObject.transform.localScale = Vector3.zero; ((Component)component.FindChild("OverChargeParticle4")).gameObject.transform.localScale = Vector3.zero; timeAtStart = Time.timeSinceLevelLoad; if (Camo.y >= 3f) { SweetSpot = true; Camo.y = 2f; } } public override void OnExit() { Util.PlaySound(FireMegaLaser.stopLoopSoundString, ((EntityState)this).gameObject); ((Component)component.FindChild("OverChargeParticle1")).gameObject.SetActive(false); ((Component)component.FindChild("OverChargeParticle2")).gameObject.SetActive(false); ((Component)component.FindChild("OverchargeParticle3")).gameObject.SetActive(false); ((Component)component.FindChild("OverChargeParticle4")).gameObject.SetActive(false); animator.SetFloat("GunCharge", 0f); ((EntityState)this).OnExit(); } public void spawnLaser(string FPoint, ChildLocator component, Vector3 vector, Vector3 V, Vector3 StartVector, GameObject LaserCopy1) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0037: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) Transform val = component.FindChild(FPoint); LaserCopy1.transform.position = StartVector; float z = V.z; MainModule main = LaserCopy1.GetComponent<ParticleSystem>().main; ((MainModule)(ref main)).startSpeed = MinMaxCurve.op_Implicit(25f * z); V.z = 1f; LaserCopy1.transform.localScale = V; LaserCopy1.transform.LookAt(vector); EffectManager.SimpleEffect(LaserCopy1, LaserCopy1.transform.position, LaserCopy1.transform.rotation, true); } public void ElectroBoltFire(string FPoint, ChildLocator component, int modifier) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0174: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: 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_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Expected O, but got Unknown //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) muzzleString = FPoint; Transform val = component.FindChild(FPoint); int num = component.FindChildIndex(FPoint); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); GameObject val2 = null; GameObject val3 = null; if (modifier == 0) { val2 = tracerEffectPrefab; val3 = FirePistol2.hitEffectPrefab; } modifier = 1; Vector3 val4 = val.position + ((Ray)(ref aimRay)).direction * range; ((Ray)(ref aimRay)).origin = val.position; RaycastHit val5 = default(RaycastHit); if (Physics.Raycast(aimRay, ref val5, range, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.defaultLayer)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask))) { val4 = ((RaycastHit)(ref val5)).point; } float num2 = ((BaseState)this).damageStat * damageCoefficient * Camo.y; if (SweetSpot) { num2 *= 5f; SweetSpot = false; } new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject), baseDamage = num2 * Time.deltaTime, baseForce = force * Camo.y * Time.deltaTime, position = val4, radius = 4f, falloffModel = (FalloffModel)0, procCoefficient = procCoefficient * Camo.y * Time.deltaTime, procChainMask = default(ProcChainMask), crit = ((BaseState)this).RollCrit() }.Fire(); if (Object.op_Implicit((Object)(object)modelTransform) && Object.op_Implicit((Object)(object)component)) { EffectData val6 = new EffectData { origin = val4 }; Vector3 position = val.position; Vector3 direction = ((Ray)(ref aimRay)).direction; Vector3 direction2 = ((Ray)(ref aimRay)).direction; val6.start = position + direction * ((Vector3)(ref direction2)).magnitude * 20f; EffectData val7 = val6; val7.SetChildLocatorTransformReference(((EntityState)this).gameObject, num); Vector3 v = default(Vector3); ((Vector3)(ref v))..ctor(1f, 1f, Vector3.Distance(val.position, val4) / 10f); spawnLaser(FPoint, component, val4, v, val.position, Assets.OverchargeShot2); EffectManager.SpawnEffect(FireLaser.hitEffectPrefab, val7, true); } } } public override void FixedUpdate() { //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); animator.SetBool("attacking", true); ((EntityState)this).characterBody.SetAimTimer(1f); string fPoint = "FirePoint" + i; if (!flip) { ElectroBoltFire(fPoint, component, 0); i++; if (i > 4) { i = 1; } } else { flip = !flip; } if (((EntityState)this).fixedAge >= fireTime && ((EntityState)this).isAuthority) { Camo = CAMORef.localScale; Camo.y = 0f; CAMORef.localScale = Camo; ((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)3; } } internal class MurathScattergun : BaseSkillState { private float Duration = 0.4f; private float Windup = 0.1f; private bool hasFired = false; private string muzzleString; private Animator animator; private Transform modelTransform; private ChildLocator component; private GameObject muzzleFlash; private GameObject impactFlash; private string FPoint; private float chargePercent = 0f; private Random rand = new Random(); private float deviationMultiplier = 0.05f; private int Buffcount = 1; private float DamageCoef = 1.5f; private bool Finished = false; private float maxBuff = 4f; private bool hasDashed = false; private MurathDataScript MD; private Transform muzzleTransform; private Transform muzzleVfxTransform; private float range = 50f; public void FireGun() { //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_00e6: 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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_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_0162: 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_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_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: 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_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: 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_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_022d: 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_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Expected O, but got Unknown MD.Barrel++; switch (MD.Barrel % 4) { case 0: FPoint = "FirePoint4"; break; case 1: FPoint = "FirePoint1"; break; case 2: FPoint = "FirePoint2"; break; case 3: FPoint = "FirePoint3"; break; } Transform val = component.FindChild(FPoint); Util.PlaySound(MinigunFire.fireSound, ((Component)val).gameObject); EffectManager.SimpleMuzzleFlash(FireEmbers.effectPrefab, ((EntityState)this).gameObject, FPoint, true); muzzleTransform = val; if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.AddSpreadBloom(1.5f); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 origin = ((Ray)(ref aimRay)).origin; Vector3 val2 = origin; val2 += ((Ray)(ref aimRay)).direction; float num = 0.015f; val2 += new Vector3(Random.Range(0f - num, num), Random.Range(0f - num, num), Random.Range(0f - num, num)); val2 -= origin; val2 = ((Vector3)(ref val2)).normalized; BulletAttack val3 = new BulletAttack { bulletCount = 1u, aimVector = val2, origin = val.position, damage = DamageCoef * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)1, maxDistance = range, force = Shoot.force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = 0f, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = FPoint, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = 0.5f, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = MinigunFire.bulletTracerEffectPrefab, spreadPitchScale = 0f, spreadYawScale = 0f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = MinigunFire.bulletHitEffectPrefab }; val3.Fire(); } } public void AddBuff(int bulletCount) { //IL_0030: 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) Log.Debug("In Add Buffs"); if (((EntityState)this).isAuthority) { ProjectileManager.instance.FireProjectile(Projectiles.cheese, new Vector3(0f, 0f, -100f), new Quaternion(0f, 0f, 0f, 0f), ((EntityState)this).gameObject, (float)Mathf.Clamp(bulletCount, 1, 10), 0f, false, (DamageColorIndex)0, (GameObject)null, -1f); } Log.Debug("Out of Add Buffs"); } public float Interpolate(float a, float b, float time) { return b * time + a * (1f - time); } public override void OnEnter() { //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); float a = 2f * ((BaseState)this).attackSpeedStat; float b = 4f * ((BaseState)this).attackSpeedStat; MD = ((EntityState)this).GetComponent<MurathDataScript>(); Buffcount = Mathf.Clamp(MD.BulletCount, 1, MD.BulletCount); if (MD.BulletCount < 10) { MD.BulletCount++; } MD.pause = true; AddBuff(MD.BulletCount); Duration /= Interpolate(a, b, (float)Buffcount / 10f); Windup /= Interpolate(a, b, (float)Buffcount / 10f); deviationMultiplier /= Buffcount + 1; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "Muzzle"; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(1f + Duration, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; animator.SetBool("attacking", true); modelTransform = ((EntityState)this).GetModelTransform(); component = ((Component)modelTransform).GetComponent<ChildLocator>(); muzzleFlash = FireShrapnel.effectPrefab; Transform transform = muzzleFlash.transform; transform.localScale *= 0.05f; impactFlash = FireBarrage.hitEffectPrefab; Transform transform2 = impactFlash.transform; transform2.localScale *= 1f; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).inputBank.skill3.down) { hasDashed = true; } if (((EntityState)this).fixedAge >= Windup) { if (!hasFired) { FireGun(); hasFired = true; } else if (((EntityState)this).fixedAge >= Duration) { Finished = true; ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { if (!Finished || hasDashed) { Log.Debug("Has dashed"); } if (Object.op_Implicit((Object)(object)muzzleVfxTransform)) { EntityState.Destroy((Object)(object)((Component)muzzleVfxTransform).gameObject); muzzleVfxTransform = null; } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class ParticleEnable : BaseSkillState { private int duration = 0; private Transform modelTransform; private ChildLocator component; public override void OnEnter() { ((BaseState)this).OnEnter(); modelTransform = ((EntityState)this).GetModelTransform(); component = ((Component)modelTransform).GetComponent<ChildLocator>(); ((Component)component.FindChild("Particle1")).gameObject.SetActive(false); duration = 1; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (duration >= 1) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)0; } } public class Roll : BaseSkillState { public static float duration = 0.5f; public static float initialSpeedCoefficient = 5f; public static float finalSpeedCoefficient = 2.5f; public static string dodgeSoundString = "MurathMachinistRoll"; public static float dodgeFOV = DodgeState.dodgeFOV; private static float distance = 2500f; private Vector3 forwardDirection; private Animator animator; private Vector3 previousPosition; private Vector3 targetLocation; private Vector3 targetDirection; private Transform modelTransform; private ChildLocator component; private Transform CAMORef; private GameObject refTransform = new GameObject(); private OverlapAttack attack; private Vector3 Camo; private float start = -0.5f; private float end = 0.5f; private float Detour = 0f; private float a = 0f; private float b = 1f; private float c = 0f; private float velocityDisplace = 20f; public override void OnEnter() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_014e: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(SlideState.soundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); component = ((Component)modelTransform).GetComponent<ChildLocator>(); CAMORef = component.FindChild("CAMORef"); Camo = CAMORef.localScale; animator = ((EntityState)this).GetModelAnimator(); targetDirection = getMovementVector(); targetLocation = ((EntityState)this).transform.position + targetDirection * 10f; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); previousPosition = ((EntityState)this).transform.position; ((EntityState)this).PlayAnimation("FullBody, Override", "Roll", "Roll.playbackRate", duration, 0f); ((EntityState)this).characterDirection.forward = getMovementVector(); ((Component)CAMORef).transform.LookAt(targetLocation); refTransform.transform.position = modelTransform.position; refTransform.transform.LookAt(targetLocation, Vector3.up); CharacterBody characterBody2 = ((EntityState)this).characterBody; characterBody2.bodyFlags = (BodyFlags)(characterBody2.bodyFlags | 1); } protected Vector3 getMovementVector() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).inputBank.aimDirection; } public override void FixedUpdate() { //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); float num = Mathf.Clamp(velocityDisplace * (((EntityState)this).fixedAge / duration), 0f, 1f) * Mathf.Clamp(velocityDisplace - velocityDisplace * (((EntityState)this).fixedAge / duration), 0f, 1f); float num2 = ((EntityState)this).fixedAge / duration; a = start * (1f - num2) + Detour * num2; b = Detour * (1f - num2) + end * num2; c = a * (1f - num2) + b * num2; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(0f, c, 1f - c); ((Component)CAMORef).transform.position = previousPosition; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.forward = getMovementVector(); ((EntityState)this).characterMotor.velocity = num * ((Component)CAMORef).transform.TransformDirection(val) * (distance * 1f / duration) * Time.fixedDeltaTime; } HitBoxGroup val2 = null; if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).characterMotor.velocity = ((Component)CAMORef).transform.TransformDirection(val) * 50f; ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = -1f; } Camo = CAMORef.localScale; Camo.z = 1f; CAMORef.localScale = Camo; ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((Component)CAMORef).transform.rotation = new Quaternion(0f, 0f, 0f, 0f); ((Component)CAMORef).transform.localPosition = Vector3.zero; CharacterBody characterBody2 = ((EntityState)this).characterBody; characterBody2.bodyFlags = (BodyFlags)(characterBody2.bodyFlags & -2); ((EntityState)this).OnExit(); } public override void OnSerialize(NetworkWriter writer) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } } public class Shoot : BaseSkillState { public static float damageCoefficient = 2.0833333f; public static float procCoefficient = 2.5f; public static float baseDuration = 0.5f; public static float force = 0f; public static float recoil = 3f; public static float range = 80f; private Transform modelTransform; private ChildLocator component; protected Animator animator; public static GameObject tracerEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/TracerGoldGat"); private float duration; private float fireTime; private bool hasFired; private string muzzleString; private float damageMult = 1f; private uint enterSoundID; private bool released = false; private float i = 1f; private float chargePercent = 0f; private Random rand = new Random(); private float deviationMultiplier = 0.25f; private GameObject muzzleFlash; private GameObject impactFlash; public override void OnEnter() { //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_00d8: 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) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "Muzzle"; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + duration, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; animator.SetBool("attacking", true); modelTransform = ((EntityState)this).GetModelTransform(); component = ((Component)modelTransform).GetComponent<ChildLocator>(); muzzleFlash = FireShrapnel.effectPrefab; Transform transform = muzzleFlash.transform; transform.localScale *= 0.05f; impactFlash = FireBarrage.hitEffectPrefab; Transform transform2 = impactFlash.transform; transform2.localScale *= 1f; } public override void OnExit() { ((EntityState)this).characterBody.SetSpreadBloom(0f, true); animator.SetFloat("GunCharge", 0f); ((EntityState)this).OnExit(); } private void Fire(string FPoint) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_0089: 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_0098: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0173: 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_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: 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_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: 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_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) if (hasFired) { return; } Transform val = component.FindChild(FPoint); ((EntityState)this).characterBody.AddSpreadBloom(1.5f); EffectManager.SimpleEffect(muzzleFlash, ((Component)val).transform.position, ((Component)val).transform.rotation, true); if (!((EntityState)this).isAuthority) { return; } Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val2 = ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * range; Vector3 val3 = val2; RaycastHit val4 = default(RaycastHit); if (Physics.Raycast(aimRay, ref val4, range, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.defaultLayer)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask))) { val3 = ((RaycastHit)(ref val4)).point; } Vector3 val5 = default(Vector3); ((Vector3)(ref val5))..ctor(0f, 0f, 0f); float num = chargePercent; for (int i = 0; i < 3; i++) { if (rand.NextDouble() > 0.5) { ((Vector3)(ref val5))[i] = num * deviationMultiplier; } else { ((Vector3)(ref val5))[i] = num * (0f - deviationMultiplier); } } float num2 = Vector3.Distance(val3, ((Ray)(ref aimRay)).origin); float num3 = Vector3.Distance(val.position, ((Ray)(ref aimRay)).origin); val5 *= Vector3.Distance(((Component)val).transform.position, val3) * (1f - chargePercent); Vector3 val6 = (val.position - (val3 + val5)) / range; if (num2 <= num3) { val6 = (((Ray)(ref aimRay)).origin - (val2 + val5)) / range; } aimRay = ((BaseState)this).GetAimRay(); Vector3 origin = ((Ray)(ref aimRay)).origin; Vector3 val7 = origin; val7 += ((Ray)(ref aimRay)).direction; float num4 = 0.05f * (1f - chargePercent); val7 += new Vector3(Random.Range(0f - num4, num4), Random.Range(0f - num4, num4), Random.Range(0f - num4, num4)); val7 -= origin; val7 = ((Vector3)(ref val7)).normalized; new BulletAttack { bulletCount = 1u, aimVector = val7, origin = val.position, damage = damageCoefficient * ((BaseState)this).damageStat * (chargePercent + 0.1f), damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = 0f, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = FPoint, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = FireShrapnel.tracerEffectPrefab, spreadPitchScale = 0f, spreadYawScale = 0f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = impactFlash }.Fire(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); damageMult +=