Decompiled source of Liberator v1.2.0
Liberator.dll
Decompiled a week 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.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; 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.Chef; 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"); private static Sprite sprintingIcon => Assets.Load<Sprite>("tankSpecial"); 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 (skillSlot.characterBody.isSprinting) { return sprintingIcon; } 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 TankBehaviour tankBehaviour; public float knockbackCoeff = 45f; public float trackerStopwatch; private float trackerSearchStopwatch = 1f; 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); AkBankManager.LoadBankAsync("char_chef", (BankCallback)null); AkBankManager.LoadBankAsync("char_Commando", (BankCallback)null); ID = AkSoundEngine.PostEvent("Play_Liberator_Idle_Sprint", ((Component)this).gameObject); animator = ((Component)base.characterBody.modelLocator.modelTransform).GetComponent<Animator>(); } private void FixedUpdate() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) ((HuntressTracker)this).FixedUpdate(); trackerStopwatch += Time.fixedDeltaTime; if (!(trackerStopwatch >= 120f)) { return; } trackerSearchStopwatch += Time.fixedDeltaTime; if (!(trackerSearchStopwatch >= 0.1f)) { return; } trackerSearchStopwatch = 0f; TeamMask enemyTeams = TeamMask.GetEnemyTeams(base.characterBody.teamComponent.teamIndex); foreach (CharacterBody instances in CharacterBody.instancesList) { if (instances.healthComponent.alive && ((TeamMask)(ref enemyTeams)).HasTeam(instances.teamComponent.teamIndex)) { if (NetworkServer.active) { instances.AddTimedBuff(Prefabs.trackerHighlight, 120f); } ((Component)instances).gameObject.AddComponent<PassiveHighlightBehaviour>().attacker = ((Component)this).gameObject; trackerStopwatch = 0f; break; } } } 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 float stopwatch; private float healStopwatch; public CharacterBody baseBody; private Dictionary<HealthComponent, GameObject> heals = new Dictionary<HealthComponent, GameObject>(); private void Start() { } private void FixedUpdate() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Expected O, but got Unknown //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)baseBody)) { return; } healStopwatch += Time.fixedDeltaTime; if (healStopwatch >= 0.25f) { healStopwatch = 0f; float num = baseBody.armor / 2f; foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers(baseBody.teamComponent.teamIndex)) { if (teamMember.body.healthComponent.alive && Vector3.Distance(((Component)teamMember).transform.position, ((Component)this).transform.position) <= num && !heals.ContainsKey(teamMember.body.healthComponent)) { GameObject val = Object.Instantiate<GameObject>(Prefabs.healLine); val.GetComponent<LineBetweenTransforms>().transformNodes = (Transform[])(object)new Transform[2] { baseBody.coreTransform, Object.op_Implicit((Object)(object)teamMember.body.coreTransform) ? teamMember.body.coreTransform : teamMember.body.transform }; heals.Add(teamMember.body.healthComponent, val); } } List<HealthComponent> list = new List<HealthComponent>(); foreach (KeyValuePair<HealthComponent, GameObject> heal in heals) { if (Vector3.Distance(((Component)heal.Key).transform.position, ((Component)this).transform.position) > num) { list.Add(heal.Key); } else if (NetworkServer.active) { float num2 = baseBody.baseMaxHealth * 2f; float num3 = baseBody.healthComponent.fullHealth + baseBody.healthComponent.fullShield; float val2 = num3 * 0.4f; float num4 = num3 / num2; heal.Key.Heal(Math.Min(val2, heal.Key.fullCombinedHealth * 0.01f * num4), default(ProcChainMask), true); } } foreach (HealthComponent item in list) { Object.Destroy((Object)(object)heals[item]); heals.Remove(item); } } stopwatch += Time.fixedDeltaTime; if (!(stopwatch >= 0.25f)) { return; } stopwatch = 0f; SphereSearch val3 = new SphereSearch(); val3.origin = ((Component)this).transform.position; val3.radius = baseBody.armor / 2f; val3.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; HurtBox[] hurtBoxes = val3.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(baseBody.teamComponent.teamIndex)).FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); HurtBox[] array = hurtBoxes; foreach (HurtBox val4 in array) { if (!val4.healthComponent.alive) { continue; } if (NetworkServer.active) { val4.healthComponent.body.AddTimedBuff(Prefabs.passiveHighlight, 0.25f); } ModelLocator component = ((Component)val4.healthComponent).GetComponent<ModelLocator>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.modelTransform)) { CharacterModel component2 = ((Component)component.modelTransform).GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)component2)) { TemporaryOverlayInstance val5 = TemporaryOverlayManager.AddOverlay(((Component)val4.healthComponent).gameObject); val5.originalMaterial = Prefabs.bunkerHighlightOverlay; val5.destroyComponentOnEnd = true; val5.animateShaderAlpha = true; val5.alphaCurve = AnimationCurve.Constant(0f, 1f, 1f); val5.duration = 0.27f; val5.AddToCharacterModel(component2); } } } } private void OnDestroy() { foreach (KeyValuePair<HealthComponent, GameObject> heal in heals) { Object.Destroy((Object)(object)heal.Value); } Object.Destroy((Object)(object)bunkerMat); } } public class CameraOverride : MonoBehaviour, ICameraStateProvider { public float entryLerpDuration = 1f; public float exitLerpDuration = 1f; public float fovOverride = -1f; public bool allowUserLook; [Tooltip("Next camera in a series of camera cuts. Prevents popping between cuts.")] public ForcedCamera nextCamera; private void Update() { ReadOnlyCollection<CameraRigController> readOnlyInstancesList = CameraRigController.readOnlyInstancesList; for (int i = 0; i < readOnlyInstancesList.Count; i++) { CameraRigController val = readOnlyInstancesList[i]; if (!val.hasOverride) { val.SetOverrideCam((ICameraStateProvider)(object)this, entryLerpDuration); } } } private void OnDisable() { ReadOnlyCollection<CameraRigController> readOnlyInstancesList = CameraRigController.readOnlyInstancesList; for (int i = 0; i < readOnlyInstancesList.Count; i++) { CameraRigController val = readOnlyInstancesList[i]; if (val.IsOverrideCam((ICameraStateProvider)(object)this)) { val.SetOverrideCam((ICameraStateProvider)(object)nextCamera, exitLerpDuration); } } } public void GetCameraState(CameraRigController cameraRigController, ref CameraState cameraState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) cameraState.position = ((Component)this).transform.position; cameraState.rotation = ((Component)this).transform.rotation; if (fovOverride > 0f) { cameraState.fov = fovOverride; } } public bool IsUserLookAllowed(CameraRigController cameraRigController) { return allowUserLook; } public bool IsUserControlAllowed(CameraRigController cameraRigController) { return true; } public bool IsHudAllowed(CameraRigController cameraRigController) { return true; } } 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 PassiveHighlightBehaviour : MonoBehaviour { public GameObject attacker; private CharacterBody body; public float duration = 60f; public float stopwatch; private TemporaryOverlayInstance overlay; private void Start() { body = ((Component)this).GetComponent<CharacterBody>(); CharacterModel component = ((Component)((Component)body).GetComponent<ModelLocator>().modelTransform).GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)component)) { overlay = TemporaryOverlayManager.AddOverlay(((Component)body).gameObject); overlay.originalMaterial = Prefabs.passiveHighlightOverlay; overlay.destroyComponentOnEnd = true; overlay.animateShaderAlpha = true; overlay.alphaCurve = AnimationCurve.Constant(0f, 1f, 1f); overlay.duration = duration; overlay.AddToCharacterModel(component); } } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (!body.HasBuff(Prefabs.trackerHighlight) || !body.healthComponent.alive || stopwatch >= duration) { Object.Destroy((Object)(object)this); } } private void OnDestroy() { overlay.Destroy(); } } internal class KillTracker : NetworkBehaviour { [SyncVar] public int killCount; public int NetworkkillCount { get { return killCount; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar<int>(value, ref killCount, 1u); } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.WritePackedUInt32((uint)killCount); 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)killCount); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { killCount = (int)reader.ReadPackedUInt32(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { killCount = (int)reader.ReadPackedUInt32(); } } } internal class TankBehaviour : MonoBehaviour { private Animator animator; public Animator baseAnimator; public CharacterBody baseBody; public ChildLocator childLocator; public float baseTextureSpeed = 2f; private float stopwatch = 1f; private SphereSearch search = new SphereSearch(); public float baseRadius = 25f; public HurtBox target; public bool disableByDistance = false; public float attentionTime = 3f; private Material treadsMat; private PrintController printController; private GameObject sprintEffectPositions; private Transform turretBone; private float radius => baseRadius * (baseBody.moveSpeed / baseBody.baseMoveSpeed); private void Awake() { animator = ((Component)this).GetComponent<Animator>(); childLocator = ((Component)this).GetComponent<ChildLocator>(); } private void Start() { turretBone = childLocator.FindChild("turretBone"); sprintEffectPositions = ((Component)childLocator.FindChild("sprintEffectPositions")).gameObject; printController = ((Component)this).GetComponent<PrintController>(); if (printController.rendererMaterialPairs != null && printController.rendererMaterialPairs.Length != 0) { treadsMat = printController.rendererMaterialPairs[0].material; } } private void LateUpdate() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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) if (Object.op_Implicit((Object)(object)target)) { Transform obj = turretBone; Vector3 val = ((Component)target).transform.position - turretBone.position; obj.forward = ((Vector3)(ref val)).normalized; } } private void FixedUpdate() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: 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_02b5: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)target) && disableByDistance && Vector3.Distance(((Component)target).transform.position, baseBody.transform.position) > radius) { target = null; } stopwatch += Time.fixedDeltaTime; bool flag = Object.op_Implicit((Object)(object)target) && !target.healthComponent.alive; bool flag2 = Object.op_Implicit((Object)(object)target) && Vector3.Distance(baseBody.transform.position, ((Component)target).transform.position) > radius; if (flag || flag2) { target = null; } if (stopwatch >= 0.1f && !Object.op_Implicit((Object)(object)target)) { stopwatch = 0f; search.origin = baseBody.transform.position; search.radius = radius; search.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; HurtBox[] hurtBoxes = search.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(baseBody.teamComponent.teamIndex)).FilterCandidatesByDistinctHurtBoxEntities() .OrderCandidatesByDistance() .GetHurtBoxes(); HurtBox[] array = hurtBoxes; foreach (HurtBox val in array) { if (val.healthComponent.alive) { target = val; break; } } } if (Object.op_Implicit((Object)(object)baseAnimator)) { bool @bool = baseAnimator.GetBool("isMoving"); animator.SetBool("isMoving", @bool); animator.SetFloat("walkSpeed", baseAnimator.GetFloat("walkSpeed")); if (Object.op_Implicit((Object)(object)treadsMat) && @bool) { bool flag3 = baseAnimator.GetFloat("forwardSpeed") > 0f; Vector2 val2 = Vector2.up * baseTextureSpeed * (baseBody.moveSpeed / baseBody.baseMoveSpeed) * Time.fixedDeltaTime; treadsMat.SetTextureOffset("_MainTex", treadsMat.GetTextureOffset("_MainTex") + val2 * (float)(flag3 ? 1 : (-1))); } sprintEffectPositions.SetActive(@bool); } } } 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); GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; } private static void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport) { if (!Object.op_Implicit((Object)(object)damageReport.victimBody) || !damageReport.victimBody.HasBuff(Prefabs.trackerHighlight)) { return; } PassiveHighlightBehaviour component = ((Component)damageReport.victimBody).GetComponent<PassiveHighlightBehaviour>(); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.attacker)) { return; } CharacterBody component2 = component.attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component2)) { KillTracker component3 = ((Component)component2.master).GetComponent<KillTracker>(); if (Object.op_Implicit((Object)(object)component3)) { component3.NetworkkillCount = component3.killCount + 1; } } } 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 (self.body.HasBuff(Prefabs.passiveHighlight)) { damageInfo.damage *= 1.25f; } 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 (Object.op_Implicit((Object)(object)sender.master)) { KillTracker component = ((Component)sender.master).GetComponent<KillTracker>(); if (Object.op_Implicit((Object)(object)component) && component.killCount > 0) { int killCount = component.killCount; float num = 0.02f * (float)killCount; args.healthMultAdd += num; args.damageMultAdd += num; args.moveSpeedMultAdd += num; args.attackSpeedMultAdd += num; Debug.LogWarning((object)component.killCount); } } if (sender.HasBuff(Prefabs.invisBuff)) { args.moveSpeedReductionMultAdd += 0.75f; } if (sender.HasBuff(Prefabs.bunkerBuff)) { args.armorAdd += 100f; args.regenMultAdd += 0.75f; } 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.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Dragonyck.Liberator", "Liberator", "1.2.0")] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.Liberator"; public const string MODNAME = "Liberator"; public const string VERSION = "1.2.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 utilityOverride; internal static SkillDef bunkerPrimaryOverride; internal static SkillDef bunkerSecondaryOverride; internal static SkillDef bunkerUtilityOverride; internal static SkillDef tankPrimaryOverride; internal static SkillDef tankSecondaryOverride; internal static SkillDef tankUtilityOverride; internal static ConfigFile config; internal static ConfigEntry<bool> enableVO; internal static ConfigEntry<float> cameraHeight; private void Awake() { enableVO = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Enable Voice Over", false, (ConfigDescription)null); cameraHeight = ((BaseUnityPlugin)this).Config.Bind<float>("Tank", "Camera Height", 25f, (ConfigDescription)null); config = ((BaseUnityPlugin)this).Config; 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_0ac1: Unknown result type (might be due to invalid IL or missing references) //IL_0ac6: 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)); Utils.NewStateMachine<Idle>(characterPrefab, "Cannon"); 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) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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<UtilityOverride>(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<BunkerSecondary>(ref flag); ContentAddition.AddEntityState<BunkerUtility>(ref flag); ContentAddition.AddEntityState<TankPrimary>(ref flag); ContentAddition.AddEntityState<TankSecondary>(ref flag); ContentAddition.AddEntityState<TankUtility>(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. Press Jump to toggle flight.\r\n\r\nEvery <style=cIsUtility>120s</style> an enemy is randomly highlighted. Killing a highlighted enemy permanently increases <style=cIsHealth>health</style>, <style=cIsDamage>damage</style>, <style=cIsDamage>attack speed</style> and <style=cIsUtility>movement speed</style> by <style=cIsDamage>2%</style>."); 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_OVERRIDE", "Overseer Fire"); LanguageAPI.Add("LIBERATOR_M1_OVERRIDE_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_OVERRIDE_DESCRIPTION", "LIBERATOR_M1_OVERRIDE", 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>()); LanguageAPI.Add("LIBERATOR_M1_TANK", "Auto Cannon"); LanguageAPI.Add("LIBERATOR_M1_TANK_DESCRIPTION", "Automatically fire at nearby enemies, exploding on contact for <style=cIsDamage>200% damage</style>. Tracking distance scales with <style=cIsUtility>movement speed</style>, and explosion radius scales with <style=cIsDamage>attack speed</style>."); tankPrimaryOverride = Utils.NewSkillDef<SkillDef>(typeof(BunkerPrimary), "No", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: true, 0, 0, 0, Assets.Load<Sprite>("tankPrimary"), "LIBERATOR_M1_TANK_DESCRIPTION", "LIBERATOR_M1_TANK", 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); LanguageAPI.Add("LIBERATOR_M2_BUNKER", "Push"); LanguageAPI.Add("LIBERATOR_M2_BUNKER_DESCRIPTION", "Knockback nearby enemies for <style=cIsDamage>150% damage</style>."); bunkerSecondaryOverride = Utils.NewSkillDef<SkillDef>(typeof(BunkerSecondary), "Slide", 1, 4f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: false, 1, 1, 1, Assets.Load<Sprite>("bunkerSecondary"), "LIBERATOR_M2_BUNKER_DESCRIPTION", "LIBERATOR_M2_BUNKER", Array.Empty<string>()); LanguageAPI.Add("LIBERATOR_M2_Tank", "Vent"); LanguageAPI.Add("LIBERATOR_M2_Tank_DESCRIPTION", "<style=cIsDamage>Ignite</style>. Damage nearby enemies for <style=cIsDamage>400% damage</style> per second."); tankSecondaryOverride = Utils.NewSkillDef<SkillDef>(typeof(TankSecondary), "Slide", 1, 4f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: false, 1, 1, 1, Assets.Load<Sprite>("tankSecondary"), "LIBERATOR_M2_Tank_DESCRIPTION", "LIBERATOR_M2_Tank", Array.Empty<string>()); } 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_OVERRIDE", "Teleport"); LanguageAPI.Add("LIBERATOR_UTIL_OVERRIDE_DESCRIPTION", "<style=cIsUtility>Teleport</style> allies to you."); utilityOverride = Utils.NewSkillDef<SkillDef>(typeof(UtilityOverride), "Slide", 1, 5f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: true, 1, 1, 1, Assets.Load<Sprite>("secondaryOverride"), "LIBERATOR_UTIL_OVERRIDE_DESCRIPTION", "LIBERATOR_UTIL_OVERRIDE", Array.Empty<string>()); LanguageAPI.Add("LIBERATOR_UTIL_BUNKER", "Death Sentence"); LanguageAPI.Add("LIBERATOR_UTIL_BUNKER_DESCRIPTION", "Fills up a meter by receiving damage, becomes available once full. Fire a continuous laser beam for <style=cIsDamage>3500% damage</style>. Consumes all meter on activation."); 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>()); LanguageAPI.Add("LIBERATOR_UTIL_TANK", "Cannon Toggle"); LanguageAPI.Add("LIBERATOR_UTIL_TANK_DESCRIPTION", "Disable Auto Cannon and remove the <style=cIsHealth>speed penalty</style>."); tankUtilityOverride = Utils.NewSkillDef<SkillDef>(typeof(TankUtility), "Slide", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 0, 0, 0, Assets.Load<Sprite>("tankUtility"), "LIBERATOR_UTIL_TANK_DESCRIPTION", "LIBERATOR_UTIL_TANK", Array.Empty<string>()); } private void SpecialSetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("LIBERATOR_SPEC", "Overseer"); LanguageAPI.Add("LIBERATOR_SPEC_DESCRIPTION", "Enter a diferent mode based on your current state, gaining a new set of skills.\r\n\r\n<style=cKeywordName>Grounded</style><style=cSub>Become completely <style=cIsUtility>stationary</style>. Gain <style=cIsDamage>100 armor</style>, <style=cIsHealing>75% health regen</style> and <style=cIsHealing>15% shield regen</style>. Nearby enemies are highlighted and their damage received is increased by <style=cIsDamage>25%</style>. Nearby allies are passively <style=cIsHealing>healed</style> for <style=cIsHealing>2% health</style> per second.\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>.\r\n\r\n<style=cKeywordName>Sprinting</style><style=cSub>Become a Siege Tank, with a <style=cIsHealth>-50% movement speed penalty</style>."); 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 GameObject tank; internal static GameObject healLine; internal static GameObject ventEffect; internal static GameObject ventEffectColored; internal static Material dashOverlay; internal static Material bunkerHighlightOverlay; internal static Material passiveHighlightOverlay; internal static BuffDef bunkerBuff; internal static BuffDef invisBuff; internal static BuffDef passiveHighlight; internal static BuffDef trackerHighlight; internal static CharacterCameraParams bunkerCameraParams; internal static void CreatePrefabs() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Expected O, but got Unknown //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Expected O, but got Unknown //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Expected O, but got Unknown //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Expected O, but got Unknown //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Expected O, but got Unknown //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Expected O, but got Unknown //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_0565: Expected O, but got Unknown //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05cd: Expected O, but got Unknown //IL_05e8: Unknown result type (might be due to invalid IL or missing references) //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_0664: Unknown result type (might be due to invalid IL or missing references) //IL_0669: Unknown result type (might be due to invalid IL or missing references) //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_0686: Unknown result type (might be due to invalid IL or missing references) //IL_068b: Unknown result type (might be due to invalid IL or missing references) //IL_06a1: Unknown result type (might be due to invalid IL or missing references) //IL_06a6: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Unknown result type (might be due to invalid IL or missing references) //IL_06b7: Unknown result type (might be due to invalid IL or missing references) //IL_06bc: Unknown result type (might be due to invalid IL or missing references) //IL_06c1: Unknown result type (might be due to invalid IL or missing references) //IL_06c3: Unknown result type (might be due to invalid IL or missing references) //IL_04da: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_0919: Unknown result type (might be due to invalid IL or missing references) //IL_091e: Unknown result type (might be due to invalid IL or missing references) //IL_095e: Unknown result type (might be due to invalid IL or missing references) //IL_0963: Unknown result type (might be due to invalid IL or missing references) //IL_09b2: Unknown result type (might be due to invalid IL or missing references) //IL_09bc: Unknown result type (might be due to invalid IL or missing references) //IL_0a00: Unknown result type (might be due to invalid IL or missing references) //IL_0a05: Unknown result type (might be due to invalid IL or missing references) //IL_0a5c: Unknown result type (might be due to invalid IL or missing references) //IL_0a66: Expected O, but got Unknown //IL_0a80: Unknown result type (might be due to invalid IL or missing references) //IL_0a85: Unknown result type (might be due to invalid IL or missing references) //IL_0b07: Unknown result type (might be due to invalid IL or missing references) //IL_0b1e: Unknown result type (might be due to invalid IL or missing references) //IL_0baa: Unknown result type (might be due to invalid IL or missing references) //IL_0bb4: Unknown result type (might be due to invalid IL or missing references) //IL_0bb9: Unknown result type (might be due to invalid IL or missing references) //IL_0bcb: Unknown result type (might be due to invalid IL or missing references) //IL_0bdd: Unknown result type (might be due to invalid IL or missing references) //IL_0c1f: Unknown result type (might be due to invalid IL or missing references) //IL_0c26: Expected O, but got Unknown //IL_0c2d: Unknown result type (might be due to invalid IL or missing references) //IL_0c34: Expected O, but got Unknown //IL_0c40: Unknown result type (might be due to invalid IL or missing references) //IL_0c45: Unknown result type (might be due to invalid IL or missing references) //IL_0c52: Unknown result type (might be due to invalid IL or missing references) //IL_0c5f: Unknown result type (might be due to invalid IL or missing references) //IL_0c76: Unknown result type (might be due to invalid IL or missing references) //IL_0c83: Unknown result type (might be due to invalid IL or missing references) //IL_0c90: Unknown result type (might be due to invalid IL or missing references) //IL_0cb0: Unknown result type (might be due to invalid IL or missing references) //IL_0cb5: Unknown result type (might be due to invalid IL or missing references) //IL_0dd3: Unknown result type (might be due to invalid IL or missing references) //IL_0ddd: Expected O, but got Unknown //IL_0df4: Unknown result type (might be due to invalid IL or missing references) //IL_0e01: Unknown result type (might be due to invalid IL or missing references) //IL_0e21: Unknown result type (might be due to invalid IL or missing references) //IL_0e2b: Expected O, but got Unknown //IL_0e6b: Unknown result type (might be due to invalid IL or missing references) //IL_0e70: Unknown result type (might be due to invalid IL or missing references) //IL_0ed0: Unknown result type (might be due to invalid IL or missing references) //IL_0eda: Unknown result type (might be due to invalid IL or missing references) //IL_0f01: Unknown result type (might be due to invalid IL or missing references) //IL_0f06: Unknown result type (might be due to invalid IL or missing references) //IL_0f76: Unknown result type (might be due to invalid IL or missing references) //IL_0f80: Expected O, but got Unknown //IL_0f9a: Unknown result type (might be due to invalid IL or missing references) //IL_0f9f: Unknown result type (might be due to invalid IL or missing references) //IL_105d: Unknown result type (might be due to invalid IL or missing references) //IL_1064: Expected O, but got Unknown //IL_1077: Unknown result type (might be due to invalid IL or missing references) //IL_107c: Unknown result type (might be due to invalid IL or missing references) //IL_113b: Unknown result type (might be due to invalid IL or missing references) //IL_1142: Expected O, but got Unknown //IL_115d: Unknown result type (might be due to invalid IL or missing references) //IL_1162: Unknown result type (might be due to invalid IL or missing references) Load<GameObject>("RoR2/Base/Core/PlayerMaster.prefab").AddComponent<KillTracker>(); passiveHighlight = Utils.NewBuffDef("PassiveHighlight", stack: false, hidden: true, null, Color.white); trackerHighlight = Utils.NewBuffDef("TrackerHighlight", stack: false, hidden: true, null, Color.white); bunkerHighlightOverlay = new Material(Load<Material>("RoR2/Base/artifactworld/matArtifactShellOverlay.mat")); bunkerHighlightOverlay.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/DLC3/texRampLightningRed.png")); bunkerHighlightOverlay.SetFloat("_Brightness", 8.5f); passiveHighlightOverlay = new Material(Load<Material>("RoR2/InDev/matEcho.mat")); passiveHighlightOverlay.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampAncientWisp.png")); passiveHighlightOverlay.SetColor("_TintColor", new Color(1f, 0.372549f, 0f)); passiveHighlightOverlay.SetFloat("_ZTest", 8f); Texture2D val = Load<Texture2D>("RoR2/DLC1/Common/ColorRamps/texRampConstructLaser.png"); Texture2D val2 = Load<Texture2D>("RoR2/DLC1/Common/ColorRamps/texRampConstructLaserTypeB.png"); healLine = Instantiate(new GameObject("HealLine", new Type[2] { typeof(LineRenderer), typeof(LineBetweenTransforms) }), "HealLine"); LineRenderer component = healLine.GetComponent<LineRenderer>(); ((Renderer)component).material = new Material(Load<Material>("RoR2/Base/BeetleQueen/matBeetleSpitTrail1.mat")); ((Renderer)component).material.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)115, byte.MaxValue, (byte)124, byte.MaxValue))); ((Renderer)component).material.mainTexture = (Texture)(object)Load<Texture2D>("RoR2/Base/Common/VFX/ParticleMasks/texSplat2TiledMask.png"); ((Renderer)component).material.SetVector("_CutoffScroll", new Vector4(0f, 0f, -25f, 15f)); component.startWidth = 0.1f; component.endWidth = 0.4f; LineBetweenTransforms component2 = healLine.GetComponent<LineBetweenTransforms>(); component2.vertexList = (Vector3[])(object)new Vector3[2]; component2.lineRenderer = component; 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); Texture2D val5 = Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampDefault.png"); ventEffect = Instantiate("RoR2/DLC2/Chef/ChefSecondaryFlameVFX.prefab", "VentEffect"); ((Component)ventEffect.GetComponentInChildren<Light>()).gameObject.SetActive(false); ParticleSystem[] componentsInChildren2 = ventEffect.GetComponentsInChildren<ParticleSystem>(); for (int k = 0; k < componentsInChildren2.Length; k++) { ShapeModule shape = componentsInChildren2[k].shape; ((ShapeModule)(ref shape)).angle = 80f; ParticleSystemRenderer component3 = ((Component)componentsInChildren2[k]).GetComponent<ParticleSystemRenderer>(); ((Renderer)component3).material = new Material(((Renderer)component3).material); if (k == 2) { ((Renderer)component3).material.SetColor("_EmissionColor", Color.white); } else { ((Renderer)component3).material.SetTexture("_RemapTex", (Texture)(object)val5); } } ventEffectColored = Instantiate(ventEffect, "VentEffectColored"); componentsInChildren2 = ventEffectColored.GetComponentsInChildren<ParticleSystem>(); for (int l = 0; l < componentsInChildren2.Length; l++) { ParticleSystemRenderer component4 = ((Component)componentsInChildren2[l]).GetComponent<ParticleSystemRenderer>(); ((Renderer)component4).material = new Material(((Renderer)component4).material); if (l == 2) { ((Renderer)component4).material.SetColor("_EmissionColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)65, (byte)0, byte.MaxValue))); } else { ((Renderer)component4).material.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)65, (byte)0, byte.MaxValue))); } } dashEffect = Instantiate("RoR2/Base/Huntress/HuntressBlinkEffect.prefab", "DashEffect"); ParticleSystemRenderer[] componentsInChildren3 = dashEffect.GetComponentsInChildren<ParticleSystemRenderer>(); ((Component)componentsInChildren3[0]).gameObject.SetActive(false); ((Component)componentsInChildren3[1]).gameObject.SetActive(false); ((Component)componentsInChildren3[2]).gameObject.SetActive(false); Material val6 = new Material(Load<Material>("RoR2/Base/Huntress/matHuntressSwipe.mat")); val6.SetTexture("_RemapTex", (Texture)(object)val2); ((Renderer)componentsInChildren3[3]).material = val6; ((Renderer)componentsInChildren3[4]).material = val6; ((Component)componentsInChildren3[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 component5 = ((Component)bunker.GetComponent<ChildLocator>().FindChild("mesh")).GetComponent<SkinnedMeshRenderer>(); ((Renderer)component5).material = Utils.InstantiateMaterial(((Renderer)component5).material); PrintController val7 = bunker.AddComponent<PrintController>(); ((Behaviour)val7).enabled = true; val7.printTime = 0.85f; val7.disableWhenFinished = true; val7.startingPrintHeight = 11f; val7.maxPrintHeight = -1f; val7.startingPrintBias = 5f; val7.maxPrintBias = 0.95f; val7.printCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); DestroyOnTimer val8 = bunker.AddComponent<DestroyOnTimer>(); val8.duration = 0.85f; ((Behaviour)val8).enabled = false; tank = Instantiate(Assets.Load<GameObject>("tankMdl"), "Tank"); tank.AddComponent<TankBehaviour>(); SkinnedMeshRenderer[] componentsInChildren4 = tank.GetComponentsInChildren<SkinnedMeshRenderer>(); foreach (SkinnedMeshRenderer val9 in componentsInChildren4) { ((Renderer)val9).material = Utils.InstantiateMaterial(((Renderer)val9).material); } val7 = tank.AddComponent<PrintController>(); ((Behaviour)val7).enabled = true; val7.printTime = 0.85f; val7.disableWhenFinished = true; val7.startingPrintHeight = 6f; val7.maxPrintHeight = 0.4f; val7.startingPrintBias = 6f; val7.maxPrintBias = 0.95f; val7.printCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); val8 = tank.AddComponent<DestroyOnTimer>(); val8.duration = 0.85f; ((Behaviour)val8).enabled = false; ((Component)tank.GetComponent<ChildLocator>().FindChild("cameraPos")).gameObject.AddComponent<CameraOverride>(); Transform val10 = tank.GetComponent<ChildLocator>().FindChild("sprintEffectPositions"); GameObject val11 = Object.Instantiate<GameObject>(((Component)((Component)Load<GameObject>("RoR2/Base/Treebot/TreebotBody.prefab").GetComponent<ModelLocator>().modelTransform).GetComponent<ChildLocator>().FindChild("BurrowCenter")).gameObject, tank.transform.position, Quaternion.identity, tank.transform); ParticleSystemRenderer[] componentsInChildren5 = val11.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val12 in componentsInChildren5) { string name = ((Object)val12).name; MainModule main = ((Component)val12).GetComponent<ParticleSystem>().main; ((MainModule)(ref main)).playOnAwake = true; ((MainModule)(ref main)).loop = true; switch (name) { case "Debris": case "Dust": ((Component)val12).transform.localScale = Vector3.one * 0.2f; break; case "Roots": ((Component)val12).gameObject.SetActive(false); break; } } for (int num = 0; num < val10.childCount; num++) { Transform child = val10.GetChild(num); Object.Instantiate<GameObject>(val11, child.position, Quaternion.identity, child); } Object.Destroy((Object)(object)val11); bunkerLaser = Instantiate("RoR2/DLC1/MajorAndMinorConstruct/LaserMajorConstruct.prefab", "BunkerLaser"); LineRenderer componentInChildren = bunkerLaser.GetComponentInChildren<LineRenderer>(); ((Renderer)componentInChildren).material = new Material(((Renderer)componentInChildren).material); ((Renderer)componentInChildren).material.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)111, (byte)0, byte.MaxValue))); ((Renderer)componentInChildren).material.SetTexture("_Cloud2Tex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/VFX/ParticleMasks/texBehemothTileMask.png")); ParticleSystem[] componentsInChildren6 = bunkerLaser.GetComponentsInChildren<ParticleSystem>(); ((Component)componentsInChildren6[1]).gameObject.SetActive(false); ((Component)componentsInChildren6[9]).gameObject.SetActive(false); Utils.CopyComponent<ShakeEmitter>(((Component)bunkerLaser.GetComponent<ChildLocator>().FindChild("LaserEnd")).GetComponent<ShakeEmitter>(), ((Component)componentInChildren).gameObject); bunkerBuff = Utils.NewBuffDef("Bunker", stack: false, hidden: true, null, Color.clear); invisBuff = Utils.NewBuffDef("Overseer", stack: false, hidden: true, null, Color.clear); GameObject val13 = Load<GameObject>("RoR2/Base/UI/HUDSimple.prefab"); Object.DontDestroyOnLoad((Object)(object)val13); HUDScaleController component6 = val13.GetComponent<HUDScaleController>(); HUDTracker hUDTracker = val13.AddComponent<HUDTracker>(); Transform val14 = val13.GetComponent<ChildLocator>().FindChild("BottomLeftCluster"); GameObject gameObject = ((Component)((Component)val14).GetComponentInChildren<HealthBar>()).gameObject; GameObject val15 = Object.Instantiate<GameObject>(gameObject); ((Object)val15).name = "BarRoot"; val15.transform.SetParent(gameObject.transform.parent); val15.transform.localPosition = Vector2.op_Implicit(Vector2.one * 6f); val15.transform.localRotation = Quaternion.identity; val15.transform.localScale = Vector3.one; HealthBar component7 = val15.GetComponent<HealthBar>(); RectTransform barContainer = component7.barContainer; GameObject val16 = new GameObject("Bar", new Type[2] { typeof(RectTransform), typeof(Image) }); RectTransform val17 = (RectTransform)val16.transform; ((Transform)val17).SetParent((Transform)(object)barContainer); ((Transform)val17).localPosition = Vector2.op_Implicit(Vector2.zero); ((Transform)val17).localRotation = Quaternion.identity; ((Transform)val17).localScale = Vector3.one; val17.sizeDelta = new Vector2(12f, 2f); val17.anchorMin = Vector2.zero; val17.anchorMax = Vector2.one; Image component8 = val16.GetComponent<Image>(); ((Graphic)component8).color = Color32.op_Implicit(new Color32((byte)117, (byte)8, (byte)26, byte.MaxValue)); component8.sprite = Load<Sprite>("RoR2/Base/UI/texUIMainHealthbar.png"); component8.type = (Type)3; component8.fillMethod = (FillMethod)0; component8.fillAmount = 0f; Object.Destroy((Object)(object)((Component)val15.transform.GetChild(0)).gameObject); hUDTracker.barRoot = val15; hUDTracker.bar = component8; hUDTracker.currentText = component7.currentHealthText; ((TMP_Text)hUDTracker.currentText).text = "100"; ((Component)((TMP_Text)hUDTracker.currentText).transform.parent).gameObject.SetActive(true); hUDTracker.fullText = component7.fullHealthText; ((TMP_Text)hUDTracker.fullText).text = "100"; Object.Destroy((Object)(object)component7); val15.SetActive(false); Texture2D val18 = Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampBrotherPillar.png"); sniperTracer2 = Instantiate("RoR2/Base/Bandit2/TracerBandit2Rifle.prefab", "SniperTracer2"); sniperTracer2.GetComponent<Tracer>().speed = 760f; LineRenderer component9 = sniperTracer2.GetComponent<LineRenderer>(); ((Renderer)component9).material = new Material(((Renderer)component9).material); ((Renderer)component9).material.SetTexture("_RemapTex", (Texture)(object)val18); component9.startColor = Color.cyan; component9.endColor = Color.cyan; ParticleSystemRenderer componentInChildren2 = sniperTracer2.GetComponentInChildren<ParticleSystemRenderer>(); ((Renderer)componentInChildren2).material = new Material(((Renderer)componentInChildren2).material); ((Renderer)componentInChildren2).material.DisableKeyword("VERTEXCOLOR"); ((Renderer)componentInChildren2).material.SetTexture("_RemapTex", (Texture)(object)val18); ((Renderer)componentInChildren2).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[] componentsInChildren7 = missileMuzzleEffect.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val19 in componentsInChildren7) { MainModule main2 = val19.main; ((MainModule)(ref main2)).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 component10 = primaryTracer.GetComponent<LineRenderer>(); ((Renderer)component10).material = new Material(((Renderer)component10).material); ((Renderer)component10).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 val20 = snipeTracer.GetComponentsInChildren<ParticleSystemRenderer>()[^1]; Material val21 = new Material(Load<Material>("RoR2/Base/MagmaWorm/matMagmaWormFireballTrail.mat")); val21.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)2, (byte)0, byte.MaxValue))); val21.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampIce.png")); val21.SetFloat("_Boost", 15f); ((Renderer)val20).materials = (Material[])(object)new Material[2] { val21, val21 }; 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 component11 = invisWard.GetComponent<BuffWard>(); component11.buffDef = Load<BuffDef>("RoR2/Base/Common/bdCloak.asset"); component11.radius = 20f; Material val22 = new Material(Load<Material>("RoR2/Base/Captain/matCaptainSupplyDropAreaIndicator2.mat")); val22.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] { val22, val22 }; 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 BunkerSecondary : BaseSkillState { private float duration = 0.65f; private Behaviour behaviour; private GameObject effectInstance; public override void OnEnter() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_00c0: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Expected O, but got Unknown //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022a: 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_023f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); behaviour = ((EntityState)this).GetComponent<Behaviour>(); AkSoundEngine.PostEvent("Play_commando_shift", ((EntityState)this).gameObject); effectInstance = Object.Instantiate<GameObject>(Prefabs.ventEffectColored, ((EntityState)this).transform.position, Quaternion.identity, ((EntityState)this).transform); effectInstance.transform.localPosition = Vector3.up * -1.5f; effectInstance.transform.localRotation = Quaternion.Euler(-90f, 0f, 0f); effectInstance.GetComponent<ScaleParticleSystemDuration>().newDuration = duration; float radius = 15f; if (!NetworkServer.active) { return; } SphereSearch val = new SphereSearch(); val.origin = ((EntityState)this).transform.position; val.radius = radius; val.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; HurtBox[] hurtBoxes = val.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent