Decompiled source of Liberator v1.1.1
Liberator.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using EntityStates; using EntityStates.Commando; using EntityStates.Merc; using EntityStates.Toolbot; using HG.BlendableTypes; using JetBrains.Annotations; using KinematicCharacterController; using On.RoR2; using R2API; using R2API.Utils; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.UI; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: AssemblyCompany("Liberator")] [assembly: AssemblyProduct("Liberator")] [assembly: AssemblyTitle("Liberator")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Liberator; internal class Assets { public static AssetBundle MainAssetBundle; public static T Load<T>(string name) where T : Object { return MainAssetBundle.LoadAsset<T>(name); } public static void PopulateAssets() { Assembly executingAssembly = Assembly.GetExecutingAssembly(); if ((Object)(object)MainAssetBundle == (Object)null) { using Stream stream = executingAssembly.GetManifestResourceStream("Liberator.AssetBundle." + "Liberator".ToLower() + "assets"); MainAssetBundle = AssetBundle.LoadFromStream(stream); } using Stream stream2 = executingAssembly.GetManifestResourceStream("Liberator.Liberator.bnk"); byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } } internal class BunkerSkillDef : SkillDef { private class InstanceData : BaseSkillInstanceData { public Behaviour behaviour; } private static Sprite groundedIcon => Assets.Load<Sprite>("bunkerSpecial"); public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new InstanceData { behaviour = ((Component)skillSlot).GetComponent<Behaviour>() }; } public override Sprite GetCurrentIcon(GenericSkill skillSlot) { InstanceData instanceData = (InstanceData)(object)skillSlot.skillInstanceData; Behaviour behaviour = instanceData.behaviour; if (behaviour.grounded) { return groundedIcon; } return ((SkillDef)this).GetCurrentIcon(skillSlot); } } internal class BarSkillDef : SkillDef { private class InstanceData : BaseSkillInstanceData { public BarBehaviour behaviour; } public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new InstanceData { behaviour = ((Component)skillSlot).GetComponent<BarBehaviour>() }; } internal static bool IsExecutable([NotNull] GenericSkill skillSlot) { InstanceData instanceData = (InstanceData)(object)skillSlot.skillInstanceData; BarBehaviour behaviour = instanceData.behaviour; return behaviour.CurrentBarValue() >= 100; } public override bool CanExecute([NotNull] GenericSkill skillSlot) { return IsExecutable(skillSlot) && ((SkillDef)this).CanExecute(skillSlot); } public override bool IsReady([NotNull] GenericSkill skillSlot) { return ((SkillDef)this).IsReady(skillSlot) && IsExecutable(skillSlot); } } internal class BarBehaviour : NetworkBehaviour { public GameObject bar; public TextMeshProUGUI currentBar; public TextMeshProUGUI fullBar; public Image barImage; public bool barActive; public bool canCharge; [SyncVar] private int barValue = 0; private int maxBarValue = 100; public float barPercentage => (float)barValue / (float)maxBarValue; public bool maxBar => barValue >= maxBarValue; public int NetworkbarValue { get { return barValue; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar<int>(value, ref barValue, 1u); } } public int CurrentBarValue() { return barValue; } public void Enable() { barActive = true; GameObject obj = bar; if (obj != null) { obj.SetActive(true); } } public void Disable() { barActive = false; GameObject obj = bar; if (obj != null) { obj.SetActive(false); } } [Server] public void ConsumeBar(int value) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Liberator.BarBehaviour::ConsumeBar(System.Int32)' called on client"); } else if (barValue >= value) { NetworkbarValue = barValue - value; } } [Server] public void AddBar(int value) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Liberator.BarBehaviour::AddBar(System.Int32)' called on client"); } else if (barActive && !maxBar && canCharge) { NetworkbarValue = Math.Min(barValue + value, maxBarValue); } } private void FixedUpdate() { if (barActive && Object.op_Implicit((Object)(object)barImage)) { barImage.fillAmount = barPercentage; ((TMP_Text)currentBar).text = barValue.ToString(); } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.WritePackedUInt32((uint)barValue); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.WritePackedUInt32((uint)barValue); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { barValue = (int)reader.ReadPackedUInt32(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { barValue = (int)reader.ReadPackedUInt32(); } } } internal class Behaviour : HuntressTracker { private Animator animator; private Indicator lockon; public int maxMissiles; private uint ID; public ChildLocator bunkerChildLocator; public bool grounded => Physics.Raycast(((Component)this).transform.position, Vector3.down, 1.1f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)); private void Awake() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown ((HuntressTracker)this).Awake(); lockon = new Indicator(((Component)this).gameObject, Prefabs.Load<GameObject>("RoR2/Base/Engi/EngiMissileTrackingIndicator.prefab")); lockon.active = false; } private void Start() { ((HuntressTracker)this).Start(); AkBankManager.LoadBankAsync("char_railgunner", (BankCallback)null); AkBankManager.LoadBankAsync("char_Engi", (BankCallback)null); ID = AkSoundEngine.PostEvent("Play_Liberator_Idle_Sprint", ((Component)this).gameObject); animator = ((Component)base.characterBody.modelLocator.modelTransform).GetComponent<Animator>(); } public void PlayVO(string sound) { if (MainPlugin.enableVO.Value && ((NetworkBehaviour)base.characterBody).hasAuthority) { AkSoundEngine.PostEvent(sound, ((Component)this).gameObject); } } private void OnDisable() { AkSoundEngine.StopPlayingID(ID); ((HuntressTracker)this).OnDisable(); } public Transform SetTarget(int maxMis) { lockon.targetTransform = ((Component)base.trackingTarget).transform; lockon.active = true; maxMissiles = maxMis; return lockon.targetTransform; } public void ResetTarget() { lockon.targetTransform = null; lockon.active = false; } } internal class BunkerBehaviour : MonoBehaviour { public Material bunkerMat; private void OnDestroy() { Object.Destroy((Object)(object)bunkerMat); } } internal class DisplayBehaviour : MonoBehaviour { private uint ID; private Animator animator; private void Awake() { animator = ((Component)this).GetComponent<Animator>(); } private void Start() { ID = AkSoundEngine.PostEvent("Play_Liberator_Mode_On", ((Component)this).gameObject); EntityState.PlayAnimationOnAnimator(animator, "Mode", "Enter", "Special", 1.25f, 0f); } private void OnDisable() { AkSoundEngine.StopPlayingID(ID); } } internal class HUDTracker : MonoBehaviour { public GameObject barRoot; public Image bar; public TextMeshProUGUI currentText; public TextMeshProUGUI fullText; public HUD hud; private BarBehaviour behaviour; private void Awake() { hud = ((Component)this).GetComponent<HUD>(); } private void FixedUpdate() { if (Object.op_Implicit((Object)(object)behaviour)) { return; } if (Object.op_Implicit((Object)(object)hud) && Object.op_Implicit((Object)(object)hud.targetBodyObject) && Util.HasEffectiveAuthority(hud.targetBodyObject)) { behaviour = hud.targetBodyObject.GetComponent<BarBehaviour>(); if (Object.op_Implicit((Object)(object)behaviour)) { behaviour.bar = barRoot; behaviour.currentBar = currentText; behaviour.fullBar = fullText; behaviour.barImage = bar; } } if (barRoot.activeInHierarchy) { barRoot.SetActive(false); } } } internal class Hook { internal static void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); HealthComponent.TakeDamageForce_DamageInfo_bool_bool += new hook_TakeDamageForce_DamageInfo_bool_bool(HealthComponent_TakeDamageForce_DamageInfo_bool_bool); HealthComponent.TakeDamageForce_Vector3_bool_bool += new hook_TakeDamageForce_Vector3_bool_bool(HealthComponent_TakeDamageForce_Vector3_bool_bool); } private static void HealthComponent_TakeDamageForce_Vector3_bool_bool(orig_TakeDamageForce_Vector3_bool_bool orig, HealthComponent self, Vector3 force, bool alwaysApply, bool disableAirControlUntilCollision) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(Prefabs.bunkerBuff)) { force = Vector3.zero; disableAirControlUntilCollision = false; } orig.Invoke(self, force, alwaysApply, disableAirControlUntilCollision); } private static void HealthComponent_TakeDamageForce_DamageInfo_bool_bool(orig_TakeDamageForce_DamageInfo_bool_bool orig, HealthComponent self, DamageInfo damageInfo, bool alwaysApply, bool disableAirControlUntilCollision) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(Prefabs.bunkerBuff)) { damageInfo.force = Vector3.zero; disableAirControlUntilCollision = false; } orig.Invoke(self, damageInfo, alwaysApply, disableAirControlUntilCollision); } private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { if (Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.procCoefficient > 0f) { CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && component.baseNameToken == "LIBERATOR_NAME" && RoR2Application.rng.RangeFloat(0f, 100f) <= 30f + component.healthComponent.fullShield * 0.05f) { damageInfo.damage *= 2f; } } orig.Invoke(self, damageInfo); if (!damageInfo.rejected && damageInfo.procCoefficient > 0f) { BarBehaviour component2 = ((Component)self).GetComponent<BarBehaviour>(); if (Object.op_Implicit((Object)(object)component2) && component2.barActive && !component2.maxBar) { component2.AddBar(5); } } } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Prefabs.invisBuff)) { args.moveSpeedReductionMultAdd += 0.75f; } if (sender.HasBuff(Prefabs.bunkerBuff)) { args.armorAdd += 65f; args.regenMultAdd += 0.5f; } if (sender.baseNameToken == "LIBERATOR_NAME") { args.baseShieldAdd += sender.healthComponent.fullHealth; args.moveSpeedMultAdd += 0.1f * (float)sender.maxJumpCount; if (Object.op_Implicit((Object)(object)sender.inventory)) { args.moveSpeedMultAdd += (float)sender.inventory.GetItemCount(Items.JumpBoost) * 0.15f + 0.1f * (float)sender.maxJumpCount; } } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Dragonyck.Liberator", "Liberator", "1.1.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.Liberator"; public const string MODNAME = "Liberator"; public const string VERSION = "1.1.0"; public const string SURVIVORNAME = "Liberator"; public const string SURVIVORNAMEKEY = "LIBERATOR"; public static GameObject characterPrefab; public static readonly Color characterColor = Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)); internal const bool melee = false; internal static SkillDef primaryOverride; internal static SkillDef bunkerPrimaryOverride; internal static SkillDef bunkerUtilityOverride; internal static ConfigEntry<bool> enableVO; private void Awake() { enableVO = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Enable Voice Over", true, (ConfigDescription)null); Assets.PopulateAssets(); Prefabs.CreatePrefabs(); CreatePrefab(); RegisterStates(); RegisterCharacter(); Hook.Hooks(); } internal static void CreatePrefab() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0224: 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_023e: 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_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_05b5: Unknown result type (might be due to invalid IL or missing references) //IL_05c2: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Unknown result type (might be due to invalid IL or missing references) //IL_0702: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Unknown result type (might be due to invalid IL or missing references) //IL_073c: Unknown result type (might be due to invalid IL or missing references) //IL_0759: Unknown result type (might be due to invalid IL or missing references) //IL_0776: Unknown result type (might be due to invalid IL or missing references) //IL_0793: Unknown result type (might be due to invalid IL or missing references) //IL_07b0: Unknown result type (might be due to invalid IL or missing references) //IL_0822: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08b2: Unknown result type (might be due to invalid IL or missing references) //IL_0a56: Unknown result type (might be due to invalid IL or missing references) //IL_0a5b: Unknown result type (might be due to invalid IL or missing references) //IL_0a7e: Unknown result type (might be due to invalid IL or missing references) //IL_0a83: Unknown result type (might be due to invalid IL or missing references) //IL_0ab1: Unknown result type (might be due to invalid IL or missing references) //IL_0ab6: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion(); characterPrefab = PrefabAPI.InstantiateClone(val, "LiberatorBody", true); characterPrefab.AddComponent<BarBehaviour>(); ((HuntressTracker)characterPrefab.AddComponent<Behaviour>()).maxTrackingDistance = 60f; characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true; Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("ModelBase")).gameObject); Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("CameraPivot")).gameObject); Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("AimOrigin")).gameObject); GameObject val2 = Assets.MainAssetBundle.LoadAsset<GameObject>("liberatorMdl"); val2.AddComponent<AnimationEvents>().soundCenter = val2; PrintController val3 = val2.AddComponent<PrintController>(); ((Behaviour)val3).enabled = false; val3.printTime = 0.65f; val3.disableWhenFinished = false; val3.startingPrintHeight = 8.1f; val3.maxPrintHeight = 2f; val3.startingPrintBias = 5f; val3.maxPrintBias = 0.95f; val3.printCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); GameObject val4 = new GameObject("ModelBase"); val4.transform.parent = characterPrefab.transform; val4.transform.localPosition = new Vector3(0f, 2f, 0f); val4.transform.localRotation = Quaternion.identity; val4.transform.localScale = Vector3.one * 1.5f; GameObject val5 = new GameObject("AimOrigin"); val5.transform.parent = val4.transform; val5.transform.localPosition = new Vector3(0f, 0f, 0f); val5.transform.localRotation = Quaternion.identity; val5.transform.localScale = Vector3.one; Transform transform = val2.transform; transform.parent = val4.transform; transform.localPosition = Vector3.zero; transform.localScale = Vector3.one; transform.localRotation = Quaternion.identity; CharacterDirection component = characterPrefab.GetComponent<CharacterDirection>(); component.targetTransform = val4.transform; component.modelAnimator = val2.GetComponentInChildren<Animator>(); component.turnSpeed = 0f; CharacterBody component2 = characterPrefab.GetComponent<CharacterBody>(); ((Object)component2).name = "LiberatorBody"; component2.baseNameToken = "LIBERATOR_NAME"; component2.subtitleNameToken = "LIBERATOR_SUBTITLE"; component2.bodyFlags = (BodyFlags)16; component2.rootMotionInMainState = false; component2.mainRootSpeed = 0f; component2.baseMaxHealth = 50f; component2.levelMaxHealth = 35f; component2.baseRegen = 1.5f; component2.levelRegen = 0.2f; component2.baseMaxShield = 0f; component2.levelMaxShield = 0f; component2.baseMoveSpeed = 9.45f; component2.levelMoveSpeed = 0f; component2.baseAcceleration = 110f; component2.baseJumpPower = 15f; component2.levelJumpPower = 0f; component2.baseDamage = 12f; component2.levelDamage = 2.4f; component2.baseAttackSpeed = 1f; component2.levelAttackSpeed = 0f; component2.baseCrit = 1f; component2.levelCrit = 0f; component2.baseArmor = 0f; component2.levelArmor = 0f; component2.baseJumpCount = 0; component2.sprintingSpeedMultiplier = 1.45f; component2.wasLucky = false; component2.hideCrosshair = false; component2.aimOriginTransform = val5.transform; component2.hullClassification = (HullClassification)0; component2.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait").texture; component2.isChampion = false; component2.currentVehicle = null; component2.skinIndex = 0u; component2.bodyColor = characterColor; HealthComponent component3 = characterPrefab.GetComponent<HealthComponent>(); component3.health = component2.baseMaxHealth; component3.shield = 0f; component3.barrier = 0f; CharacterMotor component4 = characterPrefab.GetComponent<CharacterMotor>(); component4.walkSpeedPenaltyCoefficient = 1f; component4.characterDirection = component; component4.muteWalkMotion = false; component4.mass = 160f; component4.airControl = 0.25f; component4.disableAirControlUntilCollision = false; component4.generateParametersOnAwake = true; InputBankTest component5 = characterPrefab.GetComponent<InputBankTest>(); component5.moveVector = Vector3.zero; CameraTargetParams component6 = characterPrefab.GetComponent<CameraTargetParams>(); component6.cameraParams = val.GetComponent<CameraTargetParams>().cameraParams; component6.cameraPivotTransform = null; component6.recoil = Vector2.zero; component6.dontRaycastToPivot = false; ModelLocator component7 = characterPrefab.GetComponent<ModelLocator>(); component7.modelTransform = transform; component7.modelBaseTransform = val4.transform; component7.dontReleaseModelOnDeath = false; component7.autoUpdateModelTransform = false; component7.dontDetatchFromParent = true; component7.noCorpse = false; component7.normalizeToFloor = false; component7.preserveModel = false; ChildLocator component8 = val2.GetComponent<ChildLocator>(); CharacterModel val6 = val2.AddComponent<CharacterModel>(); SkinnedMeshRenderer[] componentsInChildren = val2.GetComponentsInChildren<SkinnedMeshRenderer>(); List<RendererInfo> list = new List<RendererInfo>(); foreach (SkinnedMeshRenderer val7 in componentsInChildren) { ((Renderer)val7).material = Utils.InstantiateMaterial(((Renderer)val7).material); list.Add(new RendererInfo { renderer = (Renderer)(object)val7, defaultMaterial = ((Renderer)val7).material, defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }); if (((Object)val7).name != "base") { ((Component)val7).gameObject.SetActive(false); } } RendererInfo[] array = list.ToArray(); val6.body = component2; val6.baseRendererInfos = array; val6.autoPopulateLightInfos = true; val6.temporaryOverlays = new List<TemporaryOverlayInstance>(); val6.mainSkinnedMeshRenderer = componentsInChildren[0]; LanguageAPI.Add("LIBERATORBODY_DEFAULT_SKIN_NAME", "Default"); LanguageAPI.Add("LIBERATORBODY_SKIN01_NAME", "Black Ops"); LanguageAPI.Add("LIBERATORBODY_SKIN02_NAME", "Covert Ops"); LanguageAPI.Add("LIBERATORBODY_SKIN03_NAME", "Marauder"); LanguageAPI.Add("LIBERATORBODY_SKIN04_NAME", "Mercenary"); LanguageAPI.Add("LIBERATORBODY_SKIN05_NAME", "Tyrador"); LanguageAPI.Add("LIBERATORBODY_SKIN06_NAME", "Umojan"); LanguageAPI.Add("LIBERATORBODY_SKIN07_NAME", "Zerg"); ModelSkinController val8 = val2.AddComponent<ModelSkinController>(); val8.skins = (SkinDef[])(object)new SkinDef[8] { Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, "LIBERATORBODY_DEFAULT_SKIN_NAME", "base", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, "LIBERATORBODY_SKIN01_NAME", "blackops", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, "LIBERATORBODY_SKIN02_NAME", "covertops", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, "LIBERATORBODY_SKIN03_NAME", "junker", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, "LIBERATORBODY_SKIN04_NAME", "merc", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, "LIBERATORBODY_SKIN05_NAME", "silver", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, "LIBERATORBODY_SKIN06_NAME", "umojan", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, "LIBERATORBODY_SKIN07_NAME", "zerg", array)) }; Collider[] componentsInChildren2 = val2.GetComponentsInChildren<Collider>(); HurtBoxGroup val9 = val2.AddComponent<HurtBoxGroup>(); List<HurtBox> list2 = new List<HurtBox>(); Collider[] array2 = componentsInChildren2; foreach (Collider val10 in array2) { HurtBox val11 = ((Component)val10).gameObject.AddComponent<HurtBox>(); ((Component)val11).gameObject.layer = LayerIndex.entityPrecise.intVal; val11.healthComponent = component3; val11.isBullseye = true; val11.damageModifier = (DamageModifier)0; val11.hurtBoxGroup = val9; val11.indexInGroup = 0; val9.mainHurtBox = val11; val9.bullseyeCount = 1; list2.Add(val11); } val9.hurtBoxes = list2.ToArray(); ((Component)component8.FindChild("bunkerCollider")).gameObject.SetActive(false); KinematicCharacterMotor component9 = characterPrefab.GetComponent<KinematicCharacterMotor>(); component9.CharacterController = (ICharacterController)(object)component4; component9.playerCharacter = true; PhysicMaterial val12 = Addressables.LoadAssetAsync<PhysicMaterial>((object)"RoR2/Base/Common/physmatRagdoll.physicMaterial").WaitForCompletion(); List<Transform> list3 = new List<Transform>(); Transform[] componentsInChildren3 = ((Component)component8.FindChild("mainBone")).GetComponentsInChildren<Transform>(true); foreach (Transform val13 in componentsInChildren3) { GameObject gameObject = ((Component)val13).gameObject; gameObject.layer = LayerIndex.ragdoll.intVal; if (!Object.op_Implicit((Object)(object)gameObject.GetComponent<Rigidbody>())) { gameObject.AddComponent<Rigidbody>(); } CapsuleCollider val14 = gameObject.AddComponent<CapsuleCollider>(); val14.radius = 0.4f; val14.height = 3.5f; ((Collider)val14).material = val12; ((Collider)val14).sharedMaterial = val12; list3.Add(val13); } RagdollController val15 = val2.AddComponent<RagdollController>(); val15.bones = list3.ToArray(); characterPrefab.GetComponent<Interactor>().maxInteractionDistance = 3f; characterPrefab.GetComponent<InteractionDriver>().highlightInteractor = true; SfxLocator component10 = characterPrefab.GetComponent<SfxLocator>(); component10.deathSound = "Play_ui_player_death"; component10.barkSound = ""; component10.openSound = ""; component10.landingSound = ""; component10.fallDamageSound = ""; component10.aliveLoopStart = ""; component10.aliveLoopStop = ""; characterPrefab.GetComponent<Rigidbody>().mass = component4.mass; FootstepHandler val16 = val2.AddComponent<FootstepHandler>(); val16.baseFootstepString = "Play_player_footstep"; val16.sprintFootstepOverrideString = ""; val16.enableFootstepDust = true; val16.footstepDustPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion(); EntityStateMachine component11 = ((Component)component2).GetComponent<EntityStateMachine>(); component11.mainStateType = new SerializableEntityStateType(typeof(CharacterMain)); CharacterDeathBehavior component12 = characterPrefab.GetComponent<CharacterDeathBehavior>(); component12.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>(); component12.deathState = new SerializableEntityStateType(typeof(DeathState)); NetworkStateMachine component13 = ((Component)component2).GetComponent<NetworkStateMachine>(); component13.stateMachines = ((Component)component2).GetComponents<EntityStateMachine>(); ContentAddition.AddBody(characterPrefab); } private void RegisterCharacter() { //IL_0094: 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) string text = " <style=cSub>\r\n\r\n< ! > \r\n\r\n< ! > \r\n\r\n< ! > \r\n\r\n< ! > \r\n\r\n"; string text2 = "..and so they left, with another tyrannous dominion to vanquish."; string text3 = "..and so they vanished, another takes their last breath in the fight for freedom."; string text4 = "\"Need Something Liberated?\""; LanguageAPI.Add("LIBERATOR_NAME", "Liberator"); LanguageAPI.Add("LIBERATOR_DESCRIPTION", text); LanguageAPI.Add("LIBERATOR_SUBTITLE", "Dreadnought"); LanguageAPI.Add("LIBERATOR_OUTRO", text2); LanguageAPI.Add("LIBERATOR_FAIL", text3); LanguageAPI.Add("LIBERATOR_LORE", text4); SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>(); val.cachedName = "LIBERATOR_NAME"; val.unlockableDef = null; val.descriptionToken = "LIBERATOR_DESCRIPTION"; val.primaryColor = characterColor; val.bodyPrefab = characterPrefab; val.displayPrefab = Utils.NewDisplayModel(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "LiberatorDisplay"); val.outroFlavorToken = "LIBERATOR_OUTRO"; val.desiredSortPosition = 22f; val.mainEndingEscapeFailureFlavorToken = "LIBERATOR_FAIL"; ContentAddition.AddSurvivorDef(val); SkillSetup(); GameObject val2 = PrefabAPI.InstantiateClone(Prefabs.Load<GameObject>("RoR2/Base/Commando/CommandoMonsterMaster.prefab"), "LiberatorMaster", true); ContentAddition.AddMaster(val2); CharacterMaster component = val2.GetComponent<CharacterMaster>(); component.bodyPrefab = characterPrefab; } private void RegisterStates() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_0023: 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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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_0053: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) bool flag = default(bool); ContentAddition.AddEntityState<Primary>(ref flag); ContentAddition.AddEntityState<PrimaryOverride>(ref flag); ContentAddition.AddEntityState<Secondary>(ref flag); ContentAddition.AddEntityState<Secondary2>(ref flag); ContentAddition.AddEntityState<Utility>(ref flag); ContentAddition.AddEntityState<Special>(ref flag); ContentAddition.AddEntityState<FlyState>(ref flag); ContentAddition.AddEntityState<CharacterMain>(ref flag); ContentAddition.AddEntityState<MeleeSkillState>(ref flag); ContentAddition.AddEntityState<BasicMeleeSkillState>(ref flag); ContentAddition.AddEntityState<LiberatorState>(ref flag); ContentAddition.AddEntityState<Stationary>(ref flag); ContentAddition.AddEntityState<BunkerPrimary>(ref flag); ContentAddition.AddEntityState<BunkerUtility>(ref flag); } private void SkillSetup() { GenericSkill[] componentsInChildren = characterPrefab.GetComponentsInChildren<GenericSkill>(); foreach (GenericSkill val in componentsInChildren) { Object.DestroyImmediate((Object)(object)val); } PassiveSetup(); PrimarySetup(); SecondarySetup(); UtilitySetup(); SpecialSetup(); } private void PassiveSetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("LIBERATOR_PASSIVE_NAME", "Precision"); LanguageAPI.Add("LIBERATOR_PASSIVE_DESCRIPTION", "Fly at the cost of <style=cIsHealth>5 shield</style> per second."); component.passiveSkill.enabled = true; component.passiveSkill.skillNameToken = "LIBERATOR_PASSIVE_NAME"; component.passiveSkill.skillDescriptionToken = "LIBERATOR_PASSIVE_DESCRIPTION"; component.passiveSkill.icon = Assets.Load<Sprite>("passive"); } private void PrimarySetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("LIBERATOR_M1", "Alternate Fire"); LanguageAPI.Add("LIBERATOR_M1_DESCRIPTION", "Slowly shoot for <style=cIsDamage>180% damage</style>."); SkillDef skill = Utils.NewSkillDef<SkillDef>(typeof(Primary), "Weapon", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: true, 0, 0, 0, Assets.Load<Sprite>("primary"), "LIBERATOR_M1_DESCRIPTION", "LIBERATOR_M1", Array.Empty<string>()); component.primary = Utils.NewGenericSkill(characterPrefab, skill); LanguageAPI.Add("LIBERATOR_M1", "Overseer Fire"); LanguageAPI.Add("LIBERATOR_M1_DESCRIPTION", "Fire high caliber shot for <style=cIsDamage>3000% damage</style>."); primaryOverride = Utils.NewSkillDef<SkillDef>(typeof(PrimaryOverride), "Slide", 1, 3f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: true, 1, 1, 1, Assets.Load<Sprite>("primaryOverride"), "LIBERATOR_M1_DESCRIPTION", "LIBERATOR_M1", Array.Empty<string>()); LanguageAPI.Add("LIBERATOR_M1_Bunker", "Machine Gun"); LanguageAPI.Add("LIBERATOR_M1_Bunker_DESCRIPTION", "Rapidly fire for <style=cIsDamage>90% damage</style>."); bunkerPrimaryOverride = Utils.NewSkillDef<SkillDef>(typeof(BunkerPrimary), "Slide", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: true, 0, 0, 0, Assets.Load<Sprite>("bunkerPrimary"), "LIBERATOR_M1_Bunker_DESCRIPTION", "LIBERATOR_M1_Bunker", Array.Empty<string>()); } private void SecondarySetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("LIBERATOR_M2", "Dash"); LanguageAPI.Add("LIBERATOR_M2_DESCRIPTION", "Quickly dash a short distance."); SkillDef skill = Utils.NewSkillDef<SkillDef>(typeof(Secondary2), "Weapon", 4, 2f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: false, 1, 1, 1, Assets.Load<Sprite>("secondary2"), "LIBERATOR_M2_DESCRIPTION", "LIBERATOR_M2", Array.Empty<string>()); component.secondary = Utils.NewGenericSkill(characterPrefab, skill); } private void UtilitySetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("LIBERATOR_UTIL", "Death Sentence"); LanguageAPI.Add("LIBERATOR_UTIL_DESCRIPTION", "Lock-on a target and fire a barrage of missiles, dealing <style=cIsDamage>6x200% damage</style>. Gain an additional missile per <style=cIsDamage>8% attack speed</style>."); SkillDef skill = Utils.NewSkillDef<HuntressTrackingSkillDef>(typeof(Utility), "Weapon", 1, 10f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.Load<Sprite>("utility"), "LIBERATOR_UTIL_DESCRIPTION", "LIBERATOR_UTIL", Array.Empty<string>()); component.utility = Utils.NewGenericSkill(characterPrefab, skill); LanguageAPI.Add("LIBERATOR_UTIL", "Death Sentence"); LanguageAPI.Add("LIBERATOR_UTIL_DESCRIPTION", "Fire a continuous laser beam for <style=cIsDamage>2000% damage</style>. Consumes all meter."); bunkerUtilityOverride = Utils.NewSkillDef<BarSkillDef>(typeof(BunkerUtility), "Slide", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 0, 0, 0, Assets.Load<Sprite>("bunkerUtility"), "LIBERATOR_UTIL_DESCRIPTION", "LIBERATOR_UTIL", Array.Empty<string>()); } private void SpecialSetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("LIBERATOR_SPEC", "Overseer"); LanguageAPI.Add("LIBERATOR_SPEC_DESCRIPTION", "Enter a Defensive or Offensive mode based on your current aerial state.\r\n\r\n<style=cKeywordName>Grounded</style><style=cSub>Become completely <style=cIsUtility>stationary</style>. Gain <style=cIsDamage>65 armor</style>, <style=cIsHealing>50% health regen</style> and <style=cIsHealing>10% shield regen</style>. Primary is replaced by rapid fire machine gun that deals <style=cIsDamage>90% damage</style>. Utility is replaced by a laser beam that deals <style=cIsDamage>2000% damage</style>, and it can only be cast by fully filling a meter by receiving damage.\r\n\r\n<style=cKeywordName>Airborne</style><style=cSub>You and nearby allies within <style=cIsUtility>20m</style> are granted <style=cIsUtility>invisibility</style>. Primary is replaced by an ability able to fire high caliber shots dealing <style=cIsDamage>3000% damage</style>. Consume <style=cIsHealth>20 shield</style> every second, and exit after it's full depletion. Fly at 1/4 your normal speed."); SkillDef skill = Utils.NewSkillDef<BunkerSkillDef>(typeof(Special), "Weapon", 1, 8f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.Load<Sprite>("special"), "LIBERATOR_SPEC_DESCRIPTION", "LIBERATOR_SPEC", Array.Empty<string>()); component.special = Utils.NewGenericSkill(characterPrefab, skill); } } internal class Prefabs { internal static GameObject invisWard; internal static GameObject snipeTracer; internal static GameObject microMissile; internal static GameObject primaryTracer; internal static GameObject sniperImpactVFX; internal static GameObject sniperTracer; internal static GameObject sniperTracer2; internal static GameObject missileMuzzleEffect; internal static GameObject bunker; internal static GameObject bunkerLaser; internal static GameObject bunkerLaserHitEffect; internal static GameObject bunkerTracer; internal static GameObject dashEffect; internal static Material dashOverlay; internal static BuffDef bunkerBuff; internal static BuffDef invisBuff; internal static CharacterCameraParams bunkerCameraParams; internal static void CreatePrefabs() { //IL_0046: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Expected O, but got Unknown //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Expected O, but got Unknown //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Expected O, but got Unknown //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_062f: Unknown result type (might be due to invalid IL or missing references) //IL_0646: Unknown result type (might be due to invalid IL or missing references) //IL_06d2: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06e1: Unknown result type (might be due to invalid IL or missing references) //IL_06f3: Unknown result type (might be due to invalid IL or missing references) //IL_0705: Unknown result type (might be due to invalid IL or missing references) //IL_0747: Unknown result type (might be due to invalid IL or missing references) //IL_074e: Expected O, but got Unknown //IL_0755: Unknown result type (might be due to invalid IL or missing references) //IL_075c: Expected O, but got Unknown //IL_0768: Unknown result type (might be due to invalid IL or missing references) //IL_076d: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_0787: Unknown result type (might be due to invalid IL or missing references) //IL_079e: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Unknown result type (might be due to invalid IL or missing references) //IL_07b8: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_08ed: Expected O, but got Unknown //IL_0904: Unknown result type (might be due to invalid IL or missing references) //IL_0911: Unknown result type (might be due to invalid IL or missing references) //IL_0931: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Expected O, but got Unknown //IL_097b: Unknown result type (might be due to invalid IL or missing references) //IL_0980: Unknown result type (might be due to invalid IL or missing references) //IL_09e0: Unknown result type (might be due to invalid IL or missing references) //IL_09ea: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Unknown result type (might be due to invalid IL or missing references) //IL_0580: Expected O, but got Unknown //IL_059e: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05db: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_0a11: Unknown result type (might be due to invalid IL or missing references) //IL_0a16: Unknown result type (might be due to invalid IL or missing references) //IL_0a86: Unknown result type (might be due to invalid IL or missing references) //IL_0a90: Expected O, but got Unknown //IL_0aaa: Unknown result type (might be due to invalid IL or missing references) //IL_0aaf: Unknown result type (might be due to invalid IL or missing references) //IL_0b6d: Unknown result type (might be due to invalid IL or missing references) //IL_0b74: Expected O, but got Unknown //IL_0b87: Unknown result type (might be due to invalid IL or missing references) //IL_0b8c: Unknown result type (might be due to invalid IL or missing references) //IL_0c4b: Unknown result type (might be due to invalid IL or missing references) //IL_0c52: Expected O, but got Unknown //IL_0c6d: Unknown result type (might be due to invalid IL or missing references) //IL_0c72: Unknown result type (might be due to invalid IL or missing references) Texture2D val = Load<Texture2D>("RoR2/DLC1/Common/ColorRamps/texRampConstructLaser.png"); Texture2D val2 = Load<Texture2D>("RoR2/DLC1/Common/ColorRamps/texRampConstructLaserTypeB.png"); bunkerLaserHitEffect = Instantiate("RoR2/Base/Golem/ExplosionGolem.prefab", "BunkerLaserHitEffect"); bunkerLaserHitEffect.GetComponentInChildren<Light>().color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)140, (byte)8, byte.MaxValue)); ParticleSystemRenderer[] componentsInChildren = bunkerLaserHitEffect.GetComponentsInChildren<ParticleSystemRenderer>(); ParticleSystemRenderer[] array = (ParticleSystemRenderer[])(object)new ParticleSystemRenderer[2] { componentsInChildren[0], componentsInChildren[1] }; ParticleSystemRenderer[] array2 = (ParticleSystemRenderer[])(object)new ParticleSystemRenderer[3] { componentsInChildren[2], componentsInChildren[3], componentsInChildren[5] }; ((Renderer)componentsInChildren[6]).material = new Material(((Renderer)componentsInChildren[6]).material); ((Renderer)componentsInChildren[6]).material.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)42, (byte)0, byte.MaxValue))); ((Renderer)componentsInChildren[6]).material.DisableKeyword("VERTEXCOLOR"); ParticleSystemRenderer[] array3 = array; foreach (ParticleSystemRenderer val3 in array3) { ((Renderer)val3).material = new Material(((Renderer)val3).material); ((Renderer)val3).material.DisableKeyword("VERTEXCOLOR"); } ParticleSystemRenderer[] array4 = array2; foreach (ParticleSystemRenderer val4 in array4) { ((Renderer)val4).material = new Material(((Renderer)val4).material); ((Renderer)val4).material.SetTexture("_RemapTex", (Texture)(object)val); } ContentAddition.AddEffect(bunkerLaserHitEffect); dashEffect = Instantiate("RoR2/Base/Huntress/HuntressBlinkEffect.prefab", "DashEffect"); ParticleSystemRenderer[] componentsInChildren2 = dashEffect.GetComponentsInChildren<ParticleSystemRenderer>(); ((Component)componentsInChildren2[0]).gameObject.SetActive(false); ((Component)componentsInChildren2[1]).gameObject.SetActive(false); ((Component)componentsInChildren2[2]).gameObject.SetActive(false); Material val5 = new Material(Load<Material>("RoR2/Base/Huntress/matHuntressSwipe.mat")); val5.SetTexture("_RemapTex", (Texture)(object)val2); ((Renderer)componentsInChildren2[3]).material = val5; ((Renderer)componentsInChildren2[4]).material = val5; ((Component)componentsInChildren2[4]).transform.localScale = new Vector3(2f, 1f, 1f); ContentAddition.AddEffect(dashEffect); dashOverlay = new Material(Load<Material>("RoR2/Base/artifactworld/matArtifactShellOverlay.mat")); dashOverlay.SetTexture("_RemapTex", (Texture)(object)val2); dashOverlay.SetTextureScale("_Cloud1Tex", Vector2.one * 4f); bunkerTracer = Instantiate("RoR2/Base/Common/VFX/TracerNoSmoke.prefab", "BunkerTracer"); bunkerTracer.GetComponent<LineRenderer>().widthMultiplier = 3f; bunkerTracer.GetComponent<Tracer>().length = 15f; ContentAddition.AddEffect(bunkerTracer); bunkerCameraParams = ScriptableObject.CreateInstance<CharacterCameraParams>(); bunkerCameraParams.data = new CharacterCameraParamsData { minPitch = BlendableFloat.op_Implicit(-70f), maxPitch = BlendableFloat.op_Implicit(70f), pivotVerticalOffset = BlendableFloat.op_Implicit(2.37f), idealLocalCameraPos = BlendableVector3.op_Implicit(new Vector3(0f, 0f, -8.18f)), fov = BlendableFloat.op_Implicit(60f) }; bunker = Instantiate(Assets.Load<GameObject>("bunkerMdl"), "Bunker"); bunker.AddComponent<BunkerBehaviour>(); SkinnedMeshRenderer component = ((Component)bunker.GetComponent<ChildLocator>().FindChild("mesh")).GetComponent<SkinnedMeshRenderer>(); ((Renderer)component).material = Utils.InstantiateMaterial(((Renderer)component).material); PrintController val6 = bunker.AddComponent<PrintController>(); ((Behaviour)val6).enabled = true; val6.printTime = 0.85f; val6.disableWhenFinished = true; val6.startingPrintHeight = 11f; val6.maxPrintHeight = -1f; val6.startingPrintBias = 5f; val6.maxPrintBias = 0.95f; val6.printCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); DestroyOnTimer val7 = bunker.AddComponent<DestroyOnTimer>(); val7.duration = 0.85f; ((Behaviour)val7).enabled = false; bunkerLaser = Instantiate("RoR2/Base/Titan/LaserTitan.prefab", "BunkerLaser"); bunkerLaser.transform.GetChild(1).localPosition = Vector3.zero; LineRenderer component2 = bunkerLaser.GetComponent<LineRenderer>(); ((Renderer)component2).material = new Material(((Renderer)component2).material); ((Renderer)component2).material.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)231, (byte)20, byte.MaxValue))); ((Renderer)component2).material.SetTexture("_RemapTex", (Texture)(object)val); component2.widthMultiplier = 2f; ((Component)bunkerLaser.GetComponentInChildren<RotateAroundAxis>()).gameObject.SetActive(false); Renderer[] componentsInChildren3 = bunkerLaser.GetComponentsInChildren<Renderer>(); foreach (Renderer val8 in componentsInChildren3) { string name = ((Object)val8).name; switch (name) { case "Flare": case "Fire": case "Fire, Electric": case "Glob": val8.material = new Material(val8.material); val8.material.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)231, (byte)20, byte.MaxValue))); val8.material.SetTexture("_RemapTex", (Texture)(object)val); if (name == "Flare") { ((Component)val8).transform.localPosition = Vector3.zero; ((Component)val8).transform.localScale = Vector3.one * 0.25f; } break; case "ArcaneFlare": case "Particle System": ((Component)val8).gameObject.SetActive(false); break; } } bunkerBuff = Utils.NewBuffDef("Bunker", stack: false, hidden: true, null, Color.clear); invisBuff = Utils.NewBuffDef("Overseer", stack: false, hidden: true, null, Color.clear); GameObject val9 = Load<GameObject>("RoR2/Base/UI/HUDSimple.prefab"); Object.DontDestroyOnLoad((Object)(object)val9); HUDScaleController component3 = val9.GetComponent<HUDScaleController>(); HUDTracker hUDTracker = val9.AddComponent<HUDTracker>(); Transform val10 = val9.GetComponent<ChildLocator>().FindChild("BottomLeftCluster"); GameObject gameObject = ((Component)((Component)val10).GetComponentInChildren<HealthBar>()).gameObject; GameObject val11 = Object.Instantiate<GameObject>(gameObject); ((Object)val11).name = "BarRoot"; val11.transform.SetParent(gameObject.transform.parent); val11.transform.localPosition = Vector2.op_Implicit(Vector2.one * 6f); val11.transform.localRotation = Quaternion.identity; val11.transform.localScale = Vector3.one; HealthBar component4 = val11.GetComponent<HealthBar>(); RectTransform barContainer = component4.barContainer; GameObject val12 = new GameObject("Bar", new Type[2] { typeof(RectTransform), typeof(Image) }); RectTransform val13 = (RectTransform)val12.transform; ((Transform)val13).SetParent((Transform)(object)barContainer); ((Transform)val13).localPosition = Vector2.op_Implicit(Vector2.zero); ((Transform)val13).localRotation = Quaternion.identity; ((Transform)val13).localScale = Vector3.one; val13.sizeDelta = new Vector2(12f, 2f); val13.anchorMin = Vector2.zero; val13.anchorMax = Vector2.one; Image component5 = val12.GetComponent<Image>(); ((Graphic)component5).color = Color32.op_Implicit(new Color32((byte)117, (byte)8, (byte)26, byte.MaxValue)); component5.sprite = Load<Sprite>("RoR2/Base/UI/texUIMainHealthbar.png"); component5.type = (Type)3; component5.fillMethod = (FillMethod)0; component5.fillAmount = 0f; hUDTracker.barRoot = val11; hUDTracker.bar = component5; hUDTracker.currentText = component4.currentHealthText; ((TMP_Text)hUDTracker.currentText).text = "100"; ((Component)((TMP_Text)hUDTracker.currentText).transform.parent).gameObject.SetActive(true); hUDTracker.fullText = component4.fullHealthText; ((TMP_Text)hUDTracker.fullText).text = "100"; Object.Destroy((Object)(object)component4); val11.SetActive(false); Texture2D val14 = Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampBrotherPillar.png"); sniperTracer2 = Instantiate("RoR2/Base/Bandit2/TracerBandit2Rifle.prefab", "SniperTracer2"); sniperTracer2.GetComponent<Tracer>().speed = 760f; LineRenderer component6 = sniperTracer2.GetComponent<LineRenderer>(); ((Renderer)component6).material = new Material(((Renderer)component6).material); ((Renderer)component6).material.SetTexture("_RemapTex", (Texture)(object)val14); component6.startColor = Color.cyan; component6.endColor = Color.cyan; ParticleSystemRenderer componentInChildren = sniperTracer2.GetComponentInChildren<ParticleSystemRenderer>(); ((Renderer)componentInChildren).material = new Material(((Renderer)componentInChildren).material); ((Renderer)componentInChildren).material.DisableKeyword("VERTEXCOLOR"); ((Renderer)componentInChildren).material.SetTexture("_RemapTex", (Texture)(object)val14); ((Renderer)componentInChildren).material.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)0, (byte)100, byte.MaxValue, byte.MaxValue))); ContentAddition.AddEffect(sniperTracer2); sniperTracer = Instantiate("RoR2/Base/Golem/TracerGolem.prefab", "SniperTracer"); sniperTracer.AddComponent<VFXAttributes>(); ContentAddition.AddEffect(sniperTracer); missileMuzzleEffect = Instantiate("RoR2/Base/Common/VFX/OmniExplosionVFXQuick.prefab", "MissileMuzzleEffect"); missileMuzzleEffect.transform.localScale = Vector3.one * 0.5f; ParticleSystem[] componentsInChildren4 = missileMuzzleEffect.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val15 in componentsInChildren4) { MainModule main = val15.main; ((MainModule)(ref main)).scalingMode = (ParticleSystemScalingMode)0; } Utils.RegisterEffect(missileMuzzleEffect, -1f, "Play_mage_m1_impact"); primaryTracer = Instantiate("RoR2/Base/Commando/TracerCommandoShotgun.prefab", "PrimaryTracer"); primaryTracer.GetComponent<Tracer>().speed = 390f; LineRenderer component7 = primaryTracer.GetComponent<LineRenderer>(); ((Renderer)component7).material = new Material(((Renderer)component7).material); ((Renderer)component7).material.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)122, (byte)0, byte.MaxValue))); ContentAddition.AddEffect(primaryTracer); sniperImpactVFX = Instantiate("RoR2/Base/Common/VFX/OmniImpactVFXLarge.prefab", "SnipeImpact"); Utils.RegisterEffect(sniperImpactVFX, -1f, "Play_Liberator_Sniper_Impact"); microMissile = Instantiate("RoR2/Base/Drones/MicroMissileProjectile.prefab", "MicroMissile", registerNetwork: true); microMissile.GetComponent<MissileController>().maxVelocity = 72f; ContentAddition.AddProjectile(microMissile); snipeTracer = Instantiate("RoR2/Base/Toolbot/TracerToolbotRebar.prefab", "SnipeTracer"); ((Renderer)snipeTracer.GetComponentInChildren<MeshRenderer>()).enabled = false; ParticleSystemRenderer val16 = snipeTracer.GetComponentsInChildren<ParticleSystemRenderer>()[^1]; Material val17 = new Material(Load<Material>("RoR2/Base/MagmaWorm/matMagmaWormFireballTrail.mat")); val17.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)2, (byte)0, byte.MaxValue))); val17.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampIce.png")); val17.SetFloat("_Boost", 15f); ((Renderer)val16).materials = (Material[])(object)new Material[2] { val17, val17 }; ContentAddition.AddEffect(snipeTracer); invisWard = Instantiate("RoR2/Base/EliteHaunted/AffixHauntedWard.prefab", "InvisWard", registerNetwork: true); Object.DestroyImmediate((Object)(object)invisWard.GetComponent<AkEvent>()); Object.DestroyImmediate((Object)(object)invisWard.GetComponent<AkEvent>()); BuffWard component8 = invisWard.GetComponent<BuffWard>(); component8.buffDef = Load<BuffDef>("RoR2/Base/Common/bdCloak.asset"); component8.radius = 20f; Material val18 = new Material(Load<Material>("RoR2/Base/Captain/matCaptainSupplyDropAreaIndicator2.mat")); val18.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, (byte)163))); ((Renderer)invisWard.GetComponentInChildren<MeshRenderer>()).materials = (Material[])(object)new Material[2] { val18, val18 }; invisWard.GetComponent<NetworkedBodyAttachment>().hasEffectiveAuthority = true; } internal static T Load<T>(string path) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Addressables.LoadAssetAsync<T>((object)path).WaitForCompletion(); } internal static GameObject Instantiate(string path, string name, bool registerNetwork = false) { return PrefabAPI.InstantiateClone(Load<GameObject>(path), name, registerNetwork); } internal static GameObject Instantiate(GameObject obj, string name, bool registerNetwork = false) { return PrefabAPI.InstantiateClone(obj, name, registerNetwork); } } internal class BasicMeleeSkillState : BaseSkillState { private float duration = 0.2f; private Vector3 dir; private OverlapAttack attack; private float damageCoefficient = 4.2f; private GameObject hitEffectPrefab = null; private bool parried; public Animator animator; private uint ID; private string hitboxGroupName = ""; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); if (!animator.GetBool("slide")) { ((BaseState)this).StartAimMode(1f, true); } ((EntityState)this).PlayAnimation("LeftArm, Override", "MeleeAttack"); AkSoundEngine.PostEvent(ID, ((EntityState)this).gameObject); attack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, ((EntityState)this).GetModelTransform(), hitboxGroupName); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { attack.Fire((List<HurtBox>)null); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class BunkerPrimary : LiberatorState { private float duration; private float damageCoefficient = 0.9f; private string muzzle = "Muzzle"; private GameObject muzzleflash = Prefabs.Load<GameObject>("RoR2/Base/Common/VFX/Muzzleflash1.prefab"); private GameObject tracer = Prefabs.bunkerTracer; private GameObject hiteffect = Prefabs.Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFX.prefab"); private float baseDuration => 0.1f; public override void OnEnter() { base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Fire(); } private void Fire() { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_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) //IL_0100: 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_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0151: 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_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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_0197: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_Liberator_Marine_Attack", ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleflash, ((EntityState)this).gameObject, muzzle, false); float num = 0.25f; ((BaseState)this).AddRecoil(-1f * num, -1.5f * num, -0.25f * num, 0.25f * num); ((EntityState)this).characterBody.AddSpreadBloom(0.08f); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); float num2 = 1.5f; new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = ((BaseState)this).damageStat * damageCoefficient, damageColorIndex = (DamageColorIndex)0, damageType = (DamageTypeCombo.GenericPrimary | DamageTypeCombo.op_Implicit((DamageType)2)), falloffModel = (FalloffModel)0, maxDistance = 300f, force = 20f, hitMask = CommonMasks.bullet, minSpread = 0f - num2, maxSpread = num2, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = muzzle, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = 0.08f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracer, spreadPitchScale = 1f, spreadYawScale = 1f, hitEffectPrefab = hiteffect }.Fire(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class BunkerUtility : LiberatorState { private float duration = 3f; private float fireInterval = 0.3f; private float damageCoefficient = 2f; private float fireStopwatch = 1f; private GameObject laserEffect; private Transform laserPoint; private Transform muzzleRoot; private uint ID; public override void OnEnter() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); barBehaviour.canCharge = false; if (NetworkServer.active) { barBehaviour.ConsumeBar(100); } fireInterval /= ((BaseState)this).attackSpeedStat; muzzleRoot = behaviour.bunkerChildLocator.FindChild("muzzleRoot"); Transform val = behaviour.bunkerChildLocator.FindChild("muzzle"); laserEffect = Object.Instantiate<GameObject>(Prefabs.bunkerLaser, val.position, Quaternion.identity, val); ChildLocator component = laserEffect.GetComponent<ChildLocator>(); laserPoint = component.FindChild("LaserEnd"); AkSoundEngine.PostEvent("Play_Liberator_Laser_Start", ((EntityState)this).gameObject); ID = AkSoundEngine.PostEvent("Play_Liberator_Laser_Loop", ((EntityState)this).gameObject); } public override void Update() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_006e: 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_007f: 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_0093: 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) ((EntityState)this).Update(); Ray aimRay = ((BaseState)this).GetAimRay(); if (Object.op_Implicit((Object)(object)muzzleRoot)) { muzzleRoot.forward = Utils.GetForwardDirection(((Ray)(ref aimRay)).direction); } if (Object.op_Implicit((Object)(object)laserEffect)) { float num = 999f; laserEffect.transform.forward = ((Ray)(ref aimRay)).direction; Vector3 point = ((Ray)(ref aimRay)).GetPoint(num); RaycastHit val = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, aimRay, ref val, num, ((LayerIndex)(ref LayerIndex.world)).mask, (QueryTriggerInteraction)0)) { point = ((RaycastHit)(ref val)).point; } laserPoint.position = point; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); fireStopwatch += Time.fixedDeltaTime; if (fireStopwatch >= fireInterval) { fireStopwatch = 0f; Fire(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //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_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_0062: 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_0070: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: 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_00cb: 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_00de: 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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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_015c: 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) float num = 0.65f; ((BaseState)this).AddRecoil(-1f * num, -1.5f * num, -0.25f * num, 0.25f * num); ((EntityState)this).characterBody.AddSpreadBloom(0.5f); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); float num2 = 0.0425f; new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = ((BaseState)this).damageStat * damageCoefficient, damageColorIndex = (DamageColorIndex)0, damageType = (DamageTypeCombo.GenericPrimary | DamageTypeCombo.op_Implicit((DamageType)2)), falloffModel = (FalloffModel)0, maxDistance = 999f, force = 770f, hitMask = CommonMasks.bullet, minSpread = 0f - num2, maxSpread = num2, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = "", smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = 0.25f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = null, spreadPitchScale = 1f, spreadYawScale = 1f, hitEffectPrefab = Prefabs.bunkerLaserHitEffect }.Fire(); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)laserEffect)) { EntityState.Destroy((Object)(object)laserEffect); } AkSoundEngine.StopPlayingID(ID); AkSoundEngine.PostEvent("Play_Liberator_Laser_End", ((EntityState)this).gameObject); barBehaviour.canCharge = true; ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class Stationary : CharacterMain { public bool consumeShield; private CameraParamsOverrideHandle handle; public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write(consumeShield); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); consumeShield = reader.ReadBoolean(); } public override void OnEnter() { //IL_0011: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); handle = ((EntityState)this).cameraTargetParams.AddParamsOverride(new CameraParamsOverrideRequest { cameraParamsData = Prefabs.bunkerCameraParams.data, priority = 0.1f }, 0.5f); } public override void FixedUpdate() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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) base.FixedUpdate(); if (!consumeShield) { if (NetworkServer.active) { ((EntityState)this).healthComponent.RechargeShield(((EntityState)this).healthComponent.fullShield * 0.1f * Time.fixedDeltaTime); } return; } Transform modelTransform = ((EntityState)this).modelLocator.modelTransform; Vector3 forward = ((EntityState)this).modelLocator.modelTransform.forward; Ray aimRay = ((BaseState)this).GetAimRay(); modelTransform.forward = Vector3.Lerp(forward, ((Ray)(ref aimRay)).direction, 5f * Math.Max(1f, ((EntityState)this).characterBody.moveSpeed / ((EntityState)this).characterBody.baseMoveSpeed) * Time.fixedDeltaTime); ((EntityState)this).healthComponent.isShieldRegenForced = false; if (NetworkServer.active) { ((EntityState)this).characterBody.outOfDangerStopwatch = 0f; ((EntityState)this).characterBody.outOfDanger = false; ((EntityState)this).healthComponent.Networkshield = Math.Max(0f, ((EntityState)this).healthComponent.Networkshield - 10f * Time.fixedDeltaTime); } } public override void HandleCost() { } public override void HandleMovements() { if (consumeShield) { ((GenericCharacterMain)this).HandleMovements(); } } public override void OnExit() { //IL_0018: 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 (((CameraParamsOverrideHandle)(ref handle)).isValid) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(handle, 0.5f); } base.OnExit(); } } internal class CharacterMain : GenericCharacterMain { private bool _providingAntiGravity; private bool _providingFlight; private ICharacterGravityParameterProvider targetCharacterGravityParameterProvider; private ICharacterFlightParameterProvider targetCharacterFlightParameterProvider; private Behaviour behaviour; private bool providingAntiGravity { get { return _providingAntiGravity; } set { //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_004f: Unknown result type (might be due to invalid IL or missing references) if (_providingAntiGravity != value) { _providingAntiGravity = value; if (targetCharacterGravityParameterProvider != null) { CharacterGravityParameters gravityParameters = targetCharacterGravityParameterProvider.gravityParameters; gravityParameters.channeledAntiGravityGranterCount += (_providingAntiGravity ? 1 : (-1)); targetCharacterGravityParameterProvider.gravityParameters = gravityParameters; } } } } private bool providingFlight { get { return _providingFlight; } set { //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_004f: Unknown result type (might be due to invalid IL or missing references) if (_providingFlight != value) { _providingFlight = value; if (targetCharacterFlightParameterProvider != null) { CharacterFlightParameters flightParameters = targetCharacterFlightParameterProvider.flightParameters; flightParameters.channeledFlightGranterCount += (_providingFlight ? 1 : (-1)); targetCharacterFlightParameterProvider.flightParameters = flightParameters; } } } } private void StartFlight() { ((EntityState)this).modelLocator.normalizeToFloor = true; providingAntiGravity = true; providingFlight = true; if (((EntityState)this).characterBody.hasEffectiveAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.characterMotor) && ((EntityState)this).characterBody.characterMotor.isGrounded) { ((BaseCharacterController)((EntityState)this).characterBody.characterMotor).Motor.ForceUnground(0.1f); } } public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); behaviour = ((EntityState)this).GetComponent<Behaviour>(); targetCharacterGravityParameterProvider = ((Component)((EntityState)this).characterBody).GetComponent<ICharacterGravityParameterProvider>(); targetCharacterFlightParameterProvider = ((Component)((EntityState)this).characterBody).GetComponent<ICharacterFlightParameterProvider>(); } private void StopFlight() { ((BaseState)this).StartAimMode(2f, false); providingFlight = false; providingAntiGravity = false; ((EntityState)this).modelLocator.normalizeToFloor = false; } public virtual void HandleCost() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)behaviour) && !Physics.Raycast(((EntityState)this).transform.position, Vector3.down, 2.5f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { ((EntityState)this).healthComponent.isShieldRegenForced = false; if (NetworkServer.active) { ((EntityState)this).characterBody.outOfDangerStopwatch = 0f; ((EntityState)this).characterBody.outOfDanger = false; ((EntityState)this).healthComponent.Networkshield = Math.Max(0f, ((EntityState)this).healthComponent.Networkshield - 5f * Time.fixedDeltaTime); } } } public override void ProcessJump() { } public override void FixedUpdate() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).FixedUpdate(); Transform modelTransform = ((EntityState)this).modelLocator.modelTransform; Vector3 forward = ((EntityState)this).modelLocator.modelTransform.forward; Ray aimRay = ((BaseState)this).GetAimRay(); modelTransform.forward = Vector3.Lerp(forward, ((Ray)(ref aimRay)).direction, 5f * Math.Max(1f, ((EntityState)this).characterBody.moveSpeed / ((EntityState)this).characterBody.baseMoveSpeed) * Time.fixedDeltaTime); if (((EntityState)this).characterBody.characterMotor.disableAirControlUntilCollision || ((EntityState)this).healthComponent.shield <= 0f) { StopFlight(); } else if (((EntityState)this).healthComponent.shield > 0f) { StartFlight(); } if (providingFlight) { HandleCost(); } } public override void OnExit() { StopFlight(); ((EntityState)this).modelLocator.normalizeToFloor = false; ((GenericCharacterMain)this).OnExit(); } } internal class DeathState : DeathState { public override void OnEnter() { //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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //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) ((DeathState)this).OnEnter(); Vector3 position = ((BaseState)this).FindModelChild("center").position; EffectManager.SimpleEffect(Prefabs.Load<GameObject>("RoR2/Base/Common/VFX/OmniExplosionVFXDroneDeath.prefab"), position, Quaternion.identity, false); EffectManager.SimpleEffect(Prefabs.Load<GameObject>("RoR2/Base/LemurianBruiser/OmniExplosionVFXLemurianBruiserFireballImpact.prefab"), position, Quaternion.identity, false); EffectManager.SimpleEffect(Prefabs.Load<GameObject>("RoR2/Base/Toolbot/CryoCanisterExplosionPrimary.prefab"), position, Quaternion.identity, false); } } internal class LiberatorState : BaseSkillState { public Behaviour behaviour; public BarBehaviour barBehaviour; public override void OnEnter() { ((BaseState)this).OnEnter(); behaviour = ((EntityState)this).GetComponent<Behaviour>(); barBehaviour = ((EntityState)this).GetComponent<BarBehaviour>(); } } internal class MeleeSkillState : BaseSkillState { public float attackDuration; private bool hopped; private bool hasSwung; public bool isInHitPause; public float hitPauseDuration; public float hopVelocity; public float hitPauseTimer; public float stopwatch; public HitStopCachedState hitStopCachedState; public OverlapAttack overlapAttack; public bool hasHit; private bool hasAnimParameter; private float attackSpeedScaling; public Animator animator; public virtual float baseAttackDuration => 0f; public virtual float earlyExitDurationPercentage => 0f; public virtual float damageCoefficient => 0f; public virtual float forceMagnitude => 440f; public virtual float rootMotionSpeed => 25f; public virtual float baseHopVelocity => 4f; public virtual string layerName => "Gesture, Override"; public virtual string animationStateName => ""; public virtual string animParameter => "M1"; public virtual string hitBoxGroupName => ""; public virtual string hitBoxActiveParameter => "Curve"; public virtual string swingMuzzle => ""; public virtual GameObject swingEffectPrefab => null; public virtual bool hopOnHit => true; public virtual bool rootMotion => false; public virtual bool rootMotionWhileHitting => false; public virtual string swingSound => ""; public virtual DamageType damageType => (DamageType)0; public virtual DamageColorIndex damageColor => (DamageColorIndex)0; public virtual Vector3 bonusForce => Vector3.zero; public virtual GameObject hitEffectPrefab => null; public override void OnEnter() { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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) ((BaseState)this).OnEnter(); attackSpeedScaling = Math.Min(((BaseState)this).attackSpeedStat, 6f); attackDuration = baseAttackDuration / attackSpeedScaling; hitPauseDuration = GroundLight.hitPauseDuration / attackSpeedScaling; hopVelocity = baseHopVelocity / attackSpeedScaling; animator = ((EntityState)this).GetModelAnimator(); animator.SetFloat(hitBoxActiveParameter, 0f); overlapAttack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, ((EntityState)this).GetModelTransform(), hitBoxGroupName); overlapAttack.pushAwayForce = 1f; overlapAttack.damageType = DamageTypeCombo.op_Implicit(damageType); hasAnimParameter = !Utility.IsNullOrWhiteSpace(animParameter); if (hasAnimParameter && !Utility.IsNullOrWhiteSpace(animationStateName)) { ((EntityState)this).PlayAnimation(layerName, animationStateName, animParameter, attackDuration, 0f); } } public virtual Vector3 rootMotionDirection() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).characterDirection.forward; } public override void FixedUpdate() { //IL_0030: 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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { bool flag = FireMeleeAttack(overlapAttack, animator, hitBoxActiveParameter, forceMagnitude, bonusForce); hasHit = flag; if (hasHit) { if (hopOnHit && !((EntityState)this).characterMotor.isGrounded && !hopped) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity); hopped = true; } if (!rootMotionWhileHitting && !isInHitPause && hasAnimParameter) { isInHitPause = true; } } if (animator.GetFloat(hitBoxActiveParameter) > 0.1f && rootMotion && !isInHitPause) { Vector3 val = rootMotionDirection(); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += val * rootMotionSpeed * Time.fixedDeltaTime; } if (hitPauseTimer >= hitPauseDuration && isInHitPause) { isInHitPause = false; animator.speed = 1f; } if (!isInHitPause) { stopwatch += Time.fixedDeltaTime; } else { hitPauseTimer += Time.fixedDeltaTime; ((EntityState)this).characterMotor.velocity = Vector3.zero; animator.speed = 0f; } if (stopwatch >= attackDuration * earlyExitDurationPercentage) { if (((EntityState)this).inputBank.skill1.down) { SetState(); } if (stopwatch >= attackDuration) { BaseSkillState val2 = StateOverride(); if (val2 != null) { ((EntityState)this).outer.SetNextState((EntityState)(object)val2); } else { ((EntityState)this).outer.SetNextStateToMain(); } return; } } } if (animator.GetFloat(hitBoxActiveParameter) >= 0.11f && !hasSwung) { hasSwung = true; AkSoundEngine.PostEvent(swingSound, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)swingEffectPrefab) && !Utility.IsNullOrWhiteSpace(swingMuzzle)) { EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, swingMuzzle, false); } } } public bool FireMeleeAttack(OverlapAttack attack, Animator animator, string mecanimHitboxActiveParameter, float forceMagnitude, Vector3 bonusForce) { //IL_0042: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) bool result = false; if (Object.op_Implicit((Object)(object)animator) && animator.GetFloat(mecanimHitboxActiveParameter) > 0.1f) { attack.forceVector = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).transform.forward) * forceMagnitude + bonusForce; result = attack.Fire((List<HurtBox>)null); } return result; } public virtual void SetState() { } public virtual BaseSkillState StateOverride() { return null; } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class Primary : BaseSkillState { private float duration; private float baseDuration = 0.5f; private float damageCoefficient = 1.8f; private string muzzle = "Muzzle"; private GameObject muzzleflash = Prefabs.Load<GameObject>("RoR2/Base/Common/VFX/MuzzleflashBarrage.prefab"); private GameObject tracer = Prefabs.primaryTracer; private GameObject hiteffect = Prefabs.Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFX.prefab"); public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Fire(); } private void Fire() { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_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) //IL_0100: 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_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0151: 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_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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_0197: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_Liberator_Attack", ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleflash, ((EntityState)this).gameObject, muzzle, false); float num = 0.65f; ((BaseState)this).AddRecoil(-1f * num, -1.5f * num, -0.25f * num, 0.25f * num); ((EntityState)this).characterBody.AddSpreadBloom(0.5f); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); float num2 = 0.0425f; new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = ((BaseState)this).damageStat * damageCoefficient, damageColorIndex = (DamageColorIndex)0, damageType = (DamageTypeCombo.GenericPrimary | DamageTypeCombo.op_Implicit((DamageType)2)), falloffModel = (FalloffModel)0, maxDistance = 300f, force = 20f, hitMask = CommonMasks.bullet, minSpread = 0f - num2, maxSpread = num2, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = muzzle, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = 0.08f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracer, spreadPitchScale = 1f, spreadYawScale = 1f, hitEffectPrefab = hiteffect }.Fire(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class PrimaryOverride : BaseSkillState { private float duration; private float baseDuration = 0.5f; private float damageCoefficient = 30f; private string muzzle = "Muzzle"; private GameObject muzzleflash = Prefabs.Load<GameObject>("RoR2/Base/Commando/HitsparkCommandoShotgun.prefab"); private GameObject hiteffect = Prefabs.sniperImpactVFX; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Fire(); } private void Fire() { //IL_0094: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL