Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of Tracer v1.6.4
Tracer.dll
Decompiled 11 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using EntityStates; using EntityStates.Commando.CommandoWeapon; using EntityStates.Huntress; using EntityStates.Loader; using KinematicCharacterController; using R2API; using R2API.Utils; using RoR2; using RoR2.Achievements; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.UI; [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("Tracer")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Tracer")] [assembly: AssemblyTitle("Tracer")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Tracer; public static class Achievements { [RegisterAchievement("TRACER_CHARACTER", "ACHIEVEMENT_TRACER_CHARACTER_UNLOCKABLE_ID", null, 10u, null)] public class SurvivorUnlockable : BaseAchievement { public override void OnInstall() { ((BaseAchievement)this).OnInstall(); Stage.onStageStartGlobal += Stage_onStageStartGlobal; } private void Stage_onStageStartGlobal(Stage stage) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)Run.instance) && ((object)Run.instance).GetType() == typeof(Run) && Run.instance.loopClearCount > 0) { SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene(); if (Object.op_Implicit((Object)(object)sceneDefForCurrentScene) && (int)sceneDefForCurrentScene.sceneType == 1 && !sceneDefForCurrentScene.isFinalStage) { ((BaseAchievement)this).Grant(); } } } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } } [RegisterAchievement("TRACER_SPECIAL", "ACHIEVEMENT_TRACER_SPECIAL_UNLOCKABLE_ID", null, 10u, typeof(ReduceTimeToZeroServerAchievement))] public class SpecialUnlockable : BaseAchievement { private class ReduceTimeToZeroServerAchievement : BaseServerAchievement { public override void OnUninstall() { ((BaseServerAchievement)this).OnUninstall(); } } public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("TracerBody"); } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); Tracer.onTimeReduced += Tracer_onTimeReduced; } private void Tracer_onTimeReduced(float currentTime) { if (currentTime == 0f) { ((BaseAchievement)this).Grant(); } } public override void OnBodyRequirementBroken() { Tracer.onTimeReduced -= Tracer_onTimeReduced; ((BaseAchievement)this).OnBodyRequirementBroken(); } } [RegisterAchievement("TRACER_MASTERY", "ACHIEVEMENT_TRACER_MASTERY_UNLOCKABLE_ID", null, 10u, null)] public class MasteryUnlockable : BasePerSurvivorClearGameMonsoonAchievement { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("TracerBody"); } } internal static UnlockableDef characterUnlock; internal static UnlockableDef masteryUnlock; internal static UnlockableDef specialUnlock; public static void RegisterUnlockables() { characterUnlock = NewUnlockable<SurvivorUnlockable>("CHARACTER", Assets.MainAssetBundle.LoadAsset<Sprite>("portrait2"), "Slipstream", "Use the Primordial Teleporter to loop back to the first stage."); masteryUnlock = NewUnlockable<MasteryUnlockable>("MASTERY", Assets.charPortraitSkinSlipstream, "Tracer: Mastery", "As Tracer, beat the game or obliterate on Monsoon."); specialUnlock = NewUnlockable<SpecialUnlockable>("SPECIAL", Assets.icon4Alt, "Tracer: Back to the Past", "As Tracer, reverse the time back to 0 with the Strange Stopwatch."); } private static UnlockableDef NewUnlockable<T>(string AchievementIdentifier, Sprite Icon, string Title, string Description) where T : BaseAchievement { string text = "ACHIEVEMENT_TRACER_"; UnlockableDef val = ScriptableObject.CreateInstance<UnlockableDef>(); string langName = text + AchievementIdentifier + "_NAME"; string langDesc = text + AchievementIdentifier + "_DESCRIPTION"; LanguageAPI.Add(langName, Title); LanguageAPI.Add(langDesc, Description); Func<string> func = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString(langName), Language.GetString(langDesc) }); Type typeFromHandle = typeof(T); val.cachedName = text + AchievementIdentifier + "_UNLOCKABLE_ID"; val.getHowToUnlockString = func; val.getUnlockedString = func; val.achievementIcon = Icon; val.sortScore = 200; val.hidden = false; ContentAddition.AddUnlockableDef(val); return val; } } public static class Assets { public static AssetBundle MainAssetBundle; public static GameObject pulseBombmdl; public static Texture charPortrait; public static Sprite charPortraitSkin; public static Sprite charPortraitSkinSlipstream; public static Sprite charPortraitSkinGraffiti; public static Sprite charPortraitSkinWillOWisp; public static Sprite charPortraitSkinPunk; public static Sprite iconP; public static Sprite icon1; public static Sprite icon2; public static Sprite icon2Alt; public static Sprite icon2AltD; public static Sprite icon3; public static Sprite icon3Alt; public static Sprite icon4; public static Sprite icon4Alt; public static void PopulateAssets() { //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)MainAssetBundle == (Object)null) { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Tracer.tracer"); MainAssetBundle = AssetBundle.LoadFromStream(stream); } using (Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Tracer.Tracer.bnk")) { byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } using (Stream stream3 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Tracer.blinkR.bnk")) { byte[] array2 = new byte[stream3.Length]; stream3.Read(array2, 0, array2.Length); SoundBanks.Add(array2); } pulseBombmdl = MainAssetBundle.LoadAsset<GameObject>("pulsebomb"); Material val = new Material(Prefabs.Load<Shader>("RoR2/Base/Shaders/HGStandard.shader")); val.SetTexture("_MainTex", (Texture)(object)MainAssetBundle.LoadAsset<Texture2D>("Bomb_d")); val.SetTexture("_EmTex", (Texture)(object)MainAssetBundle.LoadAsset<Texture2D>("Bomb_e")); val.SetFloat("_EmPower", 10f); val.SetColor("_EmColor", Color.cyan); ((Renderer)pulseBombmdl.GetComponent<MeshRenderer>()).material = val; charPortrait = (Texture)(object)MainAssetBundle.LoadAsset<Sprite>("portrait2").texture; charPortraitSkin = MainAssetBundle.LoadAsset<Sprite>("portraitbase"); charPortraitSkinSlipstream = MainAssetBundle.LoadAsset<Sprite>("portrait-slipstream"); charPortraitSkinGraffiti = MainAssetBundle.LoadAsset<Sprite>("portrait-graffiti"); charPortraitSkinWillOWisp = MainAssetBundle.LoadAsset<Sprite>("portrait-wisp"); charPortraitSkinPunk = MainAssetBundle.LoadAsset<Sprite>("portrait-punk"); iconP = MainAssetBundle.LoadAsset<Sprite>("PassiveIcon1"); icon1 = MainAssetBundle.LoadAsset<Sprite>("Skill1Icon"); icon2 = MainAssetBundle.LoadAsset<Sprite>("Skill2Icon"); icon2Alt = MainAssetBundle.LoadAsset<Sprite>("Pulse_Rounds_Icon"); icon2AltD = MainAssetBundle.LoadAsset<Sprite>("Melee_Icon"); icon3 = MainAssetBundle.LoadAsset<Sprite>("Skill3Icon"); icon3Alt = MainAssetBundle.LoadAsset<Sprite>("Skill3AltIcon"); icon4 = MainAssetBundle.LoadAsset<Sprite>("Skill4Icon"); icon4Alt = MainAssetBundle.LoadAsset<Sprite>("Skill4AltIcon"); } } internal class MineBehaviour : MonoBehaviour { private void Start() { ProjectileController component = ((Component)this).GetComponent<ProjectileController>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.owner)) { TickingBombController component2 = component.owner.gameObject.GetComponent<TickingBombController>(); if (Object.op_Implicit((Object)(object)component2)) { component2.prefab = ((Component)this).gameObject; component2.StartTicking(); } } } } internal class TracerTemporaryOverlay : MonoBehaviour { private float stopwatch; private float duration = 3f; public Material materialInstance; private AnimationCurve curve = AnimationCurve.Linear(0f, 0f, 1f, 0.45f); private RecallBehaviour behaviour; public static void AddTemporaryOverlay(RecallBehaviour behaviour, GameObject target, Material mat, CharacterModel characterModel) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) TracerTemporaryOverlay tracerTemporaryOverlay = target.AddComponent<TracerTemporaryOverlay>(); tracerTemporaryOverlay.behaviour = behaviour; tracerTemporaryOverlay.materialInstance = new Material(mat); RendererInfo[] baseRendererInfos = characterModel.baseRendererInfos; foreach (RendererInfo val in baseRendererInfos) { val.renderer.material = tracerTemporaryOverlay.materialInstance; } } private void FixedUpdate() { if (!Object.op_Implicit((Object)(object)behaviour) || behaviour.track) { stopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)materialInstance)) { materialInstance.SetFloat("_ExternalAlpha", curve.Evaluate(stopwatch / duration)); } } } } internal class RecallBehaviour : MonoBehaviour { public float stopwatch; public float maxTime = 3f; public int maxCount = (Tracer.performanceMode.Value ? 12 : 55); public List<Vector3> positions = new List<Vector3>(); public List<Vector3> camPositions = new List<Vector3>(); public List<Vector3> directions = new List<Vector3>(); public List<Quaternion> rotations = new List<Quaternion>(); public List<GameObject> models = new List<GameObject>(); public bool track = true; public CameraRigController camera; private Transform modelTransform; private Transform[] bones; private CharacterDirection direction; private Animator animator; private HealthComponent health; private float healthStopwatch; public float lastRecordedHealth; public float timeBetweenSaves => maxTime / (float)maxCount; private void Start() { health = ((Component)this).GetComponent<HealthComponent>(); lastRecordedHealth = health.fullHealth; direction = ((Component)this).GetComponent<CharacterDirection>(); ModelLocator modelLocator = ((Component)this).GetComponent<CharacterBody>().modelLocator; modelTransform = modelLocator.modelTransform; animator = ((Component)modelTransform).GetComponent<Animator>(); bones = ((Component)((Component)modelTransform).GetComponent<ChildLocator>().FindChild("Armature")).GetComponentsInChildren<Transform>(); } private void OnDisable() { Reset(); } public void Reset() { camera.isCutscene = false; directions.Clear(); positions.Clear(); camPositions.Clear(); rotations.Clear(); if (models.Count > 0) { for (int i = 0; i < models.Count; i++) { Object.Destroy((Object)(object)models[i]); } models.Clear(); } lastRecordedHealth = health.health; healthStopwatch = 0f; track = true; } private void FixedUpdate() { //IL_0121: 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_0157: 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_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)camera) && Util.HasEffectiveAuthority(((Component)this).gameObject)) { camera = CameraRigController.instancesList.Find(delegate(CameraRigController x) { GameObject val2 = (x.target = ((Component)this).gameObject); return Object.op_Implicit((Object)(object)val2); }); } if (!track) { stopwatch = 0f; healthStopwatch = 0f; return; } if (Object.op_Implicit((Object)(object)health)) { healthStopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)health) && healthStopwatch >= 3f) { healthStopwatch = 0f; lastRecordedHealth = health.health; } } stopwatch += Time.fixedDeltaTime; if (!(stopwatch >= timeBetweenSaves)) { return; } stopwatch = 0f; GameObject val = (GameObject)((!Tracer.potatoMode.Value) ? ((object)Object.Instantiate<GameObject>(Prefabs.tracerModel)) : ((object)new GameObject("TracerTrail"))); val.transform.position = ((Component)modelTransform).transform.position; val.transform.rotation = ((Component)modelTransform).transform.rotation; val.transform.localScale = ((Component)modelTransform).transform.localScale; if (!Tracer.potatoMode.Value) { Transform[] componentsInChildren = ((Component)val.GetComponent<ChildLocator>().FindChild("Armature")).GetComponentsInChildren<Transform>(); for (int i = 0; i < bones.Length; i++) { if (Object.op_Implicit((Object)(object)componentsInChildren[i])) { ((Component)componentsInChildren[i]).transform.localPosition = ((Component)bones[i]).transform.localPosition; ((Component)componentsInChildren[i]).transform.localRotation = ((Component)bones[i]).transform.localRotation; } } TracerTemporaryOverlay.AddTemporaryOverlay(this, val, Prefabs.mat, val.GetComponent<CharacterModel>()); } models.Add(val); if (models.Count > maxCount) { Object.Destroy((Object)(object)models[0]); models.RemoveAt(0); } directions.Add(direction.forward); positions.Add(((Component)this).transform.position); if (Object.op_Implicit((Object)(object)camera)) { rotations.Add(((Component)camera).transform.rotation); camPositions.Add(((Component)camera).transform.position); if (camPositions.Count > maxCount) { camPositions.RemoveAt(0); } if (rotations.Count > maxCount) { rotations.RemoveAt(0); } } if (positions.Count > maxCount) { positions.RemoveAt(0); } } } internal class TracerAfterImageBehaviour : MonoBehaviour { private float stopwatch; private float duration = 3f; public Material materialInstance; private AnimationCurve curve = AnimationCurve.Linear(0f, 0f, 1f, 0.45f); public RecallBehaviourNew behaviour; private MeshFilter meshFilter; private List<GameObject> meshes = new List<GameObject>(); public float yRot; private void Start() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) materialInstance = new Material(Prefabs.mat); MeshRenderer component = ((Component)this).GetComponent<MeshRenderer>(); ((Renderer)component).material = materialInstance; meshFilter = ((Component)this).GetComponent<MeshFilter>(); meshes.Add(((Component)this).gameObject); ((Component)this).transform.rotation = Quaternion.Euler(90f, yRot, 0f); } private void FixedUpdate() { if (Object.op_Implicit((Object)(object)behaviour) && (!Object.op_Implicit((Object)(object)behaviour) || behaviour.track)) { stopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)materialInstance)) { materialInstance.SetFloat("_ExternalAlpha", curve.Evaluate(stopwatch / duration)); } } } public void BakeMesh(SkinnedMeshRenderer[] renderers) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0067: 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) if (renderers != null) { return; } for (int i = 0; i < renderers.Length; i++) { Mesh val = new Mesh(); renderers[i].BakeMesh(val); Debug.LogWarning((object)val); if (i == 0) { Debug.LogWarning((object)meshFilter); meshFilter.mesh = val; Debug.LogWarning((object)"0"); continue; } GameObject val2 = Object.Instantiate<GameObject>(Prefabs.afterImageBase, ((Component)this).transform.position, Quaternion.Euler(90f, yRot, 0f), ((Component)this).transform); val2.GetComponent<MeshFilter>().mesh = val; TracerAfterImageBehaviour component = val2.GetComponent<TracerAfterImageBehaviour>(); component.behaviour = behaviour; component.yRot = yRot; Debug.LogWarning((object)"newMesh"); } } } [DefaultExecutionOrder(100)] internal class RecallBehaviourNew : MonoBehaviour { public float stopwatch; public float maxTime = 3f; public int maxCount = (Tracer.performanceMode.Value ? 12 : 55); public List<Vector3> positions = new List<Vector3>(); public List<Vector3> camPositions = new List<Vector3>(); public List<Vector3> directions = new List<Vector3>(); public List<Quaternion> rotations = new List<Quaternion>(); public List<GameObject> models = new List<GameObject>(); public bool track = true; public CameraRigController camera; private Transform modelTransform; private CharacterDirection direction; private HealthComponent health; private float healthStopwatch; public float lastRecordedHealth; private SkinnedMeshRenderer[] renderers; public float timeBetweenSaves => maxTime / (float)maxCount; private void Start() { health = ((Component)this).GetComponent<HealthComponent>(); lastRecordedHealth = health.fullHealth; direction = ((Component)this).GetComponent<CharacterDirection>(); ModelLocator modelLocator = ((Component)this).GetComponent<CharacterBody>().modelLocator; modelTransform = modelLocator.modelTransform; renderers = ((Component)modelTransform).GetComponentsInChildren<SkinnedMeshRenderer>(); } private void OnDisable() { Reset(); } public void Reset() { camera.isCutscene = false; directions.Clear(); positions.Clear(); camPositions.Clear(); rotations.Clear(); if (models.Count > 0) { for (int i = 0; i < models.Count; i++) { Object.Destroy((Object)(object)models[i]); } models.Clear(); } lastRecordedHealth = health.health; healthStopwatch = 0f; track = true; } private void FixedUpdate() { //IL_0121: 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_0157: 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_01ba: 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_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)camera) && Util.HasEffectiveAuthority(((Component)this).gameObject)) { camera = CameraRigController.instancesList.Find(delegate(CameraRigController x) { GameObject val2 = (x.target = ((Component)this).gameObject); return Object.op_Implicit((Object)(object)val2); }); } if (!track) { stopwatch = 0f; healthStopwatch = 0f; return; } if (Object.op_Implicit((Object)(object)health)) { healthStopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)health) && healthStopwatch >= 3f) { healthStopwatch = 0f; lastRecordedHealth = health.health; } } stopwatch += Time.fixedDeltaTime; if (!(stopwatch >= timeBetweenSaves)) { return; } stopwatch = 0f; GameObject val = (GameObject)((!Tracer.potatoMode.Value) ? ((object)Object.Instantiate<GameObject>(Prefabs.afterImageBase)) : ((object)new GameObject("TracerTrail"))); val.transform.position = ((Component)modelTransform).transform.position; val.transform.rotation = ((Component)modelTransform).transform.rotation; val.transform.localScale = ((Component)modelTransform).transform.localScale; if (!Tracer.potatoMode.Value) { TracerAfterImageBehaviour component = val.GetComponent<TracerAfterImageBehaviour>(); component.BakeMesh(renderers); component.behaviour = this; Quaternion rotation = ((Component)this).transform.rotation; component.yRot = ((Quaternion)(ref rotation)).eulerAngles.y; } models.Add(val); if (models.Count > maxCount) { Object.Destroy((Object)(object)models[0]); models.RemoveAt(0); } directions.Add(direction.forward); positions.Add(((Component)this).transform.position); if (Object.op_Implicit((Object)(object)camera)) { rotations.Add(((Component)camera).transform.rotation); camPositions.Add(((Component)camera).transform.position); if (camPositions.Count > maxCount) { camPositions.RemoveAt(0); } if (rotations.Count > maxCount) { rotations.RemoveAt(0); } } if (positions.Count > maxCount) { positions.RemoveAt(0); } } } internal class TickingBombController : MonoBehaviour { public float ticks; public GameObject prefab; private void FixedUpdate() { if ((Object)(object)prefab == (Object)null) { StopTicking(); } } public void Detonate(float num) { if (Object.op_Implicit((Object)(object)prefab)) { ProjectileImpactExplosion component = prefab.GetComponent<ProjectileImpactExplosion>(); if (Object.op_Implicit((Object)(object)component)) { ((ProjectileExplosion)component).blastDamageCoefficient = ticks + num; component.lifetimeAfterImpact = 0f; StopTicking(); } } } public void StopTicking() { ((MonoBehaviour)this).CancelInvoke(); ticks = 0f; } public void StartTicking() { ((MonoBehaviour)this).InvokeRepeating("Tick", 0f, 1f); } public void Tick() { ticks += 1f; } } public class Blink : BaseState { private Transform modelTransform; private float stopwatch; private Vector3 blinkVector = Vector3.zero; [SerializeField] public float duration = 0.3f; [SerializeField] public float speedCoefficient = 8f; [SerializeField] public string beginSoundString; [SerializeField] public string endSoundString; private CharacterModel characterModel; private HurtBoxGroup hurtboxGroup; public override void OnEnter() { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); AkSoundEngine.PostEvent(Sounds.Blink, ((Component)((EntityState)this).characterBody).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); hurtboxGroup = ((Component)modelTransform).GetComponent<HurtBoxGroup>(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount++; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup val = hurtboxGroup; int hurtBoxesDeactivatorCounter = val.hurtBoxesDeactivatorCounter + 1; val.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } blinkVector = GetBlinkVector(); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); } protected virtual Vector3 GetBlinkVector() { //IL_0021: 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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) return (((EntityState)this).isAuthority && ((EntityState)this).inputBank.skill1.down) ? ((EntityState)this).inputBank.moveVector : ((EntityState)this).inputBank.aimDirection; } private void CreateBlinkEffect(Vector3 origin) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(blinkVector); val.origin = origin; EffectManager.SpawnEffect(BlinkState.blinkPrefab, val, false); } public override void FixedUpdate() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += blinkVector * (base.moveSpeedStat * speedCoefficient * Time.fixedDeltaTime); } if (stopwatch >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).outer.destroying) { Util.PlaySound(endSoundString, ((EntityState)this).gameObject); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { CharacterModel component = ((Component)modelTransform).GetComponent<CharacterModel>(); TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val.duration = 0.6f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = Prefabs.Load<Material>("RoR2/Base/Huntress/matHuntressFlashBright.mat"); val.AddToCharacterModel(component); TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val2.duration = 0.7f; val2.animateShaderAlpha = true; val2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val2.destroyComponentOnEnd = true; val2.originalMaterial = Prefabs.Load<Material>("RoR2/Base/Huntress/matHuntressFlashExpanded.mat"); val2.AddToCharacterModel(component); } } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount--; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup val3 = hurtboxGroup; int hurtBoxesDeactivatorCounter = val3.hurtBoxesDeactivatorCounter - 1; val3.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } ((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 ChronoTriggers : BaseSkillState { private Transform modelTransform; private float stopwatch; private Vector3 blinkVector = Vector3.zero; [SerializeField] public float duration = 0.3f; [SerializeField] public float speedCoefficient = 8f; [SerializeField] public string beginSoundString; [SerializeField] public string endSoundString; private CharacterModel characterModel; private HurtBoxGroup hurtboxGroup; private float chargeDuration; private float charge; public float baseChargeDuration = 3f; public static float minCharge = 25f; private uint soundID; private bool playR1; private bool playR2; private bool playR3; public override void OnEnter() { ((BaseState)this).OnEnter(); playR1 = false; playR2 = false; playR3 = false; chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; Util.PlaySound(BaseChargeFist.enterSFXString, ((EntityState)this).gameObject); soundID = Util.PlaySound(BaseChargeFist.startChargeLoopSFXString, ((EntityState)this).gameObject); } public override void Update() { ((EntityState)this).Update(); float num = 100f * charge; if (!playR1 && num > 32f && num < 34f) { playR1 = true; AkSoundEngine.PostEvent(Sounds.blinkR1, ((Component)((EntityState)this).characterBody).gameObject); } if (!playR2 && num > 65f && num < 67f) { playR2 = true; AkSoundEngine.PostEvent(Sounds.blinkR2, ((Component)((EntityState)this).characterBody).gameObject); } if (!playR3 && num > 98f && num < 100f) { playR3 = true; AkSoundEngine.PostEvent(Sounds.blinkR3, ((Component)((EntityState)this).characterBody).gameObject); } Mathf.Clamp01(((EntityState)this).age / chargeDuration); } public override void FixedUpdate() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); charge = Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); AkSoundEngine.SetRTPCValueByPlayingID("loaderShift_chargeAmount", charge * 100f, soundID); ((EntityState)this).characterBody.SetSpreadBloom(charge, true); ((EntityState)this).characterBody.SetAimTimer(3f); if (((EntityState)this).isAuthority) { AuthorityFixedUpdate(); } } private void AuthorityFixedUpdate() { if (!ShouldKeepChargingAuthority()) { ((EntityState)this).outer.SetNextState(GetNextStateAuthority()); } } protected virtual bool ShouldKeepChargingAuthority() { return ((BaseSkillState)this).IsKeyDownAuthority(); } protected virtual EntityState GetNextStateAuthority() { float num = 100f * charge; if (num <= minCharge) { return (EntityState)(object)new Blink2 { speedCoefficient = 200f }; } return (EntityState)(object)new Blink2 { speedCoefficient = 8f * num }; } public override void OnExit() { ((EntityState)this).OnExit(); Util.PlaySound(BaseChargeFist.endChargeLoopSFXString, ((EntityState)this).gameObject); } 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 Blink2 : BaseState { private Transform modelTransform; private float stopwatch; private Vector3 blinkVector = Vector3.zero; [SerializeField] public float duration = 0.01f; [SerializeField] public float speedCoefficient = 8f; [SerializeField] public string beginSoundString; [SerializeField] public string endSoundString; private CharacterModel characterModel; private HurtBoxGroup hurtboxGroup; public override void OnEnter() { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); AkSoundEngine.PostEvent(Sounds.Blink, ((Component)((EntityState)this).characterBody).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); hurtboxGroup = ((Component)modelTransform).GetComponent<HurtBoxGroup>(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount++; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup val = hurtboxGroup; int hurtBoxesDeactivatorCounter = val.hurtBoxesDeactivatorCounter + 1; val.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } blinkVector = GetBlinkVector(); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); } protected virtual Vector3 GetBlinkVector() { //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; } private void CreateBlinkEffect(Vector3 origin) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(blinkVector); val.origin = origin; EffectManager.SpawnEffect(BlinkState.blinkPrefab, val, false); } public override void FixedUpdate() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += blinkVector * (base.moveSpeedStat * speedCoefficient * Time.fixedDeltaTime); } if (stopwatch >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).outer.destroying) { Util.PlaySound(endSoundString, ((EntityState)this).gameObject); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { CharacterModel component = ((Component)modelTransform).GetComponent<CharacterModel>(); TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val.duration = 0.6f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = Prefabs.Load<Material>("RoR2/Base/Huntress/matHuntressFlashBright.mat"); val.AddToCharacterModel(component); TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val2.duration = 0.7f; val2.animateShaderAlpha = true; val2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val2.destroyComponentOnEnd = true; val2.originalMaterial = Prefabs.Load<Material>("RoR2/Base/Huntress/matHuntressFlashExpanded.mat"); val2.AddToCharacterModel(component); } } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount--; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup val3 = hurtboxGroup; int hurtBoxesDeactivatorCounter = val3.hurtBoxesDeactivatorCounter - 1; val3.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } ((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 PartingGift : Recall { private float healAmount; private bool healed = false; public override void OnEnter() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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_008e: 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) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: 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) //IL_00d3: 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) base.OnEnter(); if (((EntityState)this).isAuthority) { FireProjectileInfo val = default(FireProjectileInfo); val.crit = ((BaseState)this).RollCrit(); val.damage = ((EntityState)this).characterBody.damage * 10f; val.damageTypeOverride = DamageTypeCombo.GenericSpecial; val.damageColorIndex = (DamageColorIndex)0; val.force = 500f; val.owner = ((EntityState)this).gameObject; val.position = ((EntityState)this).characterBody.footPosition; val.procChainMask = default(ProcChainMask); val.projectilePrefab = Prefabs.minePrefab; Ray aimRay = ((BaseState)this).GetAimRay(); val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction); val.useFuseOverride = false; val.useSpeedOverride = false; val.target = null; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } } public override void Heal() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (!(behaviour.lastRecordedHealth > ((EntityState)this).healthComponent.health)) { healAmount = behaviour.lastRecordedHealth - ((EntityState)this).healthComponent.health; if (NetworkServer.active) { ((EntityState)this).healthComponent.Heal(healAmount, default(ProcChainMask), true); } healed = true; } } public override void OnExit() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0034: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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) if (healed) { float num = 18f; EffectData val = new EffectData { origin = ((EntityState)this).characterBody.corePosition, scale = num }; EffectManager.SpawnEffect(Prefabs.Load<GameObject>("RoR2/Base/Lightning/LightningStrikeImpact.prefab"), val, false); if (((EntityState)this).isAuthority) { new BlastAttack { attacker = ((EntityState)this).gameObject, baseDamage = healAmount * 1000f, baseForce = healAmount * 1000f, crit = ((BaseState)this).RollCrit(), damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)0, procCoefficient = 1f, radius = num, position = ((EntityState)this).characterBody.corePosition, attackerFiltering = (AttackerFiltering)2, impactEffect = EffectCatalog.FindEffectIndexFromPrefab(Prefabs.Load<GameObject>("RoR2/Junk/Common/VFX/ImpactLightning.prefab")), teamIndex = ((EntityState)this).teamComponent.teamIndex }.Fire(); } } base.OnExit(); } } public class PulseBomb : BaseState { public static GameObject effectPrefab; public static GameObject projectilePrefab; public static float damageCoefficient; public static float force; public static float selfForce; private float duration; public int bulletCountCurrent = 1; public override void OnEnter() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = 0.1f; Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); ((EntityState)this).PlayAnimation("Gesture, Override", "BombThrow", "BombThrow.playbackRate", duration, 0f); if (((EntityState)this).isAuthority) { FireProjectileInfo val = default(FireProjectileInfo); val.crit = ((BaseState)this).RollCrit(); val.damage = ((EntityState)this).characterBody.damage * 10f; val.damageTypeOverride = DamageTypeCombo.GenericSecondary; val.damageColorIndex = (DamageColorIndex)0; val.force = 500f; val.owner = ((EntityState)this).gameObject; val.position = ((Ray)(ref aimRay)).origin; val.procChainMask = default(ProcChainMask); val.projectilePrefab = Prefabs.minePrefab; Ray aimRay2 = ((BaseState)this).GetAimRay(); val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay2)).direction); val.useFuseOverride = false; val.useSpeedOverride = false; val.target = null; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { Vector3 val3 = -((Ray)(ref aimRay)).direction * selfForce; val3.y *= 0.5f; ((EntityState)this).characterMotor.ApplyForce(val3, true, false); } if (!Object.op_Implicit((Object)(object)Prefabs.minePrefab.GetComponent<ProjectileStickOnImpact>())) { AkSoundEngine.PostEvent(Sounds.BombAttach, ((Component)((EntityState)this).characterBody).gameObject); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } 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 QuantumSpike : BaseState { public static GameObject effectPrefab; public static GameObject projectilePrefab; private float duration; public static SkillDef SkillDef; public static GenericSkill secondarySkillSlot; public override void OnEnter() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = 0.1f; ((EntityState)this).PlayAnimation("FullBody, Override", "BombThrow", "BombThrow.playbackRate", duration, 0f); SkillDef = ScriptableObject.CreateInstance<SkillDef>(); SkillDef.activationState = new SerializableEntityStateType(typeof(Detonate)); SkillDef.activationStateMachineName = "Detonate"; SkillDef.baseMaxStock = 1; SkillDef.baseRechargeInterval = 0f; SkillDef.beginSkillCooldownOnSkillEnd = true; SkillDef.canceledFromSprinting = false; SkillDef.fullRestockOnAssign = false; SkillDef.interruptPriority = (InterruptPriority)0; SkillDef.isCombatSkill = true; SkillDef.mustKeyPress = true; SkillDef.cancelSprintingOnActivation = false; SkillDef.rechargeStock = 0; SkillDef.requiredStock = 0; SkillDef.stockToConsume = 0; SkillDef.icon = Assets.icon2AltD; SkillDef.skillDescriptionToken = "TRACER_DETONATE_DESCRIPTION"; SkillDef.skillName = "TRACER_DETONATE"; SkillDef.skillNameToken = "TRACER_DETONATE"; secondarySkillSlot = (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) ? ((EntityState)this).skillLocator.secondary : null); if (Object.op_Implicit((Object)(object)secondarySkillSlot)) { secondarySkillSlot.SetSkillOverride((object)((EntityState)this).gameObject, SkillDef, (SkillOverridePriority)4); } Mine(); } public void Mine() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); if (((EntityState)this).isAuthority) { FireProjectileInfo val = default(FireProjectileInfo); val.crit = ((BaseState)this).RollCrit(); val.damage = ((EntityState)this).characterBody.damage * 2f; val.damageTypeOverride = DamageTypeCombo.GenericSecondary; val.damageColorIndex = (DamageColorIndex)0; val.force = 500f; val.owner = ((EntityState)this).gameObject; val.position = ((Ray)(ref aimRay)).origin; val.procChainMask = default(ProcChainMask); val.projectilePrefab = Prefabs.minePrefabAlt; Ray aimRay2 = ((BaseState)this).GetAimRay(); val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay2)).direction); val.useFuseOverride = false; val.useSpeedOverride = false; val.target = null; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { Vector3 val3 = -((Ray)(ref aimRay)).direction; val3.y *= 0.5f; ((EntityState)this).characterMotor.ApplyForce(val3, true, false); } if (!Object.op_Implicit((Object)(object)Prefabs.minePrefab.GetComponent<ProjectileStickOnImpact>())) { AkSoundEngine.PostEvent(Sounds.BombAttach, ((Component)((EntityState)this).characterBody).gameObject); } } public override void OnExit() { ((EntityState)this).OnExit(); if (!Object.op_Implicit((Object)(object)secondarySkillSlot)) { } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!Object.op_Implicit((Object)(object)secondarySkillSlot) || secondarySkillSlot.stock == 0) { } 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)7; } } public class Detonate : BaseState { private float duration = 0.1f; public override void OnEnter() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); TickingBombController component = ((EntityState)this).gameObject.GetComponent<TickingBombController>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.prefab)) { int itemCount = ((EntityState)this).characterBody.inventory.GetItemCount(ItemCatalog.FindItemIndex("SecondarySkillMagazine")); ProjectileImpactExplosion component2 = component.prefab.GetComponent<ProjectileImpactExplosion>(); if (Object.op_Implicit((Object)(object)component2)) { component.Detonate(itemCount * 3); } } if (Object.op_Implicit((Object)(object)QuantumSpike.secondarySkillSlot)) { QuantumSpike.secondarySkillSlot.UnsetSkillOverride((object)((EntityState)this).gameObject, QuantumSpike.SkillDef, (SkillOverridePriority)4); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)7; } } public class PulsePistols : BaseSkillState { private float duration; public static float baseDuration = 0.05f; public GameObject effectPrefab = Prefabs.Load<GameObject>("RoR2/Base/Huntress/OmniImpactVFXHuntress.prefab"); public GameObject hitEffectPrefab = Prefabs.hiteffect; public GameObject tracerEffectPrefab = Prefabs.tracer; private Animator animator; public float Delay = 0.3f; private bool buttonReleased; public string muzzleString; public string muzzleString1; public static string firePistolSoundString; private uint ShootID; private uint ReloadID; public bool hasFired; public override void OnEnter() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017c: 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_018b: 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_0198: 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_01ae: 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_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: 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_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: 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_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration; Ray aimRay = ((BaseState)this).GetAimRay(); animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f, false); muzzleString = "MuzzleR"; muzzleString1 = "MuzzleL"; EffectManager.SimpleMuzzleFlash(Prefabs.muzzleflash, ((EntityState)this).gameObject, muzzleString, false); EffectManager.SimpleMuzzleFlash(Prefabs.muzzleflash, ((EntityState)this).gameObject, muzzleString1, false); ShootID = AkSoundEngine.PostEvent(Sounds.SingleShot0, ((Component)((EntityState)this).characterBody).gameObject); if (!hasFired) { hasFired = true; ((BaseState)this).AddRecoil(-0.4f * FirePistol2.recoilAmplitude, -0.6f * FirePistol2.recoilAmplitude, -0.3f * FirePistol2.recoilAmplitude, 0.3f * FirePistol2.recoilAmplitude); } ((EntityState)this).PlayAnimation("Gesture, Override", "PulsePistols", "PulsePistols.playbackRate", duration * 0.5f, 0f); animator.SetBool("isShooting", true); if ((float)((EntityState)this).characterBody.skillLocator.primary.stock <= 0f) { AkSoundEngine.PostEvent(Sounds.Reload, ((Component)((EntityState)this).characterBody).gameObject); } if (((EntityState)this).isAuthority) { new BulletAttack { falloffModel = (FalloffModel)1, owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0.15f, maxSpread = 0.3f, bulletCount = 1u, procCoefficient = 0.5f, damage = ((EntityState)this).characterBody.damage * ((BaseState)this).attackSpeedStat * 0.3f, force = 40f, tracerEffectPrefab = tracerEffectPrefab, hitEffectPrefab = hitEffectPrefab, muzzleName = muzzleString, isCrit = ((BaseState)this).RollCrit(), smartCollision = true, maxDistance = 300f }.Fire(); new BulletAttack { falloffModel = (FalloffModel)1, owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0.15f, maxSpread = 0.3f, bulletCount = 1u, procCoefficient = 0.5f, damage = ((EntityState)this).characterBody.damage * ((BaseState)this).attackSpeedStat * 0.3f, force = 40f, tracerEffectPrefab = tracerEffectPrefab, hitEffectPrefab = hitEffectPrefab, muzzleName = muzzleString1, isCrit = ((BaseState)this).RollCrit(), smartCollision = true, maxDistance = 300f }.Fire(); } } public override void OnExit() { animator.SetBool("isShooting", false); ((EntityState)this).PlayAnimation("Reload", "Reload", "Reload.playbackRate", duration, 0f); AkSoundEngine.StopPlayingID(ShootID); ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { ((EntityState)this).skillLocator.primary.rechargeStopwatch = 0f; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class Recall : BaseState { public float duration = 0.91f; private Transform modelTransform; public static GameObject blinkPrefab; private Vector3 direction; public string beginSoundString; public string endSoundString; private CharacterModel characterModel; private HurtBoxGroup hurtboxGroup; public RecallBehaviour behaviour; private int index; private float timeBetweenPositions; private float speed; private float distance; public override void OnEnter() { //IL_007f: 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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); behaviour = ((EntityState)this).GetComponent<RecallBehaviour>(); behaviour.track = false; index = behaviour.positions.Count - 1; timeBetweenPositions = duration / (float)behaviour.positions.Count; behaviour.camera.isCutscene = true; for (int i = 0; i < behaviour.positions.Count - 1; i++) { distance += Vector3.Distance(behaviour.positions[i], behaviour.positions[i + 1]); } speed = distance / duration; AkSoundEngine.PostEvent(Sounds.Recall, ((Component)((EntityState)this).characterBody).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).direction; direction = -val; direction.y = 0f; direction = ((Vector3)(ref direction)).normalized; modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); hurtboxGroup = ((Component)modelTransform).GetComponent<HurtBoxGroup>(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount++; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup val2 = hurtboxGroup; int hurtBoxesDeactivatorCounter = val2.hurtBoxesDeactivatorCounter + 1; val2.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); Heal(); } public virtual void Heal() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { ((EntityState)this).healthComponent.Heal(((EntityState)this).healthComponent.fullHealth * 0.25f, default(ProcChainMask), true); Util.CleanseBody(((EntityState)this).characterBody, true, false, false, true, true, false); } } private void CreateBlinkEffect(Vector3 origin) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(direction); val.origin = origin; EffectManager.SpawnEffect(BlinkState.blinkPrefab, val, false); } public override void FixedUpdate() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0154: 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_009d: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!Object.op_Implicit((Object)(object)behaviour)) { return; } ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(Vector3.Lerp(((EntityState)this).transform.position, behaviour.positions[index], speed), true); if (((EntityState)this).isAuthority) { ((Component)behaviour.camera).transform.position = Vector3.Lerp(((Component)behaviour.camera).transform.position, behaviour.camPositions[index], speed); ((Component)behaviour.camera).transform.rotation = Quaternion.Lerp(((Component)behaviour.camera).transform.rotation, behaviour.rotations[index], speed); } ((EntityState)this).characterDirection.forward = Vector3.Lerp(((EntityState)this).characterDirection.forward, behaviour.directions[index], speed); if (((EntityState)this).transform.position == behaviour.positions[index]) { if (Object.op_Implicit((Object)(object)behaviour.models[index])) { EntityState.Destroy((Object)(object)behaviour.models[index]); behaviour.models.RemoveAt(index); } index--; } if (((EntityState)this).isAuthority && index == 0) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) behaviour.Reset(); if (!((EntityState)this).outer.destroying) { Util.PlaySound(endSoundString, ((EntityState)this).gameObject); CreateBlinkEffect(((EntityState)this).characterBody.corePosition); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { CharacterModel component = ((Component)modelTransform).GetComponent<CharacterModel>(); TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val.duration = 1.25f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashBright"); val.AddToCharacterModel(component); TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val2.duration = 1.35f; val2.animateShaderAlpha = true; val2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val2.destroyComponentOnEnd = true; val2.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashExpanded"); val2.AddToCharacterModel(component); } } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount--; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup val3 = hurtboxGroup; int hurtBoxesDeactivatorCounter = val3.hurtBoxesDeactivatorCounter - 1; val3.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } ((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; } } internal class Prefabs { public static GameObject Crosshair; public static GameObject minePrefab; public static GameObject minePrefabAlt; public static GameObject muzzleflash; public static GameObject hiteffect; public static GameObject tracer; public static GameObject tracerModel; public static GameObject afterImageBase; public static Material mat; public static ItemDef stopwatch; internal static T Load<T>(string path) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Addressables.LoadAssetAsync<T>((object)path).WaitForCompletion(); } public static Material InstantiateMaterial(Texture tex, Texture norm = null) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) Material val = new Material(Load<Shader>("RoR2/Base/Shaders/HGStandard.shader")); if (Object.op_Implicit((Object)(object)val)) { val.SetColor("_Color", Color.white); val.SetTexture("_MainTex", tex); val.SetFloat("_NormalStrength", 1f); val.SetTexture("_NormalTex", norm); return val; } return val; } internal static void CreatePrefabs() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Expected O, but got Unknown //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_030d: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) afterImageBase = PrefabAPI.InstantiateClone(new GameObject("AfterImage", new Type[3] { typeof(MeshFilter), typeof(MeshRenderer), typeof(TracerAfterImageBehaviour) }), "AfterImageBase", false); LanguageAPI.Add("TRACER_STOPWATCH", "Strange Stopwatch"); LanguageAPI.Add("TRACER_STOPWATCH_DESCRIPTION", "At the start of each stage, time falls back by <style=cIsUtility>1m <style=cStack>(+1m per stack)</style></style>."); LanguageAPI.Add("TRACER_STOPWATCH_PICKUP", "Go back in time!"); LanguageAPI.Add("TRACER_STOPWATCH_LORE", "Order: Strange Stopwatch\r\nTracking Number: 826******\r\nEstimated Delivery: 02/06/1917\r\nShipping Method: Priority\r\nShipping Address: 20004 Washington, DC\r\nShipping Details:\r\n\r\n" + Environment.NewLine); GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>("stopwatch"); Renderer[] componentsInChildren = val.GetComponentsInChildren<Renderer>(); componentsInChildren[0].material = Load<Material>("RoR2/DLC1/HealingPotion/matHealingPotionGlass.mat"); componentsInChildren[1].material = InstantiateMaterial((Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("stopwatch_d"), (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("stopwatch_n")); stopwatch = ScriptableObject.CreateInstance<ItemDef>(); stopwatch.pickupModelPrefab = val; ((Object)stopwatch).name = "TracerStopwatchItem"; stopwatch.nameToken = "TRACER_STOPWATCH"; stopwatch.descriptionToken = "TRACER_STOPWATCH_DESCRIPTION"; stopwatch.pickupToken = "TRACER_STOPWATCH_PICKUP"; stopwatch.loreToken = "TRACER_STOPWATCH_LORE"; stopwatch.deprecatedTier = (ItemTier)2; ItemDef obj = stopwatch; ItemTag[] array = new ItemTag[4]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); obj.tags = (ItemTag[])(object)array; stopwatch.pickupIconSprite = Assets.MainAssetBundle.LoadAsset<Sprite>("stopwatchIcon3"); ContentAddition.AddItemDef(stopwatch); mat = Object.Instantiate<Material>(Load<Material>("RoR2/Base/Huntress/matHuntressFlashBright.mat")); mat.SetFloat("_ExternalAlpha", 0f); Crosshair = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/UI/SimpleDotCrosshair.prefab"), "TracerCrosshair", false); Object.Destroy((Object)(object)Crosshair.GetComponent<RawImage>()); foreach (object item in Crosshair.transform) { Object.Destroy((Object)(object)((Component)(Transform)item).gameObject); } Crosshair.GetComponent<CrosshairController>().spriteSpreadPositions = Array.Empty<SpritePosition>(); GameObject val2 = new GameObject("TracerCrosshairImage", new Type[1] { typeof(RectTransform) }); Transform transform = val2.transform; RectTransform val3 = (RectTransform)(object)((transform is RectTransform) ? transform : null); ((Transform)val3).localPosition = Vector2.op_Implicit(new Vector2(0f, 0f)); val3.SetSizeWithCurrentAnchors((Axis)0, Tracer.crosshairSize.Value); val3.SetSizeWithCurrentAnchors((Axis)1, Tracer.crosshairSize.Value); val2.transform.SetParent(Crosshair.transform); val2.AddComponent<Image>().sprite = Assets.MainAssetBundle.LoadAsset<Sprite>("crosshair"); val2.GetComponent<Image>().preserveAspect = true; ((Transform)((Graphic)val2.GetComponent<Image>()).rectTransform).localPosition = new Vector3(0f, -8f, 0f); minePrefab = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Commando/CommandoGrenadeProjectile.prefab"), "TracerMinePrefab", true); ProjectileController component = minePrefab.GetComponent<ProjectileController>(); ProjectileStickOnImpact val4 = minePrefab.AddComponent<ProjectileStickOnImpact>(); ProjectileImpactExplosion component2 = minePrefab.GetComponent<ProjectileImpactExplosion>(); Object.Destroy((Object)(object)minePrefab.GetComponent<ProjectileDeployToOwner>()); GameObject val5 = PrefabAPI.InstantiateClone(Assets.pulseBombmdl, "CommandoGrenadeGhost", true); Object.Destroy((Object)(object)val5.GetComponent<ProjectileDeployToOwner>()); val5.AddComponent<NetworkIdentity>(); val5.AddComponent<ProjectileGhostController>(); component.ghostPrefab = val5; component.allowPrediction = false; val4.ignoreCharacters = false; val4.ignoreWorld = false; ((ProjectileExplosion)component2).blastRadius = 20f; tracer = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Commando/TracerCommandoShotgun.prefab"), "TracerTracer", false); Tracer component3 = tracer.GetComponent<Tracer>(); component3.speed = 260f; component3.beamDensity = 5f; component3.length = 5f; ((Renderer)tracer.GetComponent<LineRenderer>()).material.SetTextureScale("_MainTex", new Vector2(0.4f, 1f)); Object.Destroy((Object)(object)tracer.GetComponent<DetachTrailOnDestroy>()); Object.Destroy((Object)(object)tracer.GetComponentInChildren<TrailRenderer>()); ContentAddition.AddEffect(tracer); hiteffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Junk/Huntress/ImpactHuntress.prefab"), "TracerPulseHitEffect", false); ParticleSystemRenderer[] componentsInChildren2 = hiteffect.GetComponentsInChildren<ParticleSystemRenderer>(); ((Renderer)componentsInChildren2[0]).material = Load<Material>("RoR2/Base/LunarGolem/matLunarGolemMuzzleFlash.mat"); ((Component)componentsInChildren2[0]).transform.localScale = Vector3.one * 0.6f; ((Renderer)componentsInChildren2[1]).material = Load<Material>("RoR2/Base/LunarWisp/matLunarWispBombTrail.mat"); ((Renderer)componentsInChildren2[1]).material.SetColor("_TintColor", new Color(0.066666f, 0.286274f, 255f)); ((Component)componentsInChildren2[1]).transform.localScale = Vector3.one * 0.6f; ContentAddition.AddEffect(hiteffect); muzzleflash = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Commando/MuzzleflashFMJ.prefab"), "TracerPulseMuzzleFlash", false); ParticleSystemRenderer[] componentsInChildren3 = muzzleflash.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val6 in componentsInChildren3) { ((Component)val6).transform.localScale = Vector3.one * 0.55f; } ContentAddition.AddEffect(muzzleflash); GameObject val7 = PrefabAPI.InstantiateClone(Assets.pulseBombmdl, "TracerPulseBombAltGhost", true); Object.Destroy((Object)(object)val7.GetComponent<ProjectileDeployToOwner>()); val7.AddComponent<NetworkIdentity>(); val7.AddComponent<ProjectileGhostController>(); minePrefabAlt = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Commando/CommandoGrenadeProjectile.prefab"), "TracerMinePrefabAlt", true); minePrefabAlt.AddComponent<MineBehaviour>(); ProjectileController component4 = minePrefabAlt.GetComponent<ProjectileController>(); ProjectileStickOnImpact val8 = minePrefabAlt.AddComponent<ProjectileStickOnImpact>(); ProjectileImpactExplosion component5 = minePrefabAlt.GetComponent<ProjectileImpactExplosion>(); ProjectileDamage component6 = minePrefabAlt.GetComponent<ProjectileDamage>(); ProjectileSimple component7 = minePrefabAlt.GetComponent<ProjectileSimple>(); Object.Destroy((Object)(object)minePrefabAlt.GetComponent<ProjectileDeployToOwner>()); component4.ghostPrefab = val7; component4.allowPrediction = false; val8.ignoreCharacters = false; val8.ignoreWorld = false; ((ProjectileExplosion)component5).blastRadius = 1f; component5.lifetimeAfterImpact = 999999f; component5.lifetime = 999999f; component7.lifetime = 999999f; ContentAddition.AddProjectile(minePrefab); ContentAddition.AddProjectile(minePrefabAlt); } } public static class Sounds { public static readonly uint Reload = 456382354u; public static readonly uint BombThrow = 1325857779u; public static readonly uint BombAttach = 1375977958u; public static readonly uint PulsePistols = 2314892076u; public static readonly uint Blink = 3379926649u; public static readonly uint Recall = 3886774750u; public static readonly uint BombExplosion = 3910346330u; public static readonly uint SingleShot = 4085013133u; public static readonly uint SingleShot0 = 3653405639u; public static readonly uint Cringe = 3508439051u; public static readonly uint blinkR3 = 1541516824u; public static readonly uint blinkR2 = 1541516825u; public static readonly uint blinkR1 = 1541516826u; } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Dragonyck.Tracer", "Tracer", "1.6.4")] public class Tracer : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.Tracer"; public static GameObject characterPrefab; public GameObject characterDisplay; public GameObject doppelganger; public static ConfigEntry<float> crosshairSize; public static ConfigEntry<bool> performanceMode; public static ConfigEntry<bool> potatoMode; private static readonly Color characterColor = new Color(1f, 0.7f, 0f); public static event Action<float> onTimeReduced; private void Awake() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0030: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0060: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0090: Expected O, but got Unknown crosshairSize = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Crosshair Size", "Size"), 40f, new ConfigDescription("Changes the size of the crosshair.", (AcceptableValueBase)null, Array.Empty<object>())); performanceMode = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Performance Trails", "Enable"), false, new ConfigDescription("Stores less Recall data on positions, rotations, trails, etc. Can be used with NO Trails for even better performance.", (AcceptableValueBase)null, Array.Empty<object>())); potatoMode = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("NO Trails", "Enable"), false, new ConfigDescription("No Recall trails.", (AcceptableValueBase)null, Array.Empty<object>())); Stage.onStageStartGlobal += delegate { float num = 0f; foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList) { if (Object.op_Implicit((Object)(object)readOnlyInstances.inventory)) { int itemCount = readOnlyInstances.inventory.GetItemCount(Prefabs.stopwatch); if (itemCount > 0) { num += (float)(60 * itemCount); } } } if (num > 0f) { if (NetworkServer.active) { float runStopwatch = Run.instance.GetRunStopwatch(); Run.instance.SetRunStopwatch((num > runStopwatch) ? 0f : (runStopwatch - num)); } Tracer.onTimeReduced?.Invoke(Run.instance.GetRunStopwatch()); } }; Assets.PopulateAssets(); Achievements.RegisterUnlockables(); Prefabs.CreatePrefabs(); CreatePrefab(); RegisterStates(); RegisterCharacter(); CreateDoppelganger(); } private static GameObject CreateModel(GameObject main) { Object.Destroy((Object)(object)((Component)main.transform.Find("ModelBase")).gameObject); Object.Destroy((Object)(object)((Component)main.transform.Find("CameraPivot")).gameObject); Object.Destroy((Object)(object)((Component)main.transform.Find("AimOrigin")).gameObject); return Assets.MainAssetBundle.LoadAsset<GameObject>("Tracermdl"); } internal static void CreatePrefab() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0093: 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_00c4: 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_00da: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0182: 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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: 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_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Unknown result type (might be due to invalid IL or missing references) //IL_049c: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_059e: Unknown result type (might be due to invalid IL or missing references) //IL_05a0: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_05e7: Unknown result type (might be due to invalid IL or missing references) //IL_05f4: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_064a: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_0655: Unknown result type (might be due to invalid IL or missing references) //IL_0693: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Unknown result type (might be due to invalid IL or missing references) //IL_06e9: Unknown result type (might be due to invalid IL or missing references) //IL_06f6: Unknown result type (might be due to invalid IL or missing references) //IL_06f8: Unknown result type (might be due to invalid IL or missing references) //IL_0701: Unknown result type (might be due to invalid IL or missing references) //IL_073f: Unknown result type (might be due to invalid IL or missing references) //IL_074c: Unknown result type (might be due to invalid IL or missing references) //IL_074e: Unknown result type (might be due to invalid IL or missing references) //IL_0833: Unknown result type (might be due to invalid IL or missing references) //IL_086b: Unknown result type (might be due to invalid IL or missing references) //IL_0891: Unknown result type (might be due to invalid IL or missing references) //IL_0893: Unknown result type (might be due to invalid IL or missing references) //IL_089c: Unknown result type (might be due to invalid IL or missing references) //IL_08c2: Unknown result type (might be due to invalid IL or missing references) //IL_08c4: Unknown result type (might be due to invalid IL or missing references) //IL_08cd: Unknown result type (might be due to invalid IL or missing references) //IL_08f3: Unknown result type (might be due to invalid IL or missing references) //IL_08f5: Unknown result type (might be due to invalid IL or missing references) //IL_08fe: Unknown result type (might be due to invalid IL or missing references) //IL_0924: Unknown result type (might be due to invalid IL or missing references) //IL_0926: Unknown result type (might be due to invalid IL or missing references) //IL_092f: Unknown result type (might be due to invalid IL or missing references) //IL_0955: Unknown result type (might be due to invalid IL or missing references) //IL_0957: Unknown result type (might be due to invalid IL or missing references) //IL_0960: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_0988: Unknown result type (might be due to invalid IL or missing references) //IL_0991: Unknown result type (might be due to invalid IL or missing references) //IL_09b7: Unknown result type (might be due to invalid IL or missing references) //IL_09b9: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09e8: Unknown result type (might be due to invalid IL or missing references) //IL_09ea: Unknown result type (might be due to invalid IL or missing references) //IL_0a0d: Unknown result type (might be due to invalid IL or missing references) //IL_0a2a: Unknown result type (might be due to invalid IL or missing references) //IL_0a2c: Unknown result type (might be due to invalid IL or missing references) //IL_0a35: Unknown result type (might be due to invalid IL or missing references) //IL_0a71: Unknown result type (might be due to invalid IL or missing references) //IL_0a73: Unknown result type (might be due to invalid IL or missing references) //IL_0a7c: Unknown result type (might be due to invalid IL or missing references) //IL_0ab8: Unknown result type (might be due to invalid IL or missing references) //IL_0aba: Unknown result type (might be due to invalid IL or missing references) //IL_0ac3: Unknown result type (might be due to invalid IL or missing references) //IL_0aff: Unknown result type (might be due to invalid IL or missing references) //IL_0b01: Unknown result type (might be due to invalid IL or missing references) //IL_0b0a: Unknown result type (might be due to invalid IL or missing references) //IL_0b46: Unknown result type (might be due to invalid IL or missing references) //IL_0b48: Unknown result type (might be due to invalid IL or missing references) //IL_0b51: Unknown result type (might be due to invalid IL or missing references) //IL_0b8d: Unknown result type (might be due to invalid IL or missing references) //IL_0b8f: Unknown result type (might be due to invalid IL or missing references) //IL_0b98: Unknown result type (might be due to invalid IL or missing references) //IL_0bd4: Unknown result type (might be due to invalid IL or missing references) //IL_0bd6: Unknown result type (might be due to invalid IL or missing references) //IL_0bdf: Unknown result type (might be due to invalid IL or missing references) //IL_0c1b: Unknown result type (might be due to invalid IL or missing references) //IL_0c1d: Unknown result type (might be due to invalid IL or missing references) //IL_0c26: Unknown result type (might be due to invalid IL or missing references) //IL_0c62: Unknown result type (might be due to invalid IL or missing references) //IL_0c64: Unknown result type (might be due to invalid IL or missing references) //IL_0ca5: Unknown result type (might be due to invalid IL or missing references) //IL_0d09: Unknown result type (might be due to invalid IL or missing references) //IL_0d34: Unknown result type (might be due to invalid IL or missing references) //IL_0e2c: Unknown result type (might be due to invalid IL or missing references) //IL_0e57: Unknown result type (might be due to invalid IL or missing references) //IL_0f27: Unknown result type (might be due to invalid IL or missing references) //IL_0f52: Unknown result type (might be due to invalid IL or missing references) //IL_0fe0: Unknown result type (might be due to invalid IL or missing references) //IL_100b: Unknown result type (might be due to invalid IL or missing references) //IL_1167: Unknown result type (might be due to invalid IL or missing references) //IL_1172: Unknown result type (might be due to invalid IL or missing references) //IL_11aa: Unknown result type (might be due to invalid IL or missing references) //IL_11d0: Unknown result type (might be due to invalid IL or missing references) //IL_11d2: Unknown result type (might be due to invalid IL or missing references) //IL_11db: Unknown result type (might be due to invalid IL or missing references) //IL_1201: Unknown result type (might be due to invalid IL or missing references) //IL_1203: Unknown result type (might be due to invalid IL or missing references) //IL_120c: Unknown result type (might be due to invalid IL or missing references) //IL_1232: Unknown result type (might be due to invalid IL or missing references) //IL_1234: Unknown result type (might be due to invalid IL or missing references) //IL_123d: Unknown result type (might be due to invalid IL or missing references) //IL_1263: Unknown result type (might be due to invalid IL or missing references) //IL_1265: Unknown result type (might be due to invalid IL or missing references) //IL_126e: Unknown result type (might be due to invalid IL or missing references) //IL_1294: Unknown result type (might be due to invalid IL or missing references) //IL_1296: Unknown result type (might be due to invalid IL or missing references) //IL_129f: Unknown result type (might be due to invalid IL or missing references) //IL_12c5: Unknown result type (might be due to invalid IL or missing references) //IL_12c7: Unknown result type (might be due to invalid IL or missing references) //IL_12e9: Unknown result type (might be due to invalid IL or missing references) //IL_130e: Unknown result type (might be due to invalid IL or missing references) //IL_1310: Unknown result type (might be due to invalid IL or missing references) //IL_1319: Unknown result type (might be due to invalid IL or missing references) //IL_1349: Unknown result type (might be due to invalid IL or missing references) //IL_134b: Unknown result type (might be due to invalid IL or missing references) //IL_1354: Unknown result type (might be due to invalid IL or missing references) //IL_1384: Unknown result type (might be due to invalid IL or missing references) //IL_1386: Unknown result type (might be due to invalid IL or missing references) //IL_138f: Unknown result type (might be due to invalid IL or missing references) //IL_13bf: Unknown result type (might be due to invalid IL or missing references) //IL_13c1: Unknown result type (might be due to invalid IL or missing references) //IL_13ca: Unknown result type (might be due to invalid IL or missing references) //IL_13fa: Unknown result type (might be due to invalid IL or missing references) //IL_13fc: Unknown result type (might be due to invalid IL or missing references) //IL_1405: Unknown result type (might be due to invalid IL or missing references) //IL_1435: Unknown result type (might be due to invalid IL or missing references) //IL_1437: Unknown result type (might be due to invalid IL or missing references) //IL_1440: Unknown result type (might be due to invalid IL or missing references) //IL_1470: Unknown result type (might be due to invalid IL or missing references) //IL_1472: Unknown result type (might be due to invalid IL or missing references) //IL_147b: Unknown result type (might be due to invalid IL or missing references) //IL_14ab: Unknown result type (might be due to invalid