Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Lee Hyperreal v2.2.0
LeeHyperrealMod/LeeHyperrealMod.dll
Decompiled 4 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; 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.Cryptography; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EmotesAPI; using EntityStates; using EntityStates.BrotherMonster; using EntityStates.Commando; using EntityStates.GolemMonster; using EntityStates.SurvivorPod; using ExtraSkillSlots; using HG; using HG.BlendableTypes; using HunkHud.Components.UI; using KinematicCharacterController; using LeeHyperrealMod.Content.Controllers; using LeeHyperrealMod.Content.Notifications; using LeeHyperrealMod.Modules; using LeeHyperrealMod.Modules.Characters; using LeeHyperrealMod.Modules.Networking; using LeeHyperrealMod.Modules.Notifications; using LeeHyperrealMod.Modules.Survivors; using LeeHyperrealMod.ParticleScripts; using LeeHyperrealMod.SkillStates; using LeeHyperrealMod.SkillStates.BaseStates; using LeeHyperrealMod.SkillStates.LeeHyperreal; using LeeHyperrealMod.SkillStates.LeeHyperreal.DomainShift; using LeeHyperrealMod.SkillStates.LeeHyperreal.Evade; using LeeHyperrealMod.SkillStates.LeeHyperreal.Primary; using LeeHyperrealMod.SkillStates.LeeHyperreal.RedOrb; using LeeHyperrealMod.SkillStates.LeeHyperreal.Secondary; using LeeHyperrealMod.SkillStates.LeeHyperreal.Ultimate; using LeeHyperrealMod.SkillStates.LeeHyperreal.YellowOrb; using LeeHyperrealMod.SkillStates.LeeHyperrealSurvivorPod; using MonoMod.RuntimeDetour; using On.EntityStates.GolemMonster; using On.RoR2; using On.RoR2.CharacterSpeech; using On.RoR2.UI; using On.RoR2.UI.MainMenu; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using Rewired; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.CharacterSpeech; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using RoR2.SurvivorMannequins; using RoR2.UI; using RoR2.UI.MainMenu; using ShaderSwapper; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Animations; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.ResourceManagement.ResourceLocations; 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 = ".NET Standard 2.1")] [assembly: AssemblyCompany("LeeHyperrealMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+5dd8137ce5cbfa37b42135e23ccf43868f0d154c")] [assembly: AssemblyProduct("LeeHyperrealMod")] [assembly: AssemblyTitle("LeeHyperrealMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] namespace ShaderSwapper { public static class ShaderSwapper { [CompilerGenerated] private sealed class <UpgradeStubbedShaderAsync>d__4 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Material material; private string <cachedShaderName>5__1; private AsyncOperationHandle<IList<IResourceLocation>> <loadResourceLocations>5__2; private AsyncOperationHandle<Shader> <loadShader>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <UpgradeStubbedShaderAsync>d__4(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) <cachedShaderName>5__1 = null; <loadResourceLocations>5__2 = default(AsyncOperationHandle<IList<IResourceLocation>>); <loadShader>5__3 = default(AsyncOperationHandle<Shader>); <>1__state = -2; } private bool MoveNext() { //IL_009e: 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_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)material == (Object)null) { throw new ArgumentNullException("material"); } <cachedShaderName>5__1 = ((Object)material.shader).name; if (!<cachedShaderName>5__1.StartsWith("Stubbed")) { return false; } <loadResourceLocations>5__2 = Addressables.LoadResourceLocationsAsync((object)(<cachedShaderName>5__1.Substring(7) + ".shader"), typeof(Shader)); goto IL_00c3; case 1: <>1__state = -1; goto IL_00c3; case 2: { <>1__state = -1; break; } IL_00c3: if (!<loadResourceLocations>5__2.IsDone) { <>2__current = null; <>1__state = 1; return true; } if (<loadResourceLocations>5__2.Result.Count <= 0) { return false; } <loadShader>5__3 = Addressables.LoadAssetAsync<Shader>(<loadResourceLocations>5__2.Result[0]); break; } if (!<loadShader>5__3.IsDone) { <>2__current = null; <>1__state = 2; return true; } SwapShader(material, <loadShader>5__3.Result); Array.Resize(ref _, _.Length + 1); _[_.Length - 1] = (Object)(object)material; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <UpgradeStubbedShadersAsync>d__3 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AssetBundle assetBundle; private AssetBundleRequest <loadMaterials>5__1; private Object[] <allMaterials>5__2; private int <materialCount>5__3; private List<AsyncOperationHandle> <loadResourceLocationsOperations>5__4; private AsyncOperationHandle<IList<AsyncOperationHandle>> <loadResourceLocationsGroup>5__5; private List<IResourceLocation> <resourceLocations>5__6; private AsyncOperationHandle<IList<Shader>> <loadShaders>5__7; private int <startIndex>5__8; private int <i>5__9; private string <cachedShaderName>5__10; private int <j>5__11; private int <i>5__12; private IList<IResourceLocation> <result>5__13; private int <j>5__14; private int <i>5__15; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <UpgradeStubbedShadersAsync>d__3(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { //IL_001b: 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) <loadMaterials>5__1 = null; <allMaterials>5__2 = null; <loadResourceLocationsOperations>5__4 = null; <loadResourceLocationsGroup>5__5 = default(AsyncOperationHandle<IList<AsyncOperationHandle>>); <resourceLocations>5__6 = null; <loadShaders>5__7 = default(AsyncOperationHandle<IList<Shader>>); <cachedShaderName>5__10 = null; <result>5__13 = null; <>1__state = -2; } private bool MoveNext() { //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_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_0388: 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_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)assetBundle == (Object)null) { throw new ArgumentNullException("assetBundle"); } <loadMaterials>5__1 = assetBundle.LoadAllAssetsAsync<Material>(); goto IL_007f; case 1: <>1__state = -1; goto IL_007f; case 2: <>1__state = -1; goto IL_0236; case 3: { <>1__state = -1; break; } IL_0236: if (!<loadResourceLocationsGroup>5__5.IsDone) { <>2__current = null; <>1__state = 2; return true; } <resourceLocations>5__6 = new List<IResourceLocation>(<materialCount>5__3); <i>5__12 = <materialCount>5__3 - 1; while (<i>5__12 >= 0) { AsyncOperationHandle val = <loadResourceLocationsGroup>5__5.Result[<i>5__12]; <result>5__13 = (IList<IResourceLocation>)((AsyncOperationHandle)(ref val)).Result; if (<result>5__13.Count > 0) { <resourceLocations>5__6.Add(<result>5__13[0]); } else { <materialCount>5__3--; <j>5__14 = <materialCount>5__3 - <i>5__12; while (<j>5__14 < <materialCount>5__3) { <allMaterials>5__2[<j>5__14] = <allMaterials>5__2[<j>5__14 + 1]; <j>5__14++; } } <result>5__13 = null; <i>5__12--; } if (<materialCount>5__3 <= 0) { return false; } <loadShaders>5__7 = Addressables.LoadAssetsAsync<Shader>((IList<IResourceLocation>)<resourceLocations>5__6, (Action<Shader>)null, false); break; IL_007f: if (!((AsyncOperation)<loadMaterials>5__1).isDone) { <>2__current = null; <>1__state = 1; return true; } <allMaterials>5__2 = <loadMaterials>5__1.allAssets; <materialCount>5__3 = <allMaterials>5__2.Length; if (<materialCount>5__3 <= 0) { return false; } <loadResourceLocationsOperations>5__4 = new List<AsyncOperationHandle>(<materialCount>5__3); <i>5__9 = <materialCount>5__3 - 1; while (<i>5__9 >= 0) { <cachedShaderName>5__10 = ((Object)((Material)<allMaterials>5__2[<i>5__9]).shader).name; if (<cachedShaderName>5__10.StartsWith("Stubbed")) { <loadResourceLocationsOperations>5__4.Add(AsyncOperationHandle<IList<IResourceLocation>>.op_Implicit(Addressables.LoadResourceLocationsAsync((object)(<cachedShaderName>5__10.Substring(7) + ".shader"), typeof(Shader)))); } else { <materialCount>5__3--; <j>5__11 = <i>5__9; while (<j>5__11 < <materialCount>5__3) { <allMaterials>5__2[<j>5__11] = <allMaterials>5__2[<j>5__11 + 1]; <j>5__11++; } } <cachedShaderName>5__10 = null; <i>5__9--; } if (<materialCount>5__3 <= 0) { return false; } <loadResourceLocationsGroup>5__5 = Addressables.ResourceManager.CreateGenericGroupOperation(<loadResourceLocationsOperations>5__4, false); goto IL_0236; } if (!<loadShaders>5__7.IsDone) { <>2__current = null; <>1__state = 3; return true; } <startIndex>5__8 = _.Length; Array.Resize(ref _, <startIndex>5__8 + <materialCount>5__3); <i>5__15 = 0; while (<i>5__15 < <materialCount>5__3) { SwapShader((Material)<allMaterials>5__2[<i>5__15], <loadShaders>5__7.Result[<i>5__15]); _[<startIndex>5__8 + <i>5__15] = <allMaterials>5__2[<i>5__15]; <i>5__15++; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const string PREFIX = "Stubbed"; private const int PREFIX_LENGTH = 7; private static Object[] _ = Array.Empty<Object>(); [IteratorStateMachine(typeof(<UpgradeStubbedShadersAsync>d__3))] public static IEnumerator UpgradeStubbedShadersAsync(this AssetBundle assetBundle) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <UpgradeStubbedShadersAsync>d__3(0) { assetBundle = assetBundle }; } [IteratorStateMachine(typeof(<UpgradeStubbedShaderAsync>d__4))] public static IEnumerator UpgradeStubbedShaderAsync(Material material) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <UpgradeStubbedShaderAsync>d__4(0) { material = material }; } public static void UpgradeStubbedShaders(this AssetBundle assetBundle) { if ((Object)(object)assetBundle == (Object)null) { throw new ArgumentNullException("assetBundle"); } Material[] array = assetBundle.LoadAllAssets<Material>(); foreach (Material material in array) { UpgradeStubbedShader(material); } } public static void UpgradeStubbedShader(Material material) { //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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)material == (Object)null) { throw new ArgumentNullException("material"); } string name = ((Object)material.shader).name; if (name.StartsWith("Stubbed")) { IList<IResourceLocation> list = Addressables.LoadResourceLocationsAsync((object)(name.Substring(7) + ".shader"), typeof(Shader)).WaitForCompletion(); if (list.Count > 0) { SwapShader(material, Addressables.LoadAssetAsync<Shader>(list[0]).WaitForCompletion()); Array.Resize(ref _, _.Length + 1); _[_.Length - 1] = (Object)(object)material; } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] private static void SwapShader(Material material, Shader shader) { int renderQueue = material.renderQueue; material.shader = shader; material.renderQueue = renderQueue; } } } namespace UnityEngine.Rendering { public enum ParticleBlendModes { Opaque, Cutout, Fade, Transparent, Additive, Subtractive, Modulate } } namespace LeeHyperrealMod { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.PopcornFactory.LeeHyperrealMod", "LeeHyperrealMod", "2.2.0")] public class LeeHyperrealPlugin : BaseUnityPlugin { public const string MODUID = "com.PopcornFactory.LeeHyperrealMod"; public const string MODNAME = "LeeHyperrealMod"; public const string MODVERSION = "2.2.0"; public const string DEVELOPER_PREFIX = "POPCORN"; public static LeeHyperrealPlugin instance; public static bool isControllerCheck; public static bool isRiskUIInstalled; public static bool isBetterHudInstalled; public static bool isAutoSprintActive; private static Hook AddBankAfterAKSoundEngineInit; public static PluginInfo PInfo { get; private set; } public static bool isHunkHudInstalled => Chainloader.PluginInfos.ContainsKey("com.public_ParticleSystem.HunkHud"); private void Awake() { instance = this; PInfo = ((BaseUnityPlugin)this).Info; Log.Init(((BaseUnityPlugin)this).Logger); if (Chainloader.PluginInfos.ContainsKey("com.KingEnderBrine.ExtraSkillSlots")) { isControllerCheck = true; } LeeHyperrealAssets.Initialize(); ((MonoBehaviour)this).StartCoroutine(LeeHyperrealAssets.mainAssetBundle.UpgradeStubbedShadersAsync()); ParticleAssets.Initialize(); Config.ReadConfig(); Damage.SetupModdedDamageTypes(); if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions")) { Config.SetupRiskOfOptions(); Config.OnChangeHooks(); } if (Chainloader.PluginInfos.ContainsKey("bubbet.riskui")) { isRiskUIInstalled = true; } if (Chainloader.PluginInfos.ContainsKey("com.TheTimeSweeper.BetterHudLite")) { isBetterHudInstalled = true; } if (Chainloader.PluginInfos.ContainsKey("com.johnedwa.RTAutoSprintEx")) { isAutoSprintActive = true; } States.RegisterStates(); Buffs.RegisterBuffs(); Projectiles.RegisterProjectiles(); Tokens.AddTokens(); ItemDisplays.PopulateDisplays(); LeeHyperrealAssets.LatePopulateAssets(); StaticValues.AddBlacklistStates(); Unlockables.Initialize(); new LeeHyperreal().Initialize(); new ContentPacks().Initialize(); SetupNetworkMessages(); Hook(); } private void Start() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown AddBankAfterAKSoundEngineInit = new Hook((MethodBase)Reflection.GetMethodCached(typeof(AkSoundEngineInitialization), "InitializeSoundEngine"), Reflection.GetMethodCached(typeof(LeeHyperrealPlugin), "AddBank")); } private void SetupNetworkMessages() { NetworkingAPI.RegisterMessageType<PerformForceNetworkRequest>(); NetworkingAPI.RegisterMessageType<SetFreezeOnBodyRequest>(); NetworkingAPI.RegisterMessageType<SetPauseTriggerNetworkRequest>(); NetworkingAPI.RegisterMessageType<PlaySoundNetworkRequest>(); NetworkingAPI.RegisterMessageType<UltimateObjectSpawnNetworkRequest>(); NetworkingAPI.RegisterMessageType<SetDomainUltimateNetworkRequest>(); NetworkingAPI.RegisterMessageType<ForceSpawnStateNetworkRequest>(); NetworkingAPI.RegisterMessageType<AchievementGranterNetworkRequest>(); } private static bool AddBank(Func<AkSoundEngineInitialization, bool> orig, AkSoundEngineInitialization self) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) bool result = orig(self); LeeHyperrealAssets.LoadSoundbank(); if (AkSoundEngine.IsInitialized()) { AkSoundEngine.SetRTPCValue("Volume_Lee_Voice", Config.voiceVolume.Value); } return result; } private void Hook() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown CharacterModel.Start += new hook_Start(CharacterModel_Start); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); CharacterModel.UpdateOverlays += new hook_UpdateOverlays(CharacterModel_UpdateOverlays); CharacterModel.UpdateOverlayStates += new hook_UpdateOverlayStates(CharacterModel_UpdateOverlayStates); BrotherSpeechDriver.OnBodyKill += new hook_OnBodyKill(BrotherSpeechDriver_OnBodyKill); BrotherSpeechDriver.DoInitialSightResponse += new hook_DoInitialSightResponse(BrotherSpeechDriver_DoInitialSightResponse); BaseMainMenuScreen.Awake += new hook_Awake(BaseMainMenuScreen_Awake); Row.FromSkillSlot += new hook_FromSkillSlot(Row_FromSkillSlot); CharacterSelectController.Awake += new hook_Awake(CharacterSelectController_Awake); if (Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI")) { SurvivorCatalog.Init += new hook_Init(SurvivorCatalog_Init); } if (isAutoSprintActive) { SetupAutoSprintBlacklist(); } } private void CharacterSelectController_Awake(orig_Awake orig, CharacterSelectController self) { orig.Invoke(self); LeeHyperrealCharacterMenuListener component = ((Component)self).GetComponent<LeeHyperrealCharacterMenuListener>(); if (!Object.op_Implicit((Object)(object)component)) { component = ((Component)self).gameObject.AddComponent<LeeHyperrealCharacterMenuListener>(); } } [MethodImpl(MethodImplOptions.NoInlining)] public void SetupAutoSprintBlacklist() { ((Component)this).SendMessage("RT_SprintDisableMessage", (object)"LeeHyperrealMod.SkillStates.LeeHyperreal.Secondary.Snipe"); ((Component)this).SendMessage("RT_SprintDisableMessage", (object)"LeeHyperrealMod.SkillStates.LeeHyperreal.Secondary.IdleSnipe"); ((Component)this).SendMessage("RT_SprintDisableMessage", (object)"LeeHyperrealMod.SkillStates.LeeHyperreal.Secondary.ExitSnipe"); ((Component)this).SendMessage("RT_SprintDisableMessage", (object)"LeeHyperrealMod.SkillStates.LeeHyperreal.Secondary.EnterSnipe"); } private Row Row_FromSkillSlot(orig_FromSkillSlot orig, LoadoutPanelController owner, BodyIndex bodyIndex, int skillSlotIndex, GenericSkill skillSlot) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) Row val = orig.Invoke(owner, bodyIndex, skillSlotIndex, skillSlot); string text = ""; if (((Object)skillSlot.skillFamily).name.Contains("Lee: Hyperreal - Orbs and Ammo")) { text = "POPCORN_LEE_HYPERREAL_BODY_PASSIVE_ORB_AND_AMMO_NAME"; } if (((Object)skillSlot.skillFamily).name.Contains("Lee: Hyperreal - Hypermatrix")) { text = "POPCORN_LEE_HYPERREAL_BODY_PASSIVE_DOMAIN_NAME"; } if (((Object)skillSlot.skillFamily).name.Contains("Lee:_Hyperreal_-_VFX_Color")) { text = "POPCORN_LEE_HYPERREAL_BODY_PASSIVE_VFX_COLOR_NAME"; } if (text != "") { Transform val2 = ((Transform)val.rowPanelTransform).Find("SlotLabel") ?? ((Transform)val.rowPanelTransform).Find("LabelContainer").Find("SlotLabel"); if (Object.op_Implicit((Object)(object)val2)) { ((Component)val2).GetComponent<LanguageTextMeshController>().token = text; } } return val; } private void BaseMainMenuScreen_Awake(orig_Awake orig, BaseMainMenuScreen self) { orig.Invoke(self); StaticValues.AddNotificationItemPairs(); } private void BrotherSpeechDriver_DoInitialSightResponse(orig_DoInitialSightResponse orig, BrotherSpeechDriver self) { //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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) bool flag = false; ReadOnlyCollection<CharacterBody> readOnlyInstancesList = CharacterBody.readOnlyInstancesList; for (int i = 0; i < readOnlyInstancesList.Count; i++) { BodyIndex bodyIndex = readOnlyInstancesList[i].bodyIndex; flag |= bodyIndex == BodyCatalog.FindBodyIndex("LeeHyperrealBody"); } if (flag) { SpeechInfo[] array = (SpeechInfo[])(object)new SpeechInfo[1] { new SpeechInfo { duration = 1f, maxWait = 4f, mustPlay = true, priority = 0f, token = "LEE_HYPERREAL_BODY_BROTHER_RESPONSE_ENTRY" } }; self.SendReponseFromPool(array); } orig.Invoke(self); } private void BrotherSpeechDriver_OnBodyKill(orig_OnBodyKill orig, BrotherSpeechDriver self, DamageReport damageReport) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)damageReport.victimBody) && damageReport.victimBodyIndex == BodyCatalog.FindBodyIndex("LeeHyperrealBody")) { SpeechInfo[] array = (SpeechInfo[])(object)new SpeechInfo[3] { new SpeechInfo { duration = 1f, maxWait = 4f, mustPlay = true, priority = 0f, token = "LEE_HYPERREAL_BODY_BROTHER_RESPONSE_ON_DEATH_1" }, new SpeechInfo { duration = 1f, maxWait = 4f, mustPlay = true, priority = 0f, token = "LEE_HYPERREAL_BODY_BROTHER_RESPONSE_ON_DEATH_2" }, new SpeechInfo { duration = 1f, maxWait = 4f, mustPlay = true, priority = 0f, token = "LEE_HYPERREAL_BODY_BROTHER_RESPONSE_ON_DEATH_3" } }; self.SendReponseFromPool(array); } orig.Invoke(self, damageReport); } private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: 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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Expected O, but got Unknown //IL_022c: Unknown result type (might be due to invalid IL or missing references) DamageType val = (DamageType)3; float damage = damageInfo.damage; if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body)) { if (self.body.HasBuff(Buffs.fallDamageNegateBuff)) { DamageType val2 = (DamageType)2097153; DamageType val3 = (DamageType)2359296; if (damageInfo.damageType.damageType == val2 || damageInfo.damageType.damageType == val3) { damageInfo.rejected = true; damageInfo.damage = 0f; } } if (self.body.HasBuff(Buffs.invincibilityBuff) && damageInfo.damageType.damageType != val) { damageInfo.rejected = true; damageInfo.damage = 0f; } if (self.body.baseNameToken == "POPCORN_LEE_HYPERREAL_BODY_NAME" && Object.op_Implicit((Object)(object)damageInfo.attacker) && self.body.HasBuff(Buffs.parryBuff)) { bool isBigPause = false; if (damageInfo.damage > self.fullHealth * 0.2f) { isBigPause = true; } if (damageInfo.damageType.damageType == val) { damageInfo.damage = damage * 0.5f; damageInfo.rejected = false; } else { damageInfo.rejected = true; damageInfo.damage = 0f; } NetMessageExtensions.Send((INetMessage)(object)new SetPauseTriggerNetworkRequest(((NetworkBehaviour)self.body.master).netId, pauseVal: true, isBigPause), (NetworkDestination)1); if (Object.op_Implicit((Object)(object)damageInfo.attacker) && !DamageAPI.HasModdedDamageType(damageInfo, Damage.leeHyperrealParryDamage)) { HealthComponent component = damageInfo.attacker.GetComponent<HealthComponent>(); if (Object.op_Implicit((Object)(object)component)) { DamageInfo val4 = new DamageInfo { damage = damage * 0.25f, attacker = ((Component)self.body).gameObject, crit = self.body.RollCrit(), damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)1), damageColorIndex = (DamageColorIndex)0 }; DamageAPI.AddModdedDamageType(val4, Damage.leeHyperrealParryDamage); component.TakeDamage(val4); } } } } orig.Invoke(self, damageInfo); } private void CharacterModel_Start(orig_Start orig, CharacterModel self) { orig.Invoke(self); if (((Object)((Component)self).gameObject).name.Contains("LeeHyperrealDisplay")) { LeeHyperrealDisplayController component = ((Component)self).gameObject.GetComponent<LeeHyperrealDisplayController>(); if (!Object.op_Implicit((Object)(object)component)) { component = ((Component)self).gameObject.AddComponent<LeeHyperrealDisplayController>(); } } } private void SurvivorCatalog_Init(orig_Init orig) { orig.Invoke(); foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs) { if (((Object)allSurvivorDef.bodyPrefab).name == "LeeHyperrealBody") { CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, LeeHyperrealAssets.mainAssetBundle.LoadAsset<GameObject>("humanoidLeeHyperreal"), 0, true); allSurvivorDef.bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 1.05f; CustomEmotesAPI.CreateNameTokenSpritePair("POPCORN_LEE_HYPERREAL_BODY_NAME", LeeHyperrealAssets.mainAssetBundle.LoadAsset<Sprite>("LeeEmotesIcon")); } } } private bool CharacterModel_UpdateOverlayStates(orig_UpdateOverlayStates orig, CharacterModel self) { bool flag = orig.Invoke(self); if (!flag && Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(Buffs.glitchEffectBuff)) { return true; } return flag; } private void CharacterModel_UpdateOverlays(orig_UpdateOverlays orig, CharacterModel self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body) && self.materialsDirty) { overlayFunction(LeeHyperrealAssets.glitchMaterial, self.body.HasBuff(Buffs.glitchEffectBuff), self); } } private void overlayFunction(Material overlayMaterial, bool condition, CharacterModel model) { if (model.activeOverlayCount < CharacterModel.maxOverlays && condition) { Material[] currentOverlays = model.currentOverlays; int activeOverlayCount = model.activeOverlayCount; model.activeOverlayCount = activeOverlayCount + 1; currentOverlays[activeOverlayCount] = overlayMaterial; } } } internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } } namespace LeeHyperrealMod.SkillStates { internal class LeeHyperrealCharacterMain : GenericCharacterMain { private LeeHyperrealDomainController domainController; private Transform baseTransform; private int baseTransformIndex; public bool forceJump; public GameObject superSprintVFX; public Transform leftFoot; public Transform rightFoot; public Transform leftFootReal; public Transform rightFootReal; public ParentConstraint leftFootConstraint; public ParentConstraint rightFootConstraint; public bool inSuperSprint; public override void OnEnter() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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_008f: Unknown result type (might be due to invalid IL or missing references) ((BaseCharacterMain)this).useRootMotion = true; domainController = ((EntityState)this).gameObject.GetComponent<LeeHyperrealDomainController>(); BulletController component = ((EntityState)this).gameObject.GetComponent<BulletController>(); ((GenericCharacterMain)this).OnEnter(); if (Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator)) { if (((BaseCharacterMain)this).characterAnimParamAvailability.isSprinting) { ((BaseCharacterMain)this).modelAnimator.SetBool(AnimationParameters.isSprinting, ((EntityState)this).characterBody.isSprinting); } Vector3 val = (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) ? ((EntityState)this).inputBank.moveVector : Vector3.zero); bool flag = val != Vector3.zero && ((EntityState)this).characterBody.moveSpeed > Mathf.Epsilon; if (((BaseCharacterMain)this).characterAnimParamAvailability.isMoving) { ((BaseCharacterMain)this).modelAnimator.SetBool(AnimationParameters.isMoving, flag); } bool @bool = ((BaseCharacterMain)this).modelAnimator.GetBool(AnimationParameters.isMoving); bool bool2 = ((BaseCharacterMain)this).modelAnimator.GetBool(AnimationParameters.isSprinting); bool bool3 = ((BaseCharacterMain)this).modelAnimator.GetBool(AnimationParameters.isGrounded); int layerIndex = ((BaseCharacterMain)this).modelAnimator.GetLayerIndex("Body"); if (@bool && !bool2 && bool3) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("Run", 0.1f, layerIndex); } else if (@bool && bool2 && bool3) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("Sprint", 0.1f, layerIndex); } else if (!bool3) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("AscendDescend", 0.1f, layerIndex); } if (Object.op_Implicit((Object)(object)domainController) && domainController.JustEnded) { domainController.JustEnded = false; if (((BaseState)this).isGrounded || !((BaseCharacterMain)this).hasCharacterMotor) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("IdleEmptyHand", 0.1f, layerIndex); } } ((BaseCharacterMain)this).modelAnimator.Update(0f); } ChildLocator component2 = ((Component)((EntityState)this).modelLocator.modelTransform).gameObject.GetComponent<ChildLocator>(); baseTransform = component2.FindChild("BaseTransform"); leftFoot = component2.FindChild("FootL"); rightFoot = component2.FindChild("FootR"); leftFootReal = component2.FindChild("FootLReal"); rightFootReal = component2.FindChild("FootRReal"); baseTransformIndex = component2.FindChildIndex("BaseTransform"); if (component.inSnipeStance) { component.UnsetSnipeStance(); } if (forceJump) { forceJump = false; base.jumpInputReceived = true; } } public override void ProcessJump() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown int jumpCount = ((EntityState)this).characterMotor.jumpCount; ((GenericCharacterMain)this).ProcessJump(); int jumpCount2 = ((EntityState)this).characterMotor.jumpCount; if (jumpCount < jumpCount2 && ((EntityState)this).characterMotor.jumpCount != 1) { EffectData val = new EffectData { origin = baseTransform.position, scale = 1f, rotation = baseTransform.rotation }; val.SetChildLocatorTransformReference(((EntityState)this).gameObject, baseTransformIndex); EffectManager.SpawnEffect(ParticleAssets.RetrieveParticleEffectFromSkin("jumpEffect", ((EntityState)this).characterBody), val, true); } } public override void Update() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Invalid comparison between Unknown and I4 ((GenericCharacterMain)this).Update(); AnimatorStateInfo currentAnimatorStateInfo = ((BaseCharacterMain)this).modelAnimator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("StopRun")) { currentAnimatorStateInfo = ((BaseCharacterMain)this).modelAnimator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Super Sprint Outro")) { ((BaseCharacterMain)this).useRootMotion = (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && ((EntityState)this).characterBody.rootMotionInMainState && ((BaseState)this).isGrounded) || Object.op_Implicit((Object)(object)((EntityState)this).railMotor); goto IL_00cc; } } Vector3 val = (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) ? ((EntityState)this).inputBank.moveVector : Vector3.zero); bool flag = val != Vector3.zero && ((EntityState)this).characterBody.moveSpeed > Mathf.Epsilon; ((BaseCharacterMain)this).useRootMotion = !flag; goto IL_00cc; IL_00cc: ((BaseCharacterMain)this).modelAnimator.SetBool("IsSuperSprinting", ((EntityState)this).characterBody.moveSpeed > 20f && ((EntityState)this).characterBody.isSprinting); currentAnimatorStateInfo = ((BaseCharacterMain)this).modelAnimator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Super Sprint Intro")) { currentAnimatorStateInfo = ((BaseCharacterMain)this).modelAnimator.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Super Sprint Loop")) { if (Object.op_Implicit((Object)(object)superSprintVFX) && inSuperSprint) { OnSuperSprintExit(); } goto IL_018d; } } if (!Object.op_Implicit((Object)(object)superSprintVFX) && !inSuperSprint) { OnSuperSprintEnter(); } goto IL_018d; IL_018d: if (((EntityState)this).inputBank.skill2.down && Config.allowSnipeButtonHold.Value && ((EntityState)this).isAuthority && ((EntityState)this).skillLocator.secondary.skillNameToken == "POPCORN_LEE_HYPERREAL_BODY_ENTER_SNIPE_NAME" && (int)((EntityState)this).outer.state.GetMinimumInterruptPriority() != 9) { ((EntityState)this).outer.SetNextState((EntityState)(object)new EnterSnipe()); } } public void OnSuperSprintEnter() { inSuperSprint = true; if (!Object.op_Implicit((Object)(object)superSprintVFX)) { SetupSuperSprintVFX(setActive: true); } } public void OnSuperSprintExit() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) inSuperSprint = false; if (Object.op_Implicit((Object)(object)superSprintVFX)) { superSprintVFX.GetComponent<DestroySprintOnDelay>().StartDestroying(); Util.PlaySound("Stop_Super_Sprint", superSprintVFX); superSprintVFX = null; } AnimatorStateInfo currentAnimatorStateInfo = ((BaseCharacterMain)this).modelAnimator.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Super Sprint Outro")) { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, "Play_Super_Sprint_End_Slide"), (NetworkDestination)1); } } public void SetupSuperSprintVFX(bool setActive = false) { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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) if (!Object.op_Implicit((Object)(object)superSprintVFX)) { superSprintVFX = Object.Instantiate<GameObject>(ParticleAssets.RetrieveParticleEffectFromSkin("superSprint", ((EntityState)this).characterBody), baseTransform); superSprintVFX.SetActive(setActive); rightFootConstraint = ((Component)superSprintVFX.transform.GetChild(3)).gameObject.GetComponent<ParentConstraint>(); leftFootConstraint = ((Component)superSprintVFX.transform.GetChild(2)).gameObject.GetComponent<ParentConstraint>(); ParentConstraint obj = rightFootConstraint; ConstraintSource val = default(ConstraintSource); ((ConstraintSource)(ref val)).sourceTransform = rightFootReal; ((ConstraintSource)(ref val)).weight = 1f; obj.SetSource(0, val); ParentConstraint obj2 = leftFootConstraint; val = default(ConstraintSource); ((ConstraintSource)(ref val)).sourceTransform = leftFootReal; ((ConstraintSource)(ref val)).weight = 1f; obj2.SetSource(0, val); Util.PlaySound("Play_Super_Sprint", superSprintVFX); } } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); if (Object.op_Implicit((Object)(object)superSprintVFX)) { superSprintVFX.GetComponent<DestroySprintOnDelay>().StartDestroying(); } } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write(forceJump); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); forceJump = reader.ReadBoolean(); } } internal class LeeHyperrealDeathState : GenericCharacterDeath { internal float triggerRagdollFrac = 0.97f; internal bool triggeredRagdoll = false; internal float duration = 3.66f; private LeeHyperrealDomainController domainController; private OrbController orbController; public override bool shouldAutoDestroy => false; public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); domainController = ((EntityState)this).gameObject.GetComponent<LeeHyperrealDomainController>(); orbController = ((EntityState)this).gameObject.GetComponent<OrbController>(); ((EntityState)this).PlayAnimation("Death", "FullBody, Override", "attack.playbackRate", duration, 0f); if (domainController.GetDomainState()) { domainController.DisableDomain(shouldSetState: false); } orbController.isExecutingSkill = true; bool flag = Config.loreMode.Value && LeeHyperrealMod.Modules.Survivors.LeeHyperreal.voiceDisabledSkins.Contains((int)((EntityState)this).characterBody.skinIndex); if (!((BaseState)this).isGrounded || flag) { TriggerRagdoll(useForce: true); } else if (Config.voiceEnabled.Value && !flag) { if (Config.voiceLanguageOption.Value == Config.VoiceLanguage.ENG) { Util.PlaySound("Play_Lee_Death_Voice_EN", ((EntityState)this).gameObject); } else { Util.PlaySound("Play_Lee_Death_Voice_JP", ((EntityState)this).gameObject); } } } public void TriggerRagdoll(bool useForce) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) triggeredRagdoll = true; Vector3 val = Vector3.up * 5f; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { val += ((EntityState)this).characterMotor.velocity; ((Behaviour)((EntityState)this).characterMotor).enabled = false; } if (Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { RagdollController component = ((Component)((GenericCharacterDeath)this).cachedModelTransform).GetComponent<RagdollController>(); if (Object.op_Implicit((Object)(object)component)) { component.BeginRagdoll(useForce ? val : Vector3.zero); } } } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration * triggerRagdollFrac && !triggeredRagdoll) { TriggerRagdoll(useForce: false); } if (((EntityState)this).fixedAge > duration && !triggeredRagdoll) { TriggerRagdoll(useForce: false); } if (NetworkServer.active && ((EntityState)this).fixedAge > 8f) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)9; } } internal class LeeHyperrealSpawnState : BaseRootMotionMoverState { internal float duration = 7.5f; internal float enableModel = 0.39f; internal float moveCancelFrac = 0.8f; internal float fireFrac = 0.52f; internal float weaponTransition = 0.55f; internal float gravityOff = 0.6f; internal float aimModeFrac = 0.35f; internal bool modelSpawned; internal bool hasWeaponTransitioned; internal bool hasFired; internal Vector3 blastPosition; internal WeaponModelHandler weaponModelHandler; internal CharacterGravityParameters oldGravParams; internal CharacterGravityParameters gravParams; public override void OnEnter() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); weaponModelHandler = ((EntityState)this).gameObject.GetComponent<WeaponModelHandler>(); rmaMultiplier = 1f; blastPosition = ((EntityState)this).transform.position; weaponModelHandler.TransitionState(WeaponModelHandler.WeaponState.SUBMACHINE, playFlashEffect: false); weaponModelHandler.SetStateForModelAndSubmachine(state: false); ((EntityState)this).PlayAnimation("Body", "Stage Intro", "attack.playbackRate", duration, 0f); Util.PlaySound("Play_Stage_Intro", ((Component)((EntityState)this).gameObject.transform.GetChild(0)).gameObject); oldGravParams = ((EntityState)this).characterMotor.gravityParameters; gravParams = default(CharacterGravityParameters); gravParams.environmentalAntiGravityGranterCount = 1; gravParams.channeledAntiGravityGranterCount = 1; ((EntityState)this).characterMotor.gravityParameters = gravParams; if (NetworkServer.active) { ((EntityState)this).characterBody.SetBuffCount(Buffs.invincibilityBuff.buffIndex, 1); } } public override void FixedUpdate() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: 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_01a9: 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_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Expected O, but got Unknown //IL_01d8: 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_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_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_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0250: 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_025c: 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_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: 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_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027b: 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_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); if (((EntityState)this).fixedAge <= duration * aimModeFrac) { ((EntityState)this).characterDirection.forward = ((EntityState)this).inputBank.aimDirection; ((EntityState)this).characterDirection.moveVector = ((EntityState)this).inputBank.aimDirection; } if (((EntityState)this).fixedAge >= duration * enableModel && !modelSpawned) { modelSpawned = true; weaponModelHandler.SetStateForModelAndSubmachine(state: true); weaponModelHandler.TransitionState(WeaponModelHandler.WeaponState.RIFLE); } if (((EntityState)this).fixedAge >= duration * gravityOff) { ((EntityState)this).characterMotor.gravityParameters = oldGravParams; } if (((EntityState)this).fixedAge > duration * fireFrac && !hasFired) { hasFired = true; if (((EntityState)this).isAuthority) { ModelLocator modelLocator = ((EntityState)this).modelLocator; Transform val = null; if (Object.op_Implicit((Object)(object)modelLocator) && Object.op_Implicit((Object)(object)modelLocator.modelTransform)) { ChildLocator component = ((Component)modelLocator.modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component)) { val = component.FindChild("RifleTip"); } } EffectData val2 = new EffectData { origin = val.position }; Vector3 val3 = blastPosition - val.position; val3 = ((Vector3)(ref val3)).normalized + Vector3.down * 0.35f; val2.rotation = Quaternion.LookRotation(((Vector3)(ref val3)).normalized, Vector3.up); EffectData val4 = val2; EffectManager.SpawnEffect(ParticleAssets.RetrieveParticleEffectFromSkin("blueOrbShot", ((EntityState)this).characterBody), val4, true); new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = null, teamIndex = ((BaseState)this).GetTeam(), position = blastPosition, radius = 8f, falloffModel = (FalloffModel)0, baseDamage = ((BaseState)this).damageStat * 8f, baseForce = 1000f, bonusForce = Vector3.zero, crit = ((BaseState)this).RollCrit(), damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)0), losType = (LoSType)0, canRejectForce = false, procChainMask = default(ProcChainMask), procCoefficient = 1f, attackerFiltering = (AttackerFiltering)2 }.Fire(); } } if (((EntityState)this).fixedAge >= duration * weaponTransition && !hasWeaponTransitioned) { hasWeaponTransitioned = true; weaponModelHandler.TransitionState(WeaponModelHandler.WeaponState.SUBMACHINE); } if (((EntityState)this).fixedAge >= duration * moveCancelFrac && ((EntityState)this).isAuthority && ((EntityState)this).inputBank.moveVector != Vector3.zero) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new LeeHyperrealCharacterMain(), (InterruptPriority)1); } else if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new LeeHyperrealCharacterMain(), (InterruptPriority)1); } } public override void OnExit() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) base.OnExit(); ((EntityState)this).characterMotor.gravityParameters = oldGravParams; if (NetworkServer.active) { ((EntityState)this).characterBody.SetBuffCount(Buffs.invincibilityBuff.buffIndex, 0); } if (Object.op_Implicit((Object)(object)weaponModelHandler) && !hasWeaponTransitioned) { weaponModelHandler.TransitionState(WeaponModelHandler.WeaponState.SUBMACHINE); } if (Object.op_Implicit((Object)(object)weaponModelHandler) && !modelSpawned) { weaponModelHandler.SetStateForModelAndSubmachine(state: true); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class Freeze : BaseSkillState { private Animator animator; internal float duration; private BaseAI[] aiComponents; internal float previousAttackSpeedStat; private Animator modelAnimator; private TemporaryOverlay temporaryOverlay; public override void OnEnter() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { ((Behaviour)modelAnimator).enabled = false; } if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody) && !((EntityState)this).rigidbody.isKinematic) { ((EntityState)this).rigidbody.velocity = Vector3.zero; if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { ((EntityState)this).rigidbodyMotor.moveVector = Vector3.zero; } } if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterDirection.forward; } if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.glitchEffectBuff, duration); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)modelAnimator)) { ((Behaviour)modelAnimator).enabled = true; } CharacterModel component = ((Component)((EntityState)this).GetModelTransform()).GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)component)) { component.forceUpdate = true; } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((BaseState)this).attackSpeedStat = 0f; if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterDirection.forward; } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)7; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(duration); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); duration = reader.ReadSingle(); } } } namespace LeeHyperrealMod.SkillStates.LeeHyperreal { internal class BlueOrb : BaseRootMotionMoverState { private OrbController orbController; private BulletController bulletController; private WeaponModelHandler weaponModelHandler; private LeeHyperrealDomainController domainController; public static float force = 800f; public static float range = 256f; public float start = 0f; public float earlyEnd = 0.38f; public float rmaEnd = 0.44f; public float fireFrac = 0.22f; public float duration = 3.83f; public int moveStrength; public bool hasFired; private bool hasResetRMA = false; internal BlastAttack blastAttack; internal int attackAmount; internal float partialAttack; internal BulletAttack bulletAttack; public float defaultMovementMultiplier = 1.5f; public float backwardsMovementMultiplier = 0.75f; public float forwardsMovementMultiplier = 2f; private float movementMultiplier; private CharacterGravityParameters gravParams; private CharacterGravityParameters oldGravParams; private float turnOffGravityFrac = 0.298f; private float movespeedScalingCap = 15f; private float disableInvincibility = 0.2f; private float orbCancelFrac = 0.24f; private float heldPrimaryDown = 0.1f; private float disallowTransition = 0.26f; private float heldDownTimer = 0f; private bool forceTransition = false; private Vector3 OriginalPosition; private float transitionWeaponFrac = 0.35f; private bool hasTransitioned = false; private bool hasUnsetOrbController; private DamageTypeCombo GenericDamageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)0); public override void OnEnter() { //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: 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_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_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_01bb: 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_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_020a: 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_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021d: 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_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0274: 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_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: 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_0294: 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_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: 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_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Expected O, but got Unknown //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); orbController = ((EntityState)this).gameObject.GetComponent<OrbController>(); bulletController = ((EntityState)this).gameObject.GetComponent<BulletController>(); weaponModelHandler = ((EntityState)this).gameObject.GetComponent<WeaponModelHandler>(); domainController = ((EntityState)this).gameObject.GetComponent<LeeHyperrealDomainController>(); if (Object.op_Implicit((Object)(object)orbController)) { orbController.isExecutingSkill = true; } rmaMultiplier = movementMultiplier; ((EntityState)this).characterMotor.velocity.y = 0f; bulletController.UnsetSnipeStance(); if (moveStrength >= 3 && ((EntityState)this).isAuthority && !domainController.GetDomainState()) { bulletController.GrantColouredBullet(BulletController.BulletType.BLUE); } if (moveStrength >= 3 && domainController.GetDomainState()) { domainController.GrantIntuitionStack(1); domainController.AddEnergy(35f); } attackAmount = (int)((BaseState)this).attackSpeedStat; if (attackAmount < 1) { attackAmount = 1; } partialAttack = ((BaseState)this).attackSpeedStat - (float)attackAmount; OriginalPosition = ((EntityState)this).gameObject.transform.position; BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = null, teamIndex = ((BaseState)this).GetTeam() }; Vector3 position = ((EntityState)this).gameObject.transform.position; Ray aimRay = ((BaseState)this).GetAimRay(); val.position = position + ((Ray)(ref aimRay)).direction * 2.5f; val.radius = 8f; val.falloffModel = (FalloffModel)0; val.baseDamage = ((BaseState)this).damageStat * 8f * ((moveStrength >= 3) ? 4f : 1f); val.baseForce = 0f; val.bonusForce = Vector3.zero; val.crit = ((BaseState)this).RollCrit(); val.damageType = GenericDamageType; val.losType = (LoSType)0; val.canRejectForce = false; val.procChainMask = default(ProcChainMask); val.procCoefficient = 1f; val.impactEffect = EffectCatalog.FindEffectIndexFromPrefab(ParticleAssets.RetrieveParticleEffectFromSkin("blueOrbHit", ((EntityState)this).characterBody)); val.attackerFiltering = (AttackerFiltering)2; blastAttack = val; bulletAttack = new BulletAttack { bulletCount = (uint)attackAmount, damage = 3f * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = GenericDamageType, falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = 0f, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = "RifleTip", smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = 0.75f, sniper = false, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, weapon = null, spreadPitchScale = 0f, spreadYawScale = 0f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = ParticleAssets.RetrieveParticleEffectFromSkin("blueOrbHit", ((EntityState)this).characterBody) }; ((EntityState)this).characterDirection.forward = ((EntityState)this).inputBank.aimDirection; ((EntityState)this).characterDirection.moveVector = ((EntityState)this).inputBank.aimDirection; PlayAttackAnimation(); oldGravParams = ((EntityState)this).characterMotor.gravityParameters; gravParams = default(CharacterGravityParameters); gravParams.environmentalAntiGravityGranterCount = 1; gravParams.channeledAntiGravityGranterCount = 1; ((EntityState)this).characterMotor.gravityParameters = gravParams; rmaMultiplier = ((((BaseState)this).moveSpeedStat < movespeedScalingCap) ? (((BaseState)this).moveSpeedStat / 10f) : (movespeedScalingCap / 10f)); if (rmaMultiplier < movementMultiplier) { rmaMultiplier = movementMultiplier; } if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.invincibilityBuff, duration * disableInvincibility); } if (((EntityState)this).isAuthority) { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, "Play_c_liRk4_skill_blue_shine"), (NetworkDestination)1); } weaponModelHandler.TransitionState(WeaponModelHandler.WeaponState.RIFLE); weaponModelHandler.SetLaserState(state: true); } protected void PlayAttackAnimation() { ((EntityState)this).PlayAnimation("Body", "blueOrb", "attack.playbackRate", duration, 0f); } public override void OnExit() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)orbController) && !hasUnsetOrbController) { orbController.isExecutingSkill = false; } ((EntityState)this).characterMotor.gravityParameters = oldGravParams; if (NetworkServer.active) { ((EntityState)this).characterBody.ClearTimedBuffs(Buffs.invincibilityBuff); } ((EntityState)this).PlayAnimation("Body", "BufferEmpty"); base.OnExit(); if (weaponModelHandler.GetState() != 0) { weaponModelHandler.TransitionState(WeaponModelHandler.WeaponState.SUBMACHINE); weaponModelHandler.SetLaserState(state: false); } } public override void Update() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; Vector3 val = direction * -1f; movementMultiplier = defaultMovementMultiplier; if (((EntityState)this).inputBank.moveVector == Vector3.zero) { movementMultiplier = defaultMovementMultiplier; } else if (Vector3.Dot(val, ((EntityState)this).inputBank.moveVector) >= 0.833f) { movementMultiplier = backwardsMovementMultiplier; } else if (Vector3.Dot(direction, ((EntityState)this).inputBank.moveVector) >= 0.833f) { movementMultiplier = forwardsMovementMultiplier; } rmaMultiplier = movementMultiplier; } ((EntityState)this).Update(); if (((EntityState)this).age >= duration * transitionWeaponFrac && !hasTransitioned) { hasTransitioned = true; weaponModelHandler.TransitionState(WeaponModelHandler.WeaponState.SUBMACHINE); weaponModelHandler.SetLaserState(state: false); } if (((EntityState)this).fixedAge >= duration * rmaEnd && !hasResetRMA) { rmaMultiplier = 1f; hasResetRMA = true; } if (((EntityState)this).inputBank.skill1.down && ((EntityState)this).isAuthority && ((EntityState)this).age <= duration * disallowTransition) { heldDownTimer += Time.deltaTime; if (heldDownTimer > heldPrimaryDown && domainController.DomainEntryAllowed()) { forceTransition = true; } } else if (!((EntityState)this).inputBank.skill1.down && ((EntityState)this).isAuthority) { heldDownTimer = 0f; } if (((EntityState)this).age >= duration * disallowTransition && forceTransition && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new DomainEnterState { shouldForceUpwards = false }, (InterruptPriority)7); return; } if ((((EntityState)this).inputBank.skill3.down || ((EntityState)this).inputBank.skill4.down) && ((EntityState)this).isAuthority) { BodyInputCheckHelper.CheckForOtherInputs(((EntityState)this).skillLocator, ((EntityState)this).isAuthority, ((EntityState)this).inputBank); return; } if (((EntityState)this).age >= duration * orbCancelFrac && ((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)orbController) && !hasUnsetOrbController) { orbController.isExecutingSkill = false; } BodyInputCheckHelper.CheckForOtherInputs(((EntityState)this).skillLocator, ((EntityState)this).isAuthority, ((EntityState)this).inputBank); } if (((EntityState)this).age >= duration * earlyEnd && ((EntityState)this).isAuthority && ((EntityState)this).inputBank.moveVector != default(Vector3)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new LeeHyperrealCharacterMain(), (InterruptPriority)1); } else if (((EntityState)this).age >= duration * turnOffGravityFrac) { ((EntityState)this).characterMotor.gravityParameters = oldGravParams; } } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).fixedAge >= duration * fireFrac && ((EntityState)this).isAuthority && !hasFired) { hasFired = true; FireAttack(); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public void FireAttack() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_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_0126: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_028d: 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_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).isAuthority) { return; } ModelLocator modelLocator = ((EntityState)this).modelLocator; Transform val = null; if (Object.op_Implicit((Object)(object)modelLocator) && Object.op_Implicit((Object)(object)modelLocator.modelTransform)) { ChildLocator component = ((Component)modelLocator.modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component)) { val = component.FindChild(bulletAttack.muzzleName); } } BulletAttack obj = bulletAttack; Vector3 val2 = OriginalPosition - val.position; val2 = ((Vector3)(ref val2)).normalized + Vector3.down * 0.35f; obj.aimVector = ((Vector3)(ref val2)).normalized; bulletAttack.origin = val.position; bulletAttack.Fire(); EffectData val3 = new EffectData { origin = val.position }; val2 = OriginalPosition - val.position; val2 = ((Vector3)(ref val2)).normalized + Vector3.down * 0.35f; val3.rotation = Quaternion.LookRotation(((Vector3)(ref val2)).normalized, Vector3.up); EffectData val4 = val3; EffectManager.SpawnEffect(ParticleAssets.RetrieveParticleEffectFromSkin("blueOrbShot", ((EntityState)this).characterBody), val4, true); RaycastHit val5 = default(RaycastHit); if (Physics.Raycast(val.position, bulletAttack.aimVector, ref val5, float.PositiveInfinity, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { EffectData val6 = new EffectData { scale = 4f }; EffectManager.SimpleEffect(ParticleAssets.RetrieveParticleEffectFromSkin("blueOrbGroundHit", ((EntityState)this).characterBody), ((RaycastHit)(ref val5)).point, Quaternion.identity, true); } for (int i = 0; i < attackAmount; i++) { blastAttack.position = ((RaycastHit)(ref val5)).point; Result val7 = blastAttack.Fire(); if (val7.hitCount > 0) { OnHitEnemyAuthority(); } } if (partialAttack > 0f) { blastAttack.baseDamage *= partialAttack; blastAttack.procCoefficient *= partialAttack; blastAttack.radius *= partialAttack; blastAttack.baseForce *= partialAttack; Result val8 = blastAttack.Fire(); if (val8.hitCount > 0) { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, "Play_c_liRk4_imp_blue"), (NetworkDestination)1); OnHitEnemyAuthority(); } } } public void OnHitEnemyAuthority() { } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).fixedAge >= duration * orbCancelFrac) { return (InterruptPriority)1; } return (InterruptPriority)7; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(moveStrength); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); moveStrength = reader.ReadInt32(); } } } namespace LeeHyperrealMod.SkillStates.LeeHyperreal.YellowOrb { internal class YellowOrb : BaseRootMotionMoverState { public float start = 0f; public float earlyEnd = 0.3f; public float fireFrac = 0.22f; public float GravityEndFrac = 0.5f; public float duration = 2f; public int moveStrength; public bool hasFired; internal BlastAttack blastAttack; internal int attackAmount; internal float partialAttack; internal bool isStrong; private float movementMultiplier = 1f; private float invincibilityStartFrac = 0.1f; private float invincibilityEndFrac = 0.4f; private bool invincibilitySet = false; private OrbController orbController; private BulletController bulletController; private Transform baseTransform; private float effectTimingFrac = 0.15f; private bool hasPlayedEffect; private bool hasPlayedBulletCasingSFX = false; private CharacterGravityParameters gravParams; private CharacterGravityParameters oldGravParams; private bool hasUnsetOrbController; public override void OnEnter() { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020d: 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_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Expected O, but got Unknown //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: 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) orbController = ((EntityState)this).gameObject.GetComponent<OrbController>(); bulletController = ((EntityState)this).gameObject.GetComponent<BulletController>(); if (bulletController.inSnipeStance) { bulletController.UnsetSnipeStance(); } if (Object.op_Implicit((Object)(object)orbController)) { orbController.isExecutingSkill = true; } base.OnEnter(); rma = InitMeleeRootMotion(); rmaMultiplier = movementMultiplier; ((EntityState)this).characterMotor.velocity.y = 0f; oldGravParams = ((EntityState)this).characterMotor.gravityParameters; gravParams = default(CharacterGravityParameters); gravParams.environmentalAntiGravityGranterCount = 1; gravParams.channeledAntiGravityGranterCount = 1; ((EntityState)this).characterMotor.gravityParameters = gravParams; if (moveStrength >= 3) { isStrong = true; } attackAmount = (int)((BaseState)this).attackSpeedStat; if (attackAmount < 1) { attackAmount = 1; } partialAttack = ((BaseState)this).attackSpeedStat - (float)attackAmount; BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = null, teamIndex = ((BaseState)this).GetTeam() }; Vector3 position = ((EntityState)this).gameObject.transform.position; Ray aimRay = ((BaseState)this).GetAimRay(); val.position = position + ((Ray)(ref aimRay)).direction * 2.5f; val.radius = 8f; val.falloffModel = (FalloffModel)0; val.baseDamage = ((BaseState)this).damageStat * 0.75f * ((moveStrength >= 3) ? 4f : 1f); val.baseForce = 0f; val.bonusForce = Vector3.zero; val.crit = ((BaseState)this).RollCrit(); val.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)0); val.losType = (LoSType)0; val.canRejectForce = false; val.procChainMask = default(ProcChainMask); val.procCoefficient = 1f; val.attackerFiltering = (AttackerFiltering)2; blastAttack = val; ((EntityState)this).characterDirection.forward = ((EntityState)this).inputBank.aimDirection; ((EntityState)this).characterDirection.moveVector = ((EntityState)this).inputBank.aimDirection; PlayAttackAnimation(); ChildLocator component = ((Component)((EntityState)this).modelLocator.modelTransform).gameObject.GetComponent<ChildLocator>(); baseTransform = component.FindChild("BaseTransform"); if (((EntityState)this).isAuthority) { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, "Play_c_liRk4_skill_yellow_tuijin"), (NetworkDestination)1); } } protected void PlayAttackAnimation() { ((EntityState)this).PlayAnimation("Body", "yellowOrb", "attack.playbackRate", duration, 0f); } public override void OnExit() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) base.OnExit(); if (Object.op_Implicit((Object)(object)orbController) && !hasUnsetOrbController) { orbController.isExecutingSkill = false; } ((EntityState)this).characterMotor.gravityParameters = oldGravParams; ((EntityState)this).PlayAnimation("Body", "BufferEmpty"); if (NetworkServer.active) { ((EntityState)this).characterBody.ClearTimedBuffs(Buffs.invincibilityBuff.buffIndex); } } public override void Update() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_016c: 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_0129: Invalid comparison between Unknown and I4 //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Invalid comparison between Unknown and I4 ((EntityState)this).Update(); if ((((EntityState)this).inputBank.skill3.down || ((EntityState)this).inputBank.skill4.down) && ((EntityState)this).isAuthority) { BodyInputCheckHelper.CheckForOtherInputs(((EntityState)this).skillLocator, ((EntityState)this).isAuthority, ((EntityState)this).inputBank); return; } if (((EntityState)this).age >= duration * effectTimingFrac && !hasPlayedEffect) { hasPlayedEffect = true; if (((EntityState)this).isAuthority) { EffectData val = new EffectData { origin = baseTransform.position, rotation = Quaternion.LookRotation(((EntityState)this).characterDirection.forward), scale = 1.25f }; EffectManager.SpawnEffect(ParticleAssets.RetrieveParticleEffectFromSkin("yellowOrbSwing", ((EntityState)this).characterBody), val, true); } } if (!(((EntityState)this).age >= duration * earlyEnd) || !((EntityState)this).isAuthority) { return; } if (isStrong && (int)((EntityState)this).outer.state.GetMinimumInterruptPriority() != 9) {