Decompiled source of Lee Hyperreal v1.1.11
LeeHyperrealMod/LeeHyperrealMod.dll
Decompiled 2 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 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.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.UI; using RoR2.UI.MainMenu; using ShaderSwapper; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; 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+f96f08afb6c06175526a5b6c9dbf9f743c530ffe")] [assembly: AssemblyProduct("LeeHyperrealMod")] [assembly: AssemblyTitle("LeeHyperrealMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] namespace ShaderSwapper { public static class ShaderSwapper { private const string PREFIX = "Stubbed"; private const int PREFIX_LENGTH = 7; private static Object[] _ = Array.Empty<Object>(); public static IEnumerator UpgradeStubbedShadersAsync(this AssetBundle assetBundle) { if ((Object)(object)assetBundle == (Object)null) { throw new ArgumentNullException("assetBundle"); } AssetBundleRequest loadMaterials = assetBundle.LoadAllAssetsAsync<Material>(); while (!((AsyncOperation)loadMaterials).isDone) { yield return null; } Object[] allMaterials = loadMaterials.allAssets; int materialCount = allMaterials.Length; if (materialCount <= 0) { yield break; } List<AsyncOperationHandle> loadResourceLocationsOperations = new List<AsyncOperationHandle>(materialCount); for (int k = materialCount - 1; k >= 0; k--) { string cachedShaderName = ((Object)((Material)allMaterials[k]).shader).name; if (cachedShaderName.StartsWith("Stubbed")) { loadResourceLocationsOperations.Add(AsyncOperationHandle<IList<IResourceLocation>>.op_Implicit(Addressables.LoadResourceLocationsAsync((object)(cachedShaderName.Substring(7) + ".shader"), typeof(Shader)))); } else { materialCount--; for (int l = k; l < materialCount; l++) { allMaterials[l] = allMaterials[l + 1]; } } } if (materialCount <= 0) { yield break; } AsyncOperationHandle<IList<AsyncOperationHandle>> loadResourceLocationsGroup = Addressables.ResourceManager.CreateGenericGroupOperation(loadResourceLocationsOperations, false); while (!loadResourceLocationsGroup.IsDone) { yield return null; } List<IResourceLocation> resourceLocations = new List<IResourceLocation>(materialCount); for (int j = materialCount - 1; j >= 0; j--) { AsyncOperationHandle val = loadResourceLocationsGroup.Result[j]; IList<IResourceLocation> result = (IList<IResourceLocation>)((AsyncOperationHandle)(ref val)).Result; if (result.Count > 0) { resourceLocations.Add(result[0]); } else { materialCount--; for (int m = materialCount - j; m < materialCount; m++) { allMaterials[m] = allMaterials[m + 1]; } } } if (materialCount > 0) { AsyncOperationHandle<IList<Shader>> loadShaders = Addressables.LoadAssetsAsync<Shader>((IList<IResourceLocation>)resourceLocations, (Action<Shader>)null, false); while (!loadShaders.IsDone) { yield return null; } int startIndex = _.Length; Array.Resize(ref _, startIndex + materialCount); for (int i = 0; i < materialCount; i++) { SwapShader((Material)allMaterials[i], loadShaders.Result[i]); _[startIndex + i] = allMaterials[i]; } } } public static IEnumerator UpgradeStubbedShaderAsync(Material material) { if ((Object)(object)material == (Object)null) { throw new ArgumentNullException("material"); } string cachedShaderName = ((Object)material.shader).name; if (!cachedShaderName.StartsWith("Stubbed")) { yield break; } AsyncOperationHandle<IList<IResourceLocation>> loadResourceLocations = Addressables.LoadResourceLocationsAsync((object)(cachedShaderName.Substring(7) + ".shader"), typeof(Shader)); while (!loadResourceLocations.IsDone) { yield return null; } if (loadResourceLocations.Result.Count > 0) { AsyncOperationHandle<Shader> loadShader = Addressables.LoadAssetAsync<Shader>(loadResourceLocations.Result[0]); while (!loadShader.IsDone) { yield return null; } SwapShader(material, loadShader.Result); Array.Resize(ref _, _.Length + 1); _[_.Length - 1] = (Object)(object)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", "1.1.11")] public class LeeHyperrealPlugin : BaseUnityPlugin { public const string MODUID = "com.PopcornFactory.LeeHyperrealMod"; public const string MODNAME = "LeeHyperrealMod"; public const string MODVERSION = "1.1.11"; 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; } 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(); 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>(); } 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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); 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); if (Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI")) { SurvivorCatalog.Init += new hook_Init(SurvivorCatalog_Init); } if (isAutoSprintActive) { SetupAutoSprintBlacklist(); } } [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 object 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) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown Row val = (Row)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 (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_0051: 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_009f: 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_0060: 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_0138: 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_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: 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_020a: 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_0212: 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_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Expected O, but got Unknown //IL_0222: 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 (DamageTypeCombo.op_Implicit(damageInfo.damageType) == val2 || DamageTypeCombo.op_Implicit(damageInfo.damageType) == val3) { damageInfo.rejected = true; damageInfo.damage = 0f; } } if (self.body.HasBuff(Buffs.invincibilityBuff) && DamageTypeCombo.op_Implicit(damageInfo.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 (DamageTypeCombo.op_Implicit(damageInfo.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 = DamageTypeCombo.op_Implicit((DamageType)32), 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 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)) { 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 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"); 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.jumpEffect, 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_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_0109: Invalid comparison between Unknown and I4 ((GenericCharacterMain)this).Update(); AnimatorStateInfo currentAnimatorStateInfo = ((BaseCharacterMain)this).modelAnimator.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("StopRun")) { 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; } else { ((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); } 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() != 7) { ((EntityState)this).outer.SetNextState((EntityState)(object)new EnterSnipe()); } } 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; if (!((BaseState)this).isGrounded) { TriggerRagdoll(useForce: true); } else 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 * 3f; 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_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)7; } } internal class 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_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: 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_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0221: 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_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: 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_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025d: 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_0269: 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_0276: 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_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) 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.blueOrbShot, 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 = DamageTypeCombo.op_Implicit((DamageType)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.SetNextStateToMain(); } else if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } 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)5; } } 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 + 1f); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)modelAnimator)) { ((Behaviour)modelAnimator).enabled = 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)5; } 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; public bool hasCancelledWithMovement; 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; 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_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Expected O, but got Unknown //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: 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_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: 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_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_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_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0330: 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_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_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_046d: 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 = DamageTypeCombo.op_Implicit((DamageType)0); val.losType = (LoSType)0; val.canRejectForce = false; val.procChainMask = default(ProcChainMask); val.procCoefficient = 1f; val.impactEffect = EffectCatalog.FindEffectIndexFromPrefab(ParticleAssets.blueOrbHit); val.attackerFiltering = (AttackerFiltering)2; blastAttack = val; bulletAttack = new BulletAttack { bulletCount = (uint)attackAmount, damage = 3f * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), 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.blueOrbHit }; ((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_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0397: 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.SetNextState((EntityState)(object)new DomainEnterState { shouldForceUpwards = false }); 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); } if (((EntityState)this).age >= duration * orbCancelFrac && ((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)orbController) && !hasUnsetOrbController) { orbController.isExecutingSkill = false; } if (((EntityState)this).age >= duration * earlyEnd && ((EntityState)this).isAuthority) { if (((EntityState)this).inputBank.moveVector != default(Vector3) && !hasCancelledWithMovement) { ((EntityState)this).outer.SetNextStateToMain(); hasCancelledWithMovement = true; return; } BodyInputCheckHelper.CheckForOtherInputs(((EntityState)this).skillLocator, ((EntityState)this).isAuthority, ((EntityState)this).inputBank); } 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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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_0178: Expected O, but got Unknown //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_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_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) 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.blueOrbShot, 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.blueOrbGroundHit, ((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_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(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; private bool hasCancelledWithMovement; 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_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_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_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0206: 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_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Expected O, but got Unknown //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_028b: 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 = DamageTypeCombo.op_Implicit((DamageType)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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Invalid comparison between Unknown and I4 //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0203: 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); } 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.yellowOrbSwing, val, true); } } if (!(((EntityState)this).age >= duration * earlyEnd) || !((EntityState)this).isAuthority) { return; } if (isStrong && (int)((EntityState)this).outer.state.GetMinimumInterruptPriority() != 7) { ((EntityState)this).outer.SetNextState((EntityState)(object)new YellowOrbFinisher()); return; } BodyInputCheckHelper.CheckForOtherInputs(((EntityState)this).skillLocator, ((EntityState)this).isAuthority, ((EntityState)this).inputBank); ((EntityState)this).characterMotor.gravityParameters = oldGravParams; if (!hasPlayedBulletCasingSFX) { hasPlayedBulletCasingSFX = true; NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, "c_liRk4_skill_yellow_bullet"), (NetworkDestination)1); } if (Object.op_Implicit((Object)(object)orbController) && !hasUnsetOrbController && !isStrong) { hasUnsetOrbController = true; orbController.isExecutingSkill = false; } if (((EntityState)this).inputBank.moveVector != Vector3.zero && (int)((EntityState)this).outer.state.GetMinimumInterruptPriority() != 7 && !hasCancelledWithMovement) { ((EntityState)this).outer.SetNextStateToMain(); hasCancelledWithMovement = true; } } public override void FixedUpdate() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); if (((EntityState)this).fixedAge >= duration * fireFrac && ((EntityState)this).isAuthority && !hasFired) { hasFired = true; FireAttack(); } if (((EntityState)this).fixedAge >= duration * GravityEndFrac) { ((EntityState)this).characterMotor.gravityParameters = oldGravParams; } if (((EntityState)this).fixedAge >= duration * invincibilityStartFrac && ((EntityState)this).fixedAge <= duration * invincibilityEndFrac && NetworkServer.active && !invincibilitySet) { invincibilitySet = true; ((EntityState)this).characterBody.AddTimedBuff(Buffs.invincibilityBuff.buffIndex, duration * invincibilityEndFrac - duration * invincibilityStartFrac); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public void FireAttack() { //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: 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_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 3; i++) { for (int j = 0; j < attackAmount; j++) { Result val = blastAttack.Fire(); } if (partialAttack > 0f) { blastAttack.baseDamage *= partialAttack; blastAttack.procCoefficient *= partialAttack; blastAttack.radius *= partialAttack; blastAttack.baseForce *= partialAttack; Result val2 = blastAttack.Fire(); } } BlastAttack val3 = new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = null, teamIndex = ((BaseState)this).GetTeam() }; Vector3 position = ((EntityState)this).gameObject.transform.position; Ray aimRay = ((BaseState)this).GetAimRay(); val3.position = position + ((Ray)(ref aimRay)).direction * 2.5f; val3.radius = ((moveStrength >= 3) ? 4f : 1f) * 8f; val3.falloffModel = (FalloffModel)0; val3.baseDamage = 1f; val3.baseForce = 0f; val3.bonusForce = Vector3.zero; val3.crit = ((BaseState)this).RollCrit(); val3.damageType = DamageTypeCombo.op_Implicit((DamageType)0); val3.losType = (LoSType)0; val3.canRejectForce = false; val3.procChainMask = default(ProcChainMask); val3.procCoefficient = 1f; Result val4 = val3.Fire(); if (val4.hitCount > 0) { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, "Play_c_liRk4_imp_yellow_1"), (NetworkDestination)1); OnHitEnemyAuthority(val4); } } public void OnHitEnemyAuthority(Result result) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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_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_004e: Expected O, but got Unknown HitPoint[] hitPoints = result.hitPoints; foreach (HitPoint val in hitPoints) { EffectData val2 = new EffectData { origin = val.hurtBox.healthComponent.body.corePosition, rotation = Quaternion.identity, scale = 5f }; EffectManager.SpawnEffect(ParticleAssets.yellowOrbSwingHit, val2, true); } } 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(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class YellowOrbDomain : BaseRootMotionMoverState { public float start = 0f; public float earlyEnd = 0.41f; public float fireTime = 0.01f; public float returnModelTime = 0.23f; public float fireEndTime = 0.25f; public float baseFireInterval = 0.07f; public float fireInterval; public float duration = 2.8f; public int moveStrength; public float fireStopwatch; public int fireCount = 0; internal BlastAttack blastAttack; internal OrbController orbController; internal LeeHyperrealDomainController domainController; internal WeaponModelHandler weaponModelHandler; internal bool isStrong; internal float procCoefficient = 1f; internal float damageCoefficient = 0.45f; private float movementMultiplier = 1f; private Transform baseTransform; private CharacterGravityParameters gravParams; private CharacterGravityParameters oldGravParams; private float turnOffGravityFrac = 0.18f; private float turnOnGravityFrac = 0.3f; private float midmoveVFXrepeatFrac = 0.2f; private bool midmoveVFXrepeatplayed = false; private bool hasCancelledWithMovement = false; private float invincibilityOnFrac = 0.05f; private float invincibilityOffFrac = 0.25f; private bool invincibilityApplied = false; private bool hasUnsetOrbController; public override void OnEnter() { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: 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_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0165: 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_016c: 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_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: 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_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Expected O, but got Unknown //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: 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_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (m