Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of VoidlingEX v1.0.0
VoidlingEX.dll
Decompiled 2 years ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using EntityStates; using EntityStates.VoidRaidCrab; using EntityStates.VoidRaidCrab.Weapon; using HG; using HG.Reflection; using KinematicCharacterController; using Microsoft.CodeAnalysis; using MysticsRisky2Utils; using MysticsRisky2Utils.BaseAssetTypes; using MysticsRisky2Utils.ContentManagement; using On.EntityStates.VoidRaidCrab; using On.EntityStates.VoidRaidCrab.Weapon; using On.RoR2; using On.RoR2.UI; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using RoR2; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering.PostProcessing; using VoidlingEX; using VoidlingEX.Buffs; using VoidlingEX.Modifiers.Special; using VoidlingEX.PostProcessing; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyCompany("VoidlingEX")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("VoidlingEX")] [assembly: AssemblyTitle("VoidlingEX")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace ChallengeMode.Buffs { public class Disarmed : BaseBuff { public static Dictionary<CharacterBody, TemporaryVisualEffect> tempVisualEffectPerBody = new Dictionary<CharacterBody, TemporaryVisualEffect>(); public override void OnLoad() { //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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown ((Object)base.buffDef).name = "VoidlingEX_Disarmed"; base.buffDef.buffColor = Color32.op_Implicit(new Color32((byte)247, (byte)61, (byte)77, byte.MaxValue)); base.buffDef.canStack = false; base.buffDef.isDebuff = true; base.buffDef.isHidden = false; base.buffDef.iconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Nullifier/texBuffNullifiedIcon.tif").WaitForCompletion(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); CharacterBody.UpdateAllTemporaryVisualEffects += new hook_UpdateAllTemporaryVisualEffects(CharacterBody_UpdateAllTemporaryVisualEffects); Run.AdvanceStage += new hook_AdvanceStage(Run_AdvanceStage); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(base.buffDef)) { if (Object.op_Implicit((Object)(object)sender.skillLocator.primary)) { sender.skillLocator.primary.SetSkillOverride((object)sender, VoidlingEXAssets.skillDisarmed, (SkillOverridePriority)4); } } else if (Object.op_Implicit((Object)(object)sender.skillLocator.primary)) { sender.skillLocator.primary.UnsetSkillOverride((object)sender, VoidlingEXAssets.skillDisarmed, (SkillOverridePriority)4); } } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); if (self.HasBuff(base.buffDef)) { self.maxJumpCount -= 9999; } } private void CharacterBody_UpdateAllTemporaryVisualEffects(orig_UpdateAllTemporaryVisualEffects orig, CharacterBody self) { orig.Invoke(self); if (!tempVisualEffectPerBody.ContainsKey(self)) { tempVisualEffectPerBody[self] = null; } TemporaryVisualEffect value = tempVisualEffectPerBody[self]; self.UpdateSingleTemporaryVisualEffect(ref value, AssetReferences.nullifyStack1EffectPrefab, self.radius, self.HasBuff(base.buffDef), ""); tempVisualEffectPerBody[self] = value; } private void Run_AdvanceStage(orig_AdvanceStage orig, Run self, SceneDef nextScene) { orig.Invoke(self, nextScene); tempVisualEffectPerBody.Clear(); } } } namespace VoidlingEX { public class BrotherEXAssets : BaseLoadableAsset { public class ChallengeModeSkyLeapHomingController : MonoBehaviour { public CharacterBody body; public GameObject warningCircle; public Transform warningCircleTransform; public float leapAcceleration = 40f; public float leapMaxSpeed = 30f; public Vector3 leapSpeed = Vector3.zero; public Vector3 homingPosition = Vector3.zero; private Vector3 spareVector = Vector3.zero; public void Start() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_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) warningCircle = Object.Instantiate<GameObject>(leapWarningCircle, new Vector3(((Component)this).transform.position.x, 0f, ((Component)this).transform.position.z), Quaternion.identity); warningCircleTransform = warningCircle.transform; } public void FixedUpdate() { //IL_0076: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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_00bd: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_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_01d2: 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_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_020c: 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_025e: 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_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0220: 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_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body) && body.master.aiComponents.Length != 0 && body.master.aiComponents[0].currentEnemy != null) { homingPosition = body.master.aiComponents[0].currentEnemy.lastKnownBullseyePosition.Value; homingPosition.y = 0f; } Vector3 position = ((Component)this).transform.position; position.y = 0f; Vector3 val = leapSpeed; Vector3 val2 = homingPosition - position; leapSpeed = val + ((Vector3)(ref val2)).normalized * leapAcceleration * Time.fixedDeltaTime; if (Mathf.Abs(leapSpeed.x) > leapMaxSpeed) { leapSpeed.x = Mathf.Sign(leapSpeed.x) * leapMaxSpeed; } if (Mathf.Abs(leapSpeed.z) > leapMaxSpeed) { leapSpeed.z = Mathf.Sign(leapSpeed.z) * leapMaxSpeed; } Transform transform = ((Component)this).transform; transform.position += leapSpeed * Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)body) && body.hasEffectiveAuthority) { ((BaseCharacterController)body.characterMotor).Motor.SetPosition(new Vector3(((Component)this).transform.position.x, body.transform.position.y, ((Component)this).transform.position.z), true); } float y = 491f; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(new Ray(new Vector3(((Component)this).transform.position.x, 560f, ((Component)this).transform.position.z), Vector3.down), ref val3, 500f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)0)) { y = ((RaycastHit)(ref val3)).point.y; } spareVector.x = ((Component)this).transform.position.x; spareVector.y = y; spareVector.z = ((Component)this).transform.position.z; ((Component)this).transform.position = spareVector; warningCircleTransform.position = spareVector; } public void OnEnable() { InstanceTracker.Add<ChallengeModeSkyLeapHomingController>(this); } public void OnDisable() { InstanceTracker.Remove<ChallengeModeSkyLeapHomingController>(this); } public void OnDestroy() { if (Object.op_Implicit((Object)(object)warningCircle)) { Object.Destroy((Object)(object)warningCircle); } } } [CompilerGenerated] private static class <>O { public static DamageReportEventHandler <0>__GenericGameEvents_OnTakeDamage; } public static GameObject arenaEffectsPrefab; public static ModdedDamageType destroyItemDamageType; public static SkillDef playerStunLockedSkill; public static GameObject skyLeapHomingController; public static GameObject leapWarningCircle; public override void OnPluginAwake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((BaseLoadableAsset)this).OnPluginAwake(); destroyItemDamageType = DamageAPI.ReserveDamageType(); skyLeapHomingController = Utils.CreateBlankPrefab("VoidlingEX_SkyLeapHomingController", true); skyLeapHomingController.AddComponent<NetworkTransform>(); skyLeapHomingController.GetComponent<NetworkIdentity>().localPlayerAuthority = true; skyLeapHomingController.AddComponent<ChallengeModeSkyLeapHomingController>(); } public override void Load() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_009a: 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_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown arenaEffectsPrefab = VoidlingEX.AssetBundle.LoadAsset<GameObject>("Assets/Mods/ChallengeMode/Modifiers/BrotherEX/BrotherEXArenaEffects.prefab"); playerStunLockedSkill = ScriptableObject.CreateInstance<SkillDef>(); playerStunLockedSkill.skillName = "VoidlingEX_StunLocked"; playerStunLockedSkill.skillNameToken = "VoidlingEX_SKILL_PLAYERSTUNLOCKED_NAME"; playerStunLockedSkill.skillDescriptionToken = "VoidlingEX_SKILL_PLAYERSTUNLOCKED_DESCRIPTION"; playerStunLockedSkill.icon = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Engi/EngiCancelTargetingDummy.asset").WaitForCompletion().icon; playerStunLockedSkill.activationStateMachineName = "Weapon"; playerStunLockedSkill.activationState = new SerializableEntityStateType(typeof(Idle)); playerStunLockedSkill.interruptPriority = (InterruptPriority)0; playerStunLockedSkill.baseRechargeInterval = 0f; playerStunLockedSkill.baseMaxStock = 0; playerStunLockedSkill.rechargeStock = 0; playerStunLockedSkill.requiredStock = 0; playerStunLockedSkill.stockToConsume = 0; playerStunLockedSkill.resetCooldownTimerOnUse = false; playerStunLockedSkill.fullRestockOnAssign = false; playerStunLockedSkill.dontAllowPastMaxStocks = false; playerStunLockedSkill.beginSkillCooldownOnSkillEnd = false; playerStunLockedSkill.cancelSprintingOnActivation = false; playerStunLockedSkill.forceSprintDuringState = false; playerStunLockedSkill.canceledFromSprinting = false; playerStunLockedSkill.isCombatSkill = false; playerStunLockedSkill.mustKeyPress = true; VoidlingEXContent.Resources.skillDefs.Add(playerStunLockedSkill); object obj = <>O.<0>__GenericGameEvents_OnTakeDamage; if (obj == null) { DamageReportEventHandler val = GenericGameEvents_OnTakeDamage; <>O.<0>__GenericGameEvents_OnTakeDamage = val; obj = (object)val; } GenericGameEvents.OnTakeDamage += (DamageReportEventHandler)obj; leapWarningCircle = VoidlingEX.AssetBundle.LoadAsset<GameObject>("Assets/Mods/ChallengeMode/Modifiers/BrotherEX/SkyLeapWarning.prefab"); ((BaseLoadableAsset)this).OnLoad(); base.asset = arenaEffectsPrefab; } private static void GenericGameEvents_OnTakeDamage(DamageReport damageReport) { //IL_0010: 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_00f0: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && DamageAPI.HasModdedDamageType(damageReport.damageInfo, destroyItemDamageType) && Object.op_Implicit((Object)(object)damageReport.victimMaster) && Object.op_Implicit((Object)(object)damageReport.victimMaster.inventory)) { List<ItemDef> list = (from x in damageReport.victimMaster.inventory.itemAcquisitionOrder select ItemCatalog.GetItemDef(x) into x where (Object)(object)x != (Object)null && x.canRemove && !x.hidden select x).ToList(); if (list.Count > 0) { ItemDef val = RoR2Application.rng.NextElementUniform<ItemDef>(list); damageReport.victimMaster.inventory.RemoveItem(val, 1); damageReport.victimMaster.inventory.GiveItem(Items.ScrapWhite, 1); CharacterMasterNotificationQueue.SendTransformNotification(damageReport.victimMaster, val.itemIndex, Items.ScrapWhite.itemIndex, (TransformationType)0); } } } } public class EXBossAssets : BaseLoadableAsset { public static GameObject fightEffectsPrefab; public static GameObject fightEffectsInstance; public static bool fightEffectsActive { get { return (Object)(object)fightEffectsInstance != (Object)null; } set { if (Object.op_Implicit((Object)(object)fightEffectsInstance) == value) { return; } if (value) { if (Object.op_Implicit((Object)(object)fightEffectsPrefab)) { fightEffectsInstance = Object.Instantiate<GameObject>(fightEffectsPrefab); WeatherParticles obj = fightEffectsInstance.AddComponent<WeatherParticles>(); obj.lockPosition = true; obj.lockRotation = false; } } else if (Object.op_Implicit((Object)(object)fightEffectsInstance)) { Object.Destroy((Object)(object)fightEffectsInstance); } } } public override void Load() { fightEffectsPrefab = VoidlingEX.AssetBundle.LoadAsset<GameObject>("Assets/Mods/ChallengeMode/EXBoss/EXBossFightEffects.prefab"); ((BaseLoadableAsset)this).OnLoad(); base.asset = fightEffectsPrefab; } } [BepInPlugin("com.Nuxlar.VoidlingEX", "VoidlingEX", "1.0.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class VoidlingEX : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Action <>9__9_0; public static CollectContentPackProvidersDelegate <>9__9_1; internal void <Awake>b__9_0() { new VoidRaidCrabEX(); } internal void <Awake>b__9_1(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)new VoidlingEXContent()); } } public const string PluginGUID = "com.Nuxlar.VoidlingEX"; public const string PluginName = "VoidlingEX"; public const string PluginVersion = "1.0.0"; public static Assembly executingAssembly; internal static PluginInfo pluginInfo; internal static Type declaringType; private static AssetBundle _assetBundle; public static AssetBundle AssetBundle { get { if ((Object)(object)_assetBundle == (Object)null) { _assetBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(pluginInfo.Location), "challengemodeassetbundle")); } return _assetBundle; } } public void Awake() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown pluginInfo = ((BaseUnityPlugin)this).Info; executingAssembly = Assembly.GetExecutingAssembly(); declaringType = MethodBase.GetCurrentMethod().DeclaringType; RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, (Action)delegate { new VoidRaidCrabEX(); }); ContentLoadHelper.PluginAwakeLoad<BaseItem>(executingAssembly); ContentLoadHelper.PluginAwakeLoad<BaseBuff>(executingAssembly); ContentLoadHelper.PluginAwakeLoad<BaseCharacterBody>(executingAssembly); ContentLoadHelper.PluginAwakeLoad<BaseCharacterMaster>(executingAssembly); ContentLoadHelper.PluginAwakeLoad<VoidlingEXAssets>(executingAssembly); object obj = <>c.<>9__9_1; if (obj == null) { CollectContentPackProvidersDelegate val = delegate(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)new VoidlingEXContent()); }; <>c.<>9__9_1 = val; obj = (object)val; } ContentManager.collectContentPackProviders += (CollectContentPackProvidersDelegate)obj; } } public class VoidlingEXContent : IContentPackProvider { public static class Resources { public static List<GameObject> projectilePrefabs = new List<GameObject>(); public static List<GameObject> effectPrefabs = new List<GameObject>(); public static List<GameObject> bodyPrefabs = new List<GameObject>(); public static List<GameObject> masterPrefabs = new List<GameObject>(); public static List<SkillDef> skillDefs = new List<SkillDef>(); public static List<SkillFamily> skillFamilies = new List<SkillFamily>(); } public static class Items { public static ItemDef VoidlingEX_PermanentImmuneToVoidDeath; } public static class Buffs { public static BuffDef VoidlingEX_EXBoss; public static BuffDef VoidlingEX_Disarmed; public static BuffDef VoidlingEX_VoidRaidCrabScare; public static BuffDef VoidlingEX_PlayerKnockupStun; } private ContentPack contentPack = new ContentPack(); public string identifier => "VoidlingEX"; public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; ContentLoadHelper contentLoadHelper = new ContentLoadHelper(); Action[] loadDispatchers2 = new Action[6] { delegate { contentLoadHelper.DispatchLoad<ItemDef>(VoidlingEX.executingAssembly, typeof(BaseItem), (Action<ItemDef[]>)delegate(ItemDef[] x) { contentPack.itemDefs.Add(x); }); }, delegate { contentLoadHelper.DispatchLoad<BuffDef>(VoidlingEX.executingAssembly, typeof(BaseBuff), (Action<BuffDef[]>)delegate(BuffDef[] x) { contentPack.buffDefs.Add(x); }); }, delegate { contentLoadHelper.DispatchLoad<GameObject>(VoidlingEX.executingAssembly, typeof(BaseCharacterBody), (Action<GameObject[]>)delegate(GameObject[] x) { contentPack.bodyPrefabs.Add(x); }); }, delegate { contentLoadHelper.DispatchLoad<GameObject>(VoidlingEX.executingAssembly, typeof(BaseCharacterMaster), (Action<GameObject[]>)delegate(GameObject[] x) { contentPack.masterPrefabs.Add(x); }); }, delegate { contentLoadHelper.DispatchLoad<GameObject>(VoidlingEX.executingAssembly, typeof(EXBossAssets), (Action<GameObject[]>)null); }, delegate { contentLoadHelper.DispatchLoad<GameObject>(VoidlingEX.executingAssembly, typeof(VoidlingEXAssets), (Action<GameObject[]>)null); } }; int k = 0; while (k < loadDispatchers2.Length) { loadDispatchers2[k](); args.ReportProgress(Util.Remap((float)(k + 1), 0f, (float)loadDispatchers2.Length, 0f, 0.05f)); yield return null; int num = k + 1; k = num; } while (contentLoadHelper.coroutine.MoveNext()) { args.ReportProgress(Util.Remap(contentLoadHelper.progress.value, 0f, 1f, 0.05f, 0.9f)); yield return contentLoadHelper.coroutine.Current; } loadDispatchers2 = new Action[7] { delegate { ContentLoadHelper.PopulateTypeFields<ItemDef>(typeof(Items), contentPack.itemDefs, (Func<string, string>)null); }, delegate { ContentLoadHelper.PopulateTypeFields<BuffDef>(typeof(Buffs), contentPack.buffDefs, (Func<string, string>)null); }, delegate { contentPack.bodyPrefabs.Add(Resources.bodyPrefabs.ToArray()); }, delegate { contentPack.masterPrefabs.Add(Resources.masterPrefabs.ToArray()); }, delegate { contentPack.effectDefs.Add(Resources.effectPrefabs.ConvertAll((Converter<GameObject, EffectDef>)((GameObject x) => new EffectDef(x))).ToArray()); }, delegate { contentPack.skillDefs.Add(Resources.skillDefs.ToArray()); }, delegate { contentPack.skillFamilies.Add(Resources.skillFamilies.ToArray()); } }; k = 0; while (k < loadDispatchers2.Length) { loadDispatchers2[k](); args.ReportProgress(Util.Remap((float)(k + 1), 0f, (float)loadDispatchers2.Length, 0.9f, 0.95f)); yield return null; int num = k + 1; k = num; } loadDispatchers2 = new Action[2] { delegate { ContentLoadHelper.InvokeAfterContentPackLoaded<BaseItem>(VoidlingEX.executingAssembly); }, delegate { ContentLoadHelper.InvokeAfterContentPackLoaded<BaseBuff>(VoidlingEX.executingAssembly); } }; k = 0; while (k < loadDispatchers2.Length) { loadDispatchers2[k](); args.ReportProgress(Util.Remap((float)(k + 1), 0f, (float)loadDispatchers2.Length, 0.95f, 0.99f)); yield return null; int num = k + 1; k = num; } } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } public static class VoidlingEXUtils { public static event Func<CharacterBody, bool> onGetBodyIsHot; public static event Func<CharacterBody, bool> onGetBodyIsCold; public static bool CurrentStageNameMatches(string stageName) { if (Object.op_Implicit((Object)(object)Stage.instance) && (Object)(object)Stage.instance.sceneDef != (Object)null) { return Stage.instance.sceneDef.baseSceneName == stageName; } return false; } public static bool CurrentStageHasCommonInteractables() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)Stage.instance) && (Object)(object)Stage.instance.sceneDef != (Object)null && (int)Stage.instance.sceneDef.sceneType != 1) { return false; } foreach (string item in new List<string> { "moon2", "voidstage", "voidraid", "arena" }) { if (CurrentStageNameMatches(item)) { return false; } } return true; } public static bool CurrentStageHasBosses() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)Stage.instance) && (Object)(object)Stage.instance.sceneDef != (Object)null && ((int)Stage.instance.sceneDef.sceneType == 3 || (int)Stage.instance.sceneDef.sceneType == 0 || (int)Stage.instance.sceneDef.sceneType == -1)) { return false; } foreach (string item in new List<string> { "bazaar", "arena", "voidstage" }) { if (CurrentStageNameMatches(item)) { return false; } } return true; } public static void RemoveFromArray<T>(ref T[] array, T element) { int num = Array.IndexOf(array, element); if (num != -1) { ArrayUtils.ArrayRemoveAtAndResize<T>(ref array, num, 1); } } public static float MoveNumberTowards(float current, float target, float speed) { if (current < target) { current = Mathf.Min(current + speed, target); } else if (current > target) { current = Mathf.Max(current - speed, target); } return current; } public static bool IsBodyUnderCeiling(CharacterBody body) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_0020: 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) return Physics.Raycast(new Ray(body.corePosition + Vector3.up * body.radius, Vector3.up), 500f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1); } public static bool BodyIsHot(CharacterBody body) { bool flag = body.HasBuff(Buffs.OnFire) || body.HasBuff(Buffs.StrongerBurn); if (!flag) { DotController val = DotController.FindDotController(((Component)body).gameObject); if (Object.op_Implicit((Object)(object)val) && val.HasDotActive((DotIndex)2)) { flag = true; } } if (!flag && VoidlingEXUtils.onGetBodyIsHot != null) { flag = VoidlingEXUtils.onGetBodyIsHot(body); } return flag; } public static bool BodyIsCold(CharacterBody body) { bool flag = body.HasBuff(Buffs.Slow80) || (Object.op_Implicit((Object)(object)body.healthComponent) && body.healthComponent.isInFrozenState); if (!flag && VoidlingEXUtils.onGetBodyIsCold != null) { flag = VoidlingEXUtils.onGetBodyIsCold(body); } return flag; } } public class VoidlingEXAssets : BaseLoadableAsset { public class VoidlingEXDisarmingProjectile : MonoBehaviour, IOnDamageInflictedServerReceiver { public void OnDamageInflictedServer(DamageReport damageReport) { CharacterBody victimBody = damageReport.victimBody; if (Object.op_Implicit((Object)(object)victimBody)) { victimBody.AddTimedBuff(VoidlingEXContent.Buffs.VoidlingEX_Disarmed, 4f * damageReport.damageInfo.procCoefficient); } } } public class FireDisarmingOrb : BaseState { public static GameObject muzzleFlashPrefab; public static GameObject projectilePrefab; public static float baseDuration = 0.12f; public static float baseDurationLastFired = 2f; public float duration; public Transform muzzle; public float damageCoefficient = 0.3f; public float force = 100f; public float coneSpreadAngle = 6.5f; public override void OnEnter() { //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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; if (((EntityState)this).skillLocator.primaryBonusStockSkill.stock <= 0) { duration = baseDurationLastFired / base.attackSpeedStat; } muzzle = ((BaseState)this).FindModelChild("EyeProjectileCenter"); if (!Object.op_Implicit((Object)(object)muzzle)) { muzzle = ((EntityState)this).characterBody.coreTransform; } ((EntityState)this).PlayAnimation("Gesture", "FireEyeBlast", "Eyeblast.playbackRate", duration); EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, "EyeProjectileCenter", false); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); Quaternion val = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = projectilePrefab; val2.position = muzzle.position; val2.owner = ((EntityState)this).gameObject; val2.damage = base.damageStat * damageCoefficient; val2.force = force; val2.crit = ((EntityState)this).characterBody.RollCrit(); val2.rotation = val * GetRandomRollPitch(); FireProjectileInfo val3 = val2; ProjectileManager.instance.FireProjectile(val3); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public Quaternion GetRandomRollPitch() { //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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) return Quaternion.AngleAxis(Random.Range(0f, 360f), Vector3.forward) * Quaternion.AngleAxis(Random.Range(0f, coneSpreadAngle), Vector3.left); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class ChargeAheadLaser : BaseState { public static GameObject muzzleFlashPrefab; public static GameObject laserPrefab; public static float baseDuration = 2f; public static float laserMaxWidth = 0.6f; public static string muzzleFlashSoundString = "Play_voidRaid_snipe_chargeUp"; public static float muzzleFlashDuration = 0.3f; public float duration; public BullseyeSearch enemyFinder; public HurtBox lockedOnHurtBox; public CharacterBody lockedOnBody; public GameObject chargeEffect; public GameObject laserEffect; public LineRenderer laserLineComponent; public float flashTimer; public bool laserOn = true; public Transform muzzle; public bool muzzleFlashed; public Ray currentRay; public Vector3 currentRayEndPos; public float aimVelocity; public float aimVectorDampTime = 0.1f; public float aimVectorMaxSpeed = 20f; public float aheadFactor = 1.16f; public override void OnEnter() { //IL_0019: 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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_0042: 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_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_0071: 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) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; Ray aimRay = ((BaseState)this).GetAimRay(); enemyFinder = new BullseyeSearch(); enemyFinder.maxDistanceFilter = 2000f; enemyFinder.searchOrigin = ((Ray)(ref aimRay)).origin; enemyFinder.searchDirection = ((Ray)(ref aimRay)).direction; enemyFinder.filterByLoS = false; enemyFinder.sortMode = (SortMode)2; enemyFinder.teamMaskFilter = TeamMask.allButNeutral; if (Object.op_Implicit((Object)(object)((EntityState)this).teamComponent)) { ((TeamMask)(ref enemyFinder.teamMaskFilter)).RemoveTeam(((EntityState)this).teamComponent.teamIndex); } enemyFinder.RefreshCandidates(); lockedOnHurtBox = enemyFinder.GetResults().FirstOrDefault(); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { muzzle = modelChildLocator.FindChild("EyeProjectileCenter"); if (!Object.op_Implicit((Object)(object)muzzle)) { muzzle = ((EntityState)this).characterBody.coreTransform; } if (Object.op_Implicit((Object)(object)laserPrefab)) { laserEffect = Object.Instantiate<GameObject>(laserPrefab, muzzle.position, muzzle.rotation); laserEffect.transform.parent = muzzle; laserLineComponent = laserEffect.GetComponent<LineRenderer>(); } } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(duration); } currentRay = ((BaseState)this).GetAimRay(); if (Object.op_Implicit((Object)(object)lockedOnHurtBox) && Object.op_Implicit((Object)(object)lockedOnHurtBox.hurtBoxGroup) && Object.op_Implicit((Object)(object)lockedOnHurtBox.hurtBoxGroup.mainHurtBox) && Object.op_Implicit((Object)(object)lockedOnHurtBox.hurtBoxGroup.mainHurtBox.healthComponent) && Object.op_Implicit((Object)(object)lockedOnHurtBox.hurtBoxGroup.mainHurtBox.healthComponent.body)) { lockedOnBody = lockedOnHurtBox.hurtBoxGroup.mainHurtBox.healthComponent.body; if (lockedOnBody.isFlying) { aheadFactor = 0f; } } } public override void Update() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_0147: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_0198: 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_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_01a7: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_0272: 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) ((EntityState)this).Update(); if (!Object.op_Implicit((Object)(object)laserEffect) || !Object.op_Implicit((Object)(object)laserLineComponent)) { return; } float num = 1000f; Ray val = currentRay; if (Object.op_Implicit((Object)(object)lockedOnHurtBox)) { Vector3 val2 = Vector3.zero; if (Object.op_Implicit((Object)(object)lockedOnBody)) { if (Object.op_Implicit((Object)(object)lockedOnBody.characterMotor)) { val2 += lockedOnBody.characterMotor.velocity; } if (Object.op_Implicit((Object)(object)lockedOnBody.rigidbody)) { val2 += lockedOnBody.rigidbody.velocity; } } val2.y = 0f; Vector3 val3 = ((Component)lockedOnHurtBox).transform.position + val2 * aheadFactor - ((Ray)(ref val)).origin; Quaternion val4 = Util.QuaternionSafeLookRotation(((Vector3)(ref val3)).normalized); ((Ray)(ref val)).direction = Util.SmoothDampQuaternion(Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction), val4, ref aimVelocity, aimVectorDampTime, aimVectorMaxSpeed, Time.deltaTime) * Vector3.forward; } Vector3 position = laserEffect.transform.parent.position; Vector3 point = ((Ray)(ref val)).GetPoint(num); RaycastHit val5 = default(RaycastHit); if (Physics.Raycast(val, ref val5, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.defaultLayer)).mask), (QueryTriggerInteraction)1)) { point = ((RaycastHit)(ref val5)).point; } laserLineComponent.SetPosition(0, position); laserLineComponent.SetPosition(1, point); currentRay = val; currentRayEndPos = point; float num2 = 0f; if (duration - ((EntityState)this).age > 0.5f) { num2 = ((EntityState)this).age / duration; } else { flashTimer -= Time.deltaTime; if (flashTimer <= 0f) { laserOn = !laserOn; flashTimer = 1f / 30f; } num2 = (laserOn ? 1f : 0f); if (!muzzleFlashed) { muzzleFlashed = true; Util.PlaySound(muzzleFlashSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)muzzle) && Object.op_Implicit((Object)(object)muzzleFlashPrefab)) { chargeEffect = Object.Instantiate<GameObject>(muzzleFlashPrefab, muzzle.position, muzzle.rotation); chargeEffect.transform.parent = muzzle; ScaleParticleSystemDuration component = chargeEffect.GetComponent<ScaleParticleSystemDuration>(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = muzzleFlashDuration; } } } } num2 *= laserMaxWidth; laserLineComponent.startWidth = num2; laserLineComponent.endWidth = num2; } public override void FixedUpdate() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireAheadLaser { forcedRay = currentRay, forcedBeamEndPos = currentRayEndPos }); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)chargeEffect)) { EntityState.Destroy((Object)(object)chargeEffect); } if (Object.op_Implicit((Object)(object)laserEffect)) { EntityState.Destroy((Object)(object)laserEffect); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FireAheadLaser : FireMultiBeamFinale { public static GameObject _muzzleEffectPrefab; public static GameObject _tracerEffectPrefab; public static GameObject _explosionEffectPrefab; public static GameObject _projectilePrefab; public Ray forcedRay; public Vector3 forcedBeamEndPos; public override void OnEnter() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown ((BaseFireMultiBeam)this).baseDuration = 0.4f; ((BaseFireMultiBeam)this).animationLayerName = "Gesture"; ((BaseFireMultiBeam)this).animationStateName = "FireMultiBeamFinale"; ((BaseFireMultiBeam)this).animationPlaybackRateParam = "MultiBeam.playbackRate"; ((BaseFireMultiBeam)this).enterSoundString = "Play_voidRaid_snipe_shoot_final"; ((BaseFireMultiBeam)this).muzzleEffectPrefab = _muzzleEffectPrefab; ((BaseFireMultiBeam)this).tracerEffectPrefab = _tracerEffectPrefab; ((BaseFireMultiBeam)this).explosionEffectPrefab = _explosionEffectPrefab; base.projectilePrefab = _projectilePrefab; base.projectileDamageCoefficient = 1f; ((BaseFireMultiBeam)this).blastDamageCoefficient = 3f; ((BaseFireMultiBeam)this).blastForceMagnitude = 5000f; ((BaseFireMultiBeam)this).blastRadius = 6f; ((BaseFireMultiBeam)this).blastBonusForce = Vector3.up * 100f; BaseMultiBeamState.CalcBeamPath += new hook_CalcBeamPath(BaseMultiBeamState_CalcBeamPath); ((BaseFireMultiBeam)this).OnEnter(); BaseMultiBeamState.CalcBeamPath -= new hook_CalcBeamPath(BaseMultiBeamState_CalcBeamPath); } private void BaseMultiBeamState_CalcBeamPath(orig_CalcBeamPath orig, BaseMultiBeamState self, out Ray beamRay, out Vector3 beamEndPos) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_001e: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, ref beamRay, ref beamEndPos); beamRay = forcedRay; beamEndPos = forcedBeamEndPos; } } public class FireDevastatorMortar : BaseState { public class RequestServerSpawnWarningEffect : INetMessage, ISerializableObject { private Vector3 origin; private Quaternion rotation; public RequestServerSpawnWarningEffect() { } public RequestServerSpawnWarningEffect(Vector3 origin, Quaternion rotation) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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) this.origin = origin; this.rotation = rotation; } public void Deserialize(NetworkReader reader) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) origin = reader.ReadVector3(); rotation = reader.ReadQuaternion(); } public void OnReceived() { //IL_0019: 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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown if (NetworkServer.active && Object.op_Implicit((Object)(object)warningEffectPrefab)) { EffectManager.SpawnEffect(warningEffectPrefab, new EffectData { origin = origin, rotation = rotation }, true); } } public void Serialize(NetworkWriter writer) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) writer.Write(origin); writer.Write(rotation); } } public static GameObject muzzleFlashPrefab; public static GameObject projectilePrefab; public static GameObject warningEffectPrefab; public static float baseDuration = 3.2f; public float duration; public Transform muzzle; public int projectileCount = 5; public float coneSpreadAngle = 20f; public float maxDistance = 500f; public float timeToTarget = 2.5f; public float defaultLaunchMagnitude = 150f; public float horizontalCorrection = 0.952f; 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_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_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_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_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: 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_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0231: 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_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: 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_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0215: 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_021c: 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_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Expected O, but got Unknown ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; muzzle = ((BaseState)this).FindModelChild("EyeProjectileCenter"); if (!Object.op_Implicit((Object)(object)muzzle)) { muzzle = ((EntityState)this).characterBody.coreTransform; } ((EntityState)this).PlayAnimation("Gesture", "FireEyeBlast", "Eyeblast.playbackRate", duration); EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, "EyeProjectileCenter", false); if (!((EntityState)this).isAuthority) { return; } RaycastHit val2 = default(RaycastHit); Vector2 val4 = default(Vector2); Vector3 direction2 = default(Vector3); for (int i = 0; i < projectileCount; i++) { Ray aimRay = ((BaseState)this).GetAimRay(); ((Ray)(ref aimRay)).origin = muzzle.position; Vector3 point = ((Ray)(ref aimRay)).GetPoint(maxDistance); Vector3 direction = ((Ray)(ref aimRay)).direction; Vector3 val = -((Vector3)(ref direction)).normalized; float magnitude = defaultLaunchMagnitude; int num = 20; for (int j = 0; j < num; j++) { Ray aimRay2 = ((BaseState)this).GetAimRay(); ((Ray)(ref aimRay2)).direction = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay2)).direction) * GetRandomRollPitch() * Vector3.forward; if (Util.CharacterRaycast(((EntityState)this).gameObject, aimRay2, ref val2, maxDistance, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)1)) { point = ((RaycastHit)(ref val2)).point; val = ((RaycastHit)(ref val2)).normal; Vector3 val3 = point - ((Ray)(ref aimRay2)).origin; ((Vector2)(ref val4))..ctor(val3.x, val3.z); float magnitude2 = ((Vector2)(ref val4)).magnitude; Vector2 val5 = val4 / magnitude2; float num2 = magnitude2 / timeToTarget * horizontalCorrection; float num3 = Trajectory.CalculateInitialYSpeed(timeToTarget, val3.y); ((Vector3)(ref direction2))..ctor(val5.x * num2, num3, val5.y * num2); magnitude = ((Vector3)(ref direction2)).magnitude; ((Ray)(ref aimRay)).direction = direction2; break; } } if (NetworkServer.active) { if (Object.op_Implicit((Object)(object)warningEffectPrefab)) { EffectManager.SpawnEffect(warningEffectPrefab, new EffectData { origin = point, rotation = Util.QuaternionSafeLookRotation(val) }, true); } } else { NetMessageExtensions.Send((INetMessage)(object)new RequestServerSpawnWarningEffect(point, Util.QuaternionSafeLookRotation(val)), (NetworkDestination)1); } Quaternion rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); FireProjectileInfo val6 = default(FireProjectileInfo); val6.projectilePrefab = projectilePrefab; val6.position = ((Ray)(ref aimRay)).origin; val6.owner = ((EntityState)this).gameObject; val6.damage = base.damageStat; val6.crit = ((EntityState)this).characterBody.RollCrit(); val6.rotation = rotation; ((FireProjectileInfo)(ref val6)).speedOverride = magnitude; FireProjectileInfo val7 = val6; ProjectileManager.instance.FireProjectile(val7); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public Quaternion GetRandomRollPitch() { //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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) return Quaternion.AngleAxis(Random.Range(0f, 360f), Vector3.forward) * Quaternion.AngleAxis(Random.Range(0f, coneSpreadAngle), Vector3.left); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class ChargeDirectLasers : BaseState { public static GameObject muzzleFlashPrefab; public static GameObject laserPrefab; public static float baseDuration = 5f; public static float laserMaxWidth = 0.4f; public static float lockOnAngle = 30f; public static string muzzleFlashSoundString = "Play_voidRaid_snipe_chargeUp"; public static float muzzleFlashDuration = 0.3f; public float duration; public GameObject chargeEffect; public GameObject laserEffect; public LineRenderer laserLineComponent; public float flashTimer; public bool laserOn = true; public Transform muzzle; public bool muzzleFlashed; public override void OnEnter() { //IL_0071: 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) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { muzzle = modelChildLocator.FindChild("EyeProjectileCenter"); if (!Object.op_Implicit((Object)(object)muzzle)) { muzzle = ((EntityState)this).characterBody.coreTransform; } if (Object.op_Implicit((Object)(object)laserPrefab)) { laserEffect = Object.Instantiate<GameObject>(laserPrefab, muzzle.position, muzzle.rotation); laserEffect.transform.parent = muzzle; laserLineComponent = laserEffect.GetComponent<LineRenderer>(); } } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(duration); } } public override void Update() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_0052: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_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_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) ((EntityState)this).Update(); if (!Object.op_Implicit((Object)(object)laserEffect) || !Object.op_Implicit((Object)(object)laserLineComponent)) { return; } float num = 1000f; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 position = laserEffect.transform.parent.position; Vector3 point = ((Ray)(ref aimRay)).GetPoint(num); RaycastHit val = default(RaycastHit); if (Physics.Raycast(aimRay, ref val, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.defaultLayer)).mask))) { point = ((RaycastHit)(ref val)).point; } laserLineComponent.SetPosition(0, position); laserLineComponent.SetPosition(1, point); float num2 = 0f; if (duration - ((EntityState)this).age > 0.5f) { num2 = ((EntityState)this).age / duration; } else { flashTimer -= Time.deltaTime; if (flashTimer <= 0f) { laserOn = !laserOn; flashTimer = 1f / 30f; } num2 = (laserOn ? 1f : 0f); if (!muzzleFlashed) { muzzleFlashed = true; Util.PlaySound(muzzleFlashSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)muzzle) && Object.op_Implicit((Object)(object)muzzleFlashPrefab)) { chargeEffect = Object.Instantiate<GameObject>(muzzleFlashPrefab, muzzle.position, muzzle.rotation); chargeEffect.transform.parent = muzzle; ScaleParticleSystemDuration component = chargeEffect.GetComponent<ScaleParticleSystemDuration>(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = muzzleFlashDuration; } } } } num2 *= laserMaxWidth; laserLineComponent.startWidth = num2; laserLineComponent.endWidth = num2; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireDirectLasers()); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)chargeEffect)) { EntityState.Destroy((Object)(object)chargeEffect); } if (Object.op_Implicit((Object)(object)laserEffect)) { EntityState.Destroy((Object)(object)laserEffect); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FireDirectLasers : FireMultiBeamSmall { public int totalLasers = 3; public static GameObject _muzzleEffectPrefab; public static GameObject _tracerEffectPrefab; public static GameObject _explosionEffectPrefab; public override void OnEnter() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) ((BaseFireMultiBeam)this).baseDuration = 0.4f; ((BaseFireMultiBeam)this).animationLayerName = "Gesture"; ((BaseFireMultiBeam)this).animationStateName = "FireMultiBeamSmall"; ((BaseFireMultiBeam)this).animationPlaybackRateParam = "MultiBeam.playbackRate"; ((BaseFireMultiBeam)this).enterSoundString = "Play_voidRaid_snipe_shoot"; ((BaseFireMultiBeam)this).muzzleEffectPrefab = _muzzleEffectPrefab; ((BaseFireMultiBeam)this).tracerEffectPrefab = _tracerEffectPrefab; ((BaseFireMultiBeam)this).explosionEffectPrefab = _explosionEffectPrefab; ((BaseFireMultiBeam)this).blastDamageCoefficient = 2f; ((BaseFireMultiBeam)this).blastForceMagnitude = 3000f; ((BaseFireMultiBeam)this).blastRadius = 6f; ((BaseFireMultiBeam)this).blastBonusForce = Vector3.up * 100f; ((BaseFireMultiBeam)this).OnEnter(); } public override EntityState InstantiateNextState() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (base.fireIndex < totalLasers - 1) { return (EntityState)(object)new FireDirectLasers { fireIndex = base.fireIndex + 1 }; } return EntityStateCatalog.InstantiateState(((EntityState)this).outer.mainStateType); } } public class FireReaverBombPattern : BaseState { public static GameObject muzzleFlashPrefab; public static GameObject projectilePrefab; public float baseDuration = 3f; public float patternRadius = 175f; public int bombLineCount = 12; public int bombCountInLine = 3; public float bombOffsetInLine = 25f; public static float globalInitialRotation; public float duration; public Vector3 patternRootPosition; public bool useGlobalInitialRotation = true; public override void OnEnter() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_016a: 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_0173: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration; EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, "EyeProjectileCenter", false); Util.PlaySound("Play_voidRaid_m1_shoot", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Gesture", "FireEyeBlast", "Eyeblast.playbackRate", duration); patternRootPosition = GetActiveDonutPosition(((EntityState)this).transform.position); float num = 360f / (float)bombLineCount; float num2 = 0f; if (useGlobalInitialRotation) { num2 = globalInitialRotation; globalInitialRotation += num / 2f; } else { num2 = RoR2Application.rng.RangeFloat(0f, 360f); } for (int i = 0; i < bombLineCount; i++) { Vector3 val = Quaternion.AngleAxis(num2 + num * (float)i, Vector3.up) * Vector3.forward; for (int j = 0; j < bombCountInLine; j++) { Vector3 val2 = patternRootPosition + val * patternRadius; val2 -= val * bombOffsetInLine * (float)j; FireProjectileInfo val3 = default(FireProjectileInfo); val3.projectilePrefab = projectilePrefab; val3.position = val2; val3.rotation = Quaternion.identity; val3.owner = ((EntityState)this).gameObject; val3.damage = base.damageStat; val3.crit = ((EntityState)this).characterBody.RollCrit(); FireProjectileInfo val4 = val3; ProjectileManager.instance.FireProjectile(val4); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class ChargeKnockUp : BaseState { public static GameObject muzzleFlashPrefab; public static GameObject preBlastEffect; public static float baseDuration = 2f; public static float attackSpeedSoundScale = 0.54f; public GameObject beamVfxInstance; public float duration; public override void OnEnter() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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_0067: Invalid comparison between I4 and Unknown //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_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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_011a: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, "EyeProjectileCenter", false); Util.PlayAttackSpeedSound("Play_voidRaid_snipe_chargeUp", ((EntityState)this).gameObject, base.attackSpeedStat * attackSpeedSoundScale); CreateBeamVFXInstance(SpinBeamWindUp.warningLaserPrefab); TeamIndex team = ((BaseState)this).GetTeam(); Ray val = default(Ray); RaycastHit val2 = default(RaycastHit); for (int i = 0; i < TeamCatalog.teamDefs.Length; i++) { if ((sbyte)i == (int)team) { continue; } foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers((TeamIndex)(sbyte)i)) { if (Object.op_Implicit((Object)(object)teamMember.body) && NetworkServer.active && Object.op_Implicit((Object)(object)preBlastEffect)) { ((Ray)(ref val))..ctor(teamMember.body.footPosition, Vector3.down); float num = 100f; Vector3 point = ((Ray)(ref val)).GetPoint(num); if (Physics.Raycast(val, ref val2, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { point = ((RaycastHit)(ref val2)).point; } EffectManager.SpawnEffect(preBlastEffect, new EffectData { origin = point, scale = 8f }, true); } } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new KnockUpEveryone()); } } public void CreateBeamVFXInstance(GameObject beamVfxPrefab) { if ((Object)(object)beamVfxInstance == (Object)null) { beamVfxInstance = Object.Instantiate<GameObject>(beamVfxPrefab); beamVfxInstance.transform.SetParent(((BaseState)this).FindModelChild(BaseSpinBeamAttackState.headTransformNameInChildLocator), true); UpdateBeamTransforms(); RoR2Application.onLateUpdate += UpdateBeamTransformsInLateUpdate; } } public void DestroyBeamVFXInstance() { if ((Object)(object)beamVfxInstance != (Object)null) { RoR2Application.onLateUpdate -= UpdateBeamTransformsInLateUpdate; VfxKillBehavior.KillVfxObject(beamVfxInstance); beamVfxInstance = null; } } public void UpdateBeamTransformsInLateUpdate() { try { UpdateBeamTransforms(); } catch { } } private void UpdateBeamTransforms() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); beamVfxInstance.transform.SetPositionAndRotation(((Ray)(ref aimRay)).origin, Quaternion.LookRotation(((Ray)(ref aimRay)).direction)); } public override void OnExit() { DestroyBeamVFXInstance(); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class KnockUpEveryone : BaseState { public static GameObject blastEffect; public static float baseDuration = 1.5f; public float duration; public float force = 7000f; public override void OnEnter() { //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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Invalid comparison between I4 and Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture", "FireMultiBeamFinale", "MultiBeam.playbackRate", duration); TeamIndex team = ((BaseState)this).GetTeam(); Ray val = default(Ray); RaycastHit val2 = default(RaycastHit); for (int i = 0; i < TeamCatalog.teamDefs.Length; i++) { if ((sbyte)i == (int)team) { continue; } foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers((TeamIndex)(sbyte)i)) { if (!Object.op_Implicit((Object)(object)teamMember.body)) { continue; } Util.PlaySound("Play_roboBall_attack3_gravityBump_explo", ((Component)teamMember).gameObject); if (NetworkServer.active && Object.op_Implicit((Object)(object)blastEffect)) { ((Ray)(ref val))..ctor(teamMember.body.footPosition, Vector3.down); float num = 100f; Vector3 point = ((Ray)(ref val)).GetPoint(num); if (Physics.Raycast(val, ref val2, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { point = ((RaycastHit)(ref val2)).point; } EffectManager.SpawnEffect(blastEffect, new EffectData { origin = point, scale = 40f }, true); } PlayerKnockupStun.KnockupBody(teamMember.body, Vector3.up * force, 7f); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FireReaverBombSnake : BaseState { public class ChallengeModeVoidRaidCrabEXSnake : MonoBehaviour { public static GameObject projectilePrefab; public GameObject owner; public float angleSpeed = 4.5f; public float currentAngle; public float centerDistance = 150f; public float timer; public float interval = 0.1f; public float sineT; public float sineFrequency = 2f; public float sineAmplitude = 15f; public int bombsSpawned; public int bombLimit = 100; public void Awake() { currentAngle = RoR2Application.rng.RangeFloat(0f, 360f); if (Util.CheckRoll(50f, 0f, (CharacterMaster)null)) { angleSpeed = 0f - angleSpeed; } } public void FixedUpdate() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)owner) || !Object.op_Implicit((Object)(object)projectilePrefab)) { return; } timer -= Time.fixedDeltaTime; sineT += Time.fixedDeltaTime; if (timer <= 0f) { timer += interval; Vector3 val = Quaternion.AngleAxis(currentAngle, Vector3.up) * Vector3.forward; Vector3 position = ((Component)this).transform.position + val * (centerDistance + sineAmplitude * Mathf.Sin(sineT * sineFrequency * MathF.PI)); FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = projectilePrefab; val2.position = position; val2.rotation = Quaternion.identity; val2.owner = ((Component)this).gameObject; val2.damage = 1f; val2.crit = false; FireProjectileInfo val3 = val2; ProjectileManager.instance.FireProjectile(val3); currentAngle += angleSpeed; bombsSpawned++; if (bombsSpawned >= bombLimit) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } } public static GameObject muzzleFlashPrefab; public float baseDuration = 1f; public float duration; public override void OnEnter() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration; EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, "EyeProjectileCenter", false); Util.PlaySound("Play_voidRaid_snipe_chargeUp", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { GameObject val = new GameObject(); Vector3 activeDonutPosition = GetActiveDonutPosition(((EntityState)this).transform.position); val.transform.position = activeDonutPosition; val.AddComponent<ChallengeModeVoidRaidCrabEXSnake>().owner = ((EntityState)this).gameObject; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class EnterScream : BaseState { public static float baseDuration = 2f; public float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayAnimation("Body", "SuckEnter", "Suck.playbackRate", duration); Util.PlayAttackSpeedSound("Play_voidRaid_superLaser_chargeUp", ((EntityState)this).gameObject, base.attackSpeedStat); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Scream()); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class Scream : BaseState { public static LoopSoundDef loopSoundDef; public static GameObject screamFXPrefab; public float baseDuration = 6f; public float duration; public SoundLoopPtr loopPtr; public float tickTimer; public float tickFrequency = 0.5f; public Transform pushAwayOrigin; public float pushAwayPower = 7f; public float debuffDuration = 12f; public GameObject screamFX; public override void OnEnter() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayAnimation("Body", "SuckLoop", "Suck.playbackRate", duration); Util.PlaySound("Play_voidRaid_superLaser_start", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)loopSoundDef)) { loopPtr = LoopSoundManager.PlaySoundLoopLocal(((EntityState)this).gameObject, loopSoundDef); } ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { pushAwayOrigin = modelChildLocator.FindChild("Head"); if (Object.op_Implicit((Object)(object)pushAwayOrigin) && Object.op_Implicit((Object)(object)screamFXPrefab)) { screamFX = Object.Instantiate<GameObject>(screamFXPrefab, pushAwayOrigin); } } VoidlingEXPostProcessing.voidRaidCrabScreamIntensityTarget = 1f; } public override void Update() { //IL_0019: 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) ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { VoidlingEXPostProcessing.voidRaidCrabWorldPosition = ((EntityState)this).characterBody.corePosition; } } public override void FixedUpdate() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Invalid comparison between I4 and Unknown //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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitScream()); } bool flag = false; tickTimer -= Time.fixedDeltaTime; if (tickTimer <= 0f) { tickTimer += tickFrequency; flag = true; OnTick(); } Vector3 val = ((EntityState)this).characterBody.corePosition; if (Object.op_Implicit((Object)(object)pushAwayOrigin)) { val = pushAwayOrigin.position; } TeamIndex team = ((BaseState)this).GetTeam(); for (int i = 0; i < TeamCatalog.teamDefs.Length; i++) { if ((sbyte)i == (int)team) { continue; } foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers((TeamIndex)(sbyte)i)) { if (!Object.op_Implicit((Object)(object)teamMember.body)) { continue; } if (flag) { OnTickForEnemyBody(teamMember.body); } if (teamMember.body.hasEffectiveAuthority) { IDisplacementReceiver component = ((Component)teamMember.body).GetComponent<IDisplacementReceiver>(); if (component != null) { Vector3 val2 = teamMember.body.corePosition - val; component.AddDisplacement(((Vector3)(ref val2)).normalized * pushAwayPower * Time.fixedDeltaTime); } } } } } public virtual void OnTick() { } public virtual void OnTickForEnemyBody(CharacterBody body) { if (NetworkServer.active && debuffDuration > 0f) { body.AddTimedBuff(VoidlingEXContent.Buffs.VoidlingEX_VoidRaidCrabScare, debuffDuration); } } public override void OnExit() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) LoopSoundManager.StopSoundLoopLocal(loopPtr); Util.PlaySound("Play_voidRaid_superLaser_end", ((EntityState)this).gameObject); VoidlingEXPostProcessing.voidRaidCrabScreamIntensityTarget = 0f; if (Object.op_Implicit((Object)(object)screamFX)) { Object.Destroy((Object)(object)screamFX); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class ExitScream : BaseState { public static float baseDuration = 3.3333f; public float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayAnimation("Body", "SuckExit", "Suck.playbackRate", duration); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class EnterScreamCallForHelp : EnterScream { public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ScreamCallForHelp()); } } } public class ScreamCallForHelp : Scream { public static CharacterSpawnCard helperSpawnCard; public override void OnEnter() { baseDuration = 10f; tickFrequency = 3.5f; debuffDuration = 4f; base.OnEnter(); } public override void OnTick() { //IL_0017: 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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_004f: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown base.OnTick(); if (!Object.op_Implicit((Object)(object)DirectorCore.instance)) { return; } DirectorSpawnRequest val = new DirectorSpawnRequest((SpawnCard)(object)helperSpawnCard, new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 20f, maxDistance = 150f, spawnOnTarget = ((EntityState)this).transform }, RoR2Application.rng); val.summonerBodyObject = ((EntityState)this).gameObject; val.onSpawnedServer = (Action<SpawnResult>)Delegate.Combine(val.onSpawnedServer, (Action<SpawnResult>)delegate(SpawnResult spawnResult) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (spawnResult.success && Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { Inventory component = spawnResult.spawnedInstance.GetComponent<Inventory>(); if (Object.op_Implicit((Object)(object)component)) { component.CopyEquipmentFrom(((EntityState)this).characterBody.inventory); component.GiveItem(VoidlingEXContent.Items.VoidlingEX_PermanentImmuneToVoidDeath, 1); } } }); DirectorCore.instance.TrySpawnObject(val); } } public class BaseFireBeamSweep : BaseState { public static LoopSoundDef loopSoundDef; public float baseDuration = 2f; public float duration; public float windDownDuration = 0.5f; public bool woundDown; public GameObject beamVfxInstance; public DirectionOverrideRequest animatorDirectionOverrideRequest; public SoundLoopPtr loopPtr; public Transform muzzle; public Transform head; public Ray initialRay; public Ray currentRay; public Vector3 desiredDirection; public float horizontalAnglesPerSecond; public float verticalTiltAngles; public float aimVelocity; public float aimVectorDampTime = 0.1f; public float aimVectorMaxSpeed = 40f; public float beamTickTimer; public float beamDpsCoefficient = 4f; public override void OnEnter() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat + windDownDuration; Util.PlayAttackSpeedSound("Play_voidRaid_superLaser_start", ((EntityState)this).gameObject, base.attackSpeedStat); if (Object.op_Implicit((Object)(object)loopSoundDef)) { loopPtr = LoopSoundManager.PlaySoundLoopLocal(((EntityState)this).gameObject, loopSoundDef); } CreateBeamVFXInstance(SpinBeamAttack.beamVfxPrefab); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { muzzle = modelChildLocator.FindChild("EyeProjectileCenter"); head = modelChildLocator.FindChild("Head"); } AimAnimator aimAnimator = ((EntityState)this).GetAimAnimator(); if (Object.op_Implicit((Object)(object)aimAnimator)) { animatorDirectionOverrideRequest = aimAnimator.RequestDirectionOverride((Func<Vector3>)GetAimDirection); } currentRay = initialRay; desiredDirection = ((Ray)(ref currentRay)).direction; desiredDirection = Quaternion.AngleAxis(verticalTiltAngles, ((EntityState)this).transform.right) * desiredDirection; } public Vector3 GetAimDirection() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return ((Ray)(ref currentRay)).direction; } public override void FixedUpdate() { //IL_0013: 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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); desiredDirection = Quaternion.AngleAxis(horizontalAnglesPerSecond * Time.fixedDeltaTime, Vector3.up) * desiredDirection; Quaternion val = Util.QuaternionSafeLookRotation(desiredDirection);