using System; using System.Collections.Generic; 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.Seeker; using HG.Reflection; using JetBrains.Annotations; using KinematicCharacterController; using On.EntityStates.Seeker; using On.RoR2; using R2API; using Rewired; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.HudOverlay; using RoR2.Navigation; using RoR2.Networking; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: OptIn] [assembly: AssemblyTitle("SeekerTweaks")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SeekerTweaks")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("01975351-76aa-42c2-b6bc-2d9d8d247413")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace SeekerTweaks; internal class AllyTracker : MonoBehaviour { private float stopwatch; private CharacterBody body; private readonly BullseyeSearch search = new BullseyeSearch(); public CharacterBody lastTarget; public CharacterBody target; private TemporaryOverlayInstance overlay; private NetworkLoadout networkLoadout; private bool active; public float castDuration = 1.2f; public float maxDistance = Configs.veilBaseMaxDistance.Value; public float maxAngle = 20f; public float buffMaxDistance = Configs.veilBuffBaseMaxDistance.Value; public Indicator indicator; public SpriteRenderer sprite; private AnimationCurve curve = AnimationCurve.EaseInOut(0f, 0f, 1f, 0f); private void Awake() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown body = ((Component)this).GetComponent(); indicator = new Indicator(((Component)this).gameObject, Prefabs.allyIndicator); } private void Active() { active = body.skillLocator.utility.skillNameToken == "SEEKERTWEAKS_UTIL2"; } private void Start() { curve.AddKey(0.5f, 1f); indicator.active = true; LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); NetworkUser val = ((firstLocalUser != null) ? firstLocalUser.currentNetworkUser : null); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.networkLoadout)) { networkLoadout = val.networkLoadout; networkLoadout.onLoadoutUpdated += Active; } Active(); } private void OnDisable() { if (Object.op_Implicit((Object)(object)networkLoadout)) { networkLoadout.onLoadoutUpdated -= Active; } } private void FixedUpdate() { //IL_007b: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) if (active) { if (!Object.op_Implicit((Object)(object)sprite) && Object.op_Implicit((Object)(object)indicator.visualizerInstance)) { sprite = indicator.visualizerInstance.GetComponentInChildren(); } if (Object.op_Implicit((Object)(object)target) && Object.op_Implicit((Object)(object)sprite)) { float num = Vector3.Distance(target.transform.position, body.transform.position); float num2 = maxDistance + buffMaxDistance * 6f; float num3 = Util.Remap((num2 - num) / num2, 0f, 1f, 0.02f, 0.17f); ((Component)sprite).transform.localPosition = Vector3.up * num3; } stopwatch += Time.fixedDeltaTime; if (stopwatch >= 0.1f) { stopwatch = 0f; SearchForTarget(body.inputBank.GetAimRay()); } } } private void SearchForTarget(Ray aimRay) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) search.teamMaskFilter = TeamMask.none; ((TeamMask)(ref search.teamMaskFilter)).AddTeam(body.teamComponent.teamIndex); search.filterByLoS = false; search.searchOrigin = ((Ray)(ref aimRay)).origin; search.searchDirection = ((Ray)(ref aimRay)).direction; search.sortMode = (SortMode)3; search.maxDistanceFilter = maxDistance + buffMaxDistance * (float)body.GetBuffCount(Buffs.ChakraBuff); search.maxAngleFilter = maxAngle; search.RefreshCandidates(); search.FilterOutGameObject(((Component)this).gameObject); HurtBox val = search.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val)) { Sprite value = null; if (Prefabs.bodyIcons.TryGetValue(val.healthComponent.body.baseNameToken, out value)) { indicator.targetTransform = ((Component)val).transform; sprite.sprite = value; } lastTarget = target; target = val.healthComponent.body; if (Object.op_Implicit((Object)(object)lastTarget) && !((Object)(object)lastTarget != (Object)(object)target)) { return; } if (overlay != null) { overlay.CleanupEffect(); } if (Object.op_Implicit((Object)(object)val.healthComponent.body.modelLocator.modelTransform)) { CharacterModel component = ((Component)val.healthComponent.body.modelLocator.modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { overlay = TemporaryOverlayManager.AddOverlay(((Component)component).gameObject); overlay.duration = 9999f; overlay.originalMaterial = Prefabs.tpTargetMat; overlay.animateShaderAlpha = false; overlay.destroyComponentOnEnd = true; overlay.inspectorCharacterModel = component; overlay.AddToCharacterModel(component); } } } else { indicator.targetTransform = null; lastTarget = null; target = null; if (overlay != null) { overlay.CleanupEffect(); } } } } internal class AutoCastBehaviour : MonoBehaviour { private SeekerController controller; private SkillLocator skillLocator; private bool spiralSelected; private NetworkLoadout networkLoadout; private void Awake() { skillLocator = ((Component)this).GetComponent(); controller = ((Component)this).GetComponent(); } private void Start() { if (Object.op_Implicit((Object)(object)skillLocator)) { LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); NetworkUser val = ((firstLocalUser != null) ? firstLocalUser.currentNetworkUser : null); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.networkLoadout)) { networkLoadout = val.networkLoadout; networkLoadout.onLoadoutUpdated += NetworkLoadout_onLoadoutUpdated; } spiralSelected = skillLocator.secondary.skillNameToken == "SEEKER_SECONDARY_ALT1_NAME"; } } private void NetworkLoadout_onLoadoutUpdated() { spiralSelected = skillLocator.secondary.skillNameToken == "SEEKER_SECONDARY_ALT1_NAME"; } private void FixedUpdate() { if (Object.op_Implicit((Object)(object)skillLocator) && spiralSelected && Object.op_Implicit((Object)(object)controller) && skillLocator.secondary.CanExecute() && (controller.soulSpiralManager == null || controller.soulSpiralManager.soulSpiralArray.Length < controller.soulSpiralManager.soulSpiralLimit)) { skillLocator.secondary.ExecuteIfReady(); } } } internal class HealingBeamBehaviour : MonoBehaviour { public GameObject owner; public TeamIndex teamIndex; public float healAmount; private float stopwatch; private int hitsPerSec = 6; public float radius = 0.5f; public float maxDistance = 4f; private void FixedUpdate() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Expected O, but got Unknown //IL_016a: Expected O, but got Unknown //IL_016b: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } stopwatch += Time.fixedDeltaTime; if (!(stopwatch >= 1f / (float)hitsPerSec)) { return; } stopwatch = 0f; BulletAttack val = new BulletAttack { bulletCount = 1u, aimVector = Vector3.up, origin = ((Component)this).transform.position, damage = 0f, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)1, maxDistance = maxDistance, force = 0f, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = 0f, isCrit = false, owner = null, muzzleName = "", smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = radius, sniper = false, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, weapon = null, tracerEffectPrefab = null, spreadPitchScale = 1f, spreadYawScale = 1f, hitEffectPrefab = null, hitCallback = (HitCallback)delegate(BulletAttack _bulletAttack, ref BulletHit info) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)info.hitHurtBox) && Object.op_Implicit((Object)(object)info.hitHurtBox.healthComponent) && info.hitHurtBox.healthComponent.body.teamComponent.teamIndex == teamIndex) { info.hitHurtBox.healthComponent.Heal(healAmount / (float)hitsPerSec, default(ProcChainMask), true); EffectManager.SimpleEffect(Prefabs.Load("RoR2/Base/Medkit/MedkitHealEffect.prefab"), info.hitHurtBox.healthComponent.body.corePosition, Quaternion.identity, true); } return BulletAttack.defaultHitCallback.Invoke(_bulletAttack, ref info); } }; DamageAPI.AddModdedDamageType(val, Prefabs.noHit); val.Fire(); } } internal class DamagingBeamBehaviour : MonoBehaviour { public GameObject owner; public float damage; public bool crit; public TeamIndex teamIndex; private float stopwatch; public int hitsPerSec = 6; public float radius = 2f; public float maxDistance = 22f; public float force = 120f; private void FixedUpdate() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: 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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: 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_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { stopwatch += Time.fixedDeltaTime; if (stopwatch >= 1f / (float)hitsPerSec) { stopwatch = 0f; new BulletAttack { bulletCount = 1u, aimVector = Vector3.up, origin = ((Component)this).transform.position, damage = damage / (float)hitsPerSec, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)1, maxDistance = maxDistance, force = force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = 0f, isCrit = crit, owner = owner, muzzleName = "", smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = radius, sniper = false, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, weapon = null, tracerEffectPrefab = null, spreadPitchScale = 1f, spreadYawScale = 1f, hitEffectPrefab = Prefabs.beamHitEffect }.Fire(); } } } } internal class DestroyOnDistanceReach : MonoBehaviour { public Transform target; public float maxDistance = 35f; private void FixedUpdate() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) if (Vector3.Distance(((Component)this).transform.position, target.position) <= maxDistance) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } internal class MantraStacks : MonoBehaviour { public int stacks = 0; public CharacterBody ownerBody; } internal class PetalTracker : MonoBehaviour { private HudElement hudElement; private SeekerController controller; private float stopwatch = 0.1f; public Image[] dots; private Color color => (controller.currentChakraGate == 7) ? Color32.op_Implicit(new Color32((byte)59, (byte)243, (byte)173, byte.MaxValue)) : Color.white; private void Awake() { hudElement = ((Component)this).GetComponent(); } private void FixedUpdate() { //IL_00be: Unknown result type (might be due to invalid IL or missing references) stopwatch += Time.fixedDeltaTime; if (!Object.op_Implicit((Object)(object)controller) && Object.op_Implicit((Object)(object)hudElement) && Object.op_Implicit((Object)(object)hudElement.targetBodyObject)) { controller = hudElement.targetBodyObject.GetComponent(); } else { if (!(stopwatch >= 0.1f) || !Util.HasEffectiveAuthority(hudElement.targetBodyObject)) { return; } stopwatch = 0f; for (int i = 0; i < dots.Length; i++) { bool active = false; if (i <= controller.currentChakraGate - 1) { active = true; } ((Graphic)dots[i]).color = color; ((Component)dots[i]).gameObject.SetActive(active); } } } } internal class SeekerTracker : HuntressTracker { private NetworkLoadout networkLoadout; private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown base.indicator = new Indicator(((Component)this).gameObject, Prefabs.trackingIndicator); } private void Active() { base.indicator.active = base.characterBody.skillLocator.primary.skillNameToken == "SEEKERTWEAKS_PRIMARY"; } private void Start() { ((HuntressTracker)this).Start(); LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); NetworkUser val = ((firstLocalUser != null) ? firstLocalUser.currentNetworkUser : null); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.networkLoadout)) { networkLoadout = val.networkLoadout; networkLoadout.onLoadoutUpdated += Active; } Active(); } private void OnDisable() { if (Object.op_Implicit((Object)(object)networkLoadout)) { networkLoadout.onLoadoutUpdated -= Active; } ((HuntressTracker)this).OnDisable(); } } internal class SeekerTweakBehaviour : MonoBehaviour { public SeekerController controller; public string sound = "Play_seeker_skill4_win"; private void Awake() { controller = ((Component)this).GetComponent(); } private void OnEnable() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown int value = Configs.spiralLimit.Value; if (value != 6) { controller.soulSpiralManager = new SeekerSoulSpiralManager(controller); int num = value; controller.soulSpiralManager.soulSpiralLimit = num; controller.soulSpiralManager.soulSpiralArray = (SoulSpiralProjectile[])(object)new SoulSpiralProjectile[num * 2]; } } } internal class SojournIndicatorBehaviour : MonoBehaviour { public Image upper; private float stopwatch; public float duration = 2f; private void Start() { upper.type = (Type)3; upper.fillOrigin = 1; upper.fillAmount = 0f; } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; upper.fillAmount = stopwatch / duration; } } internal class SoulSpiralTracker : MonoBehaviour { private SoulSpiralProjectile projectile; private ProjectileController controller; public GameObject owner; public CharacterBody ownerBody; private void Awake() { projectile = ((Component)this).GetComponent(); controller = ((Component)this).GetComponent(); } private void OnEnable() { InstanceTracker.Add(this); } private void Start() { owner = controller.owner; ownerBody = (Object.op_Implicit((Object)(object)owner) ? owner.GetComponent() : null); UpdateProjectile(owner); } private void FixedUpdate() { if (Object.op_Implicit((Object)(object)ownerBody) && Object.op_Implicit((Object)(object)projectile)) { projectile.easeInDuration /= ownerBody.attackSpeed; } } public void UpdateProjectile(GameObject owner) { //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_00dc: 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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)owner)) { Debug.LogWarning((object)("no owner: " + ((Object)this).name)); return; } List instancesList = InstanceTracker.GetInstancesList(); if (instancesList == null || instancesList.Count <= 0) { return; } SoulSpiralTracker[] array = instancesList.Where((SoulSpiralTracker x) => Object.op_Implicit((Object)(object)x.owner) && (Object)(object)x.owner == (Object)(object)owner).ToArray(); if (array == null || array.Length == 0) { return; } float value = Configs.spiralRadius.Value; bool flag = value != 4.75f; bool flag2 = Configs.spiralLimit.Value != 6; float num = 360f / (float)array.Length; Vector3 val = Vector3.ProjectOnPlane(owner.transform.forward, Vector3.up); for (int i = 0; i < array.Length; i++) { if (flag2) { Vector3 initialRadialDirection = Quaternion.AngleAxis(num * (float)(i + 1), Vector3.up) * val; array[i].projectile.initialRadialDirection = initialRadialDirection; } if (flag) { array[i].projectile.radius = value; } } } private void OnDisable() { InstanceTracker.Remove(this); UpdateProjectile(owner); } } internal class VehicleTimer : MonoBehaviour { public float duration = 4f; private VehicleSeat vehicle; private float stopwatch; private void Awake() { vehicle = ((Component)this).GetComponent(); } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (stopwatch >= duration && NetworkServer.active) { vehicle.EjectPassenger(); } } } internal class Configs { internal static ConfigFile config; internal static ConfigEntry addAlts; internal static ConfigEntry canInterrupt; internal static ConfigEntry petalIndicatorReplacer; internal static ConfigEntry targetedHand; internal static ConfigEntry spiralLimit; internal static ConfigEntry autoCastSpiral; internal static ConfigEntry spiralSpeedScaling; internal static ConfigEntry spiralRadius; internal static ConfigEntry spiralSmallHop; internal static ConfigEntry spiralSmallHopAmount; internal static ConfigEntry spiralSmallHopWhileGrounded; internal static ConfigEntry sojournTimer; internal static ConfigEntry castSecondary; internal static ConfigEntry castSpecial; internal static ConfigEntry wasdMovement; internal static ConfigEntry noMinigame; internal static ConfigEntry minigameRevive; internal static ConfigEntry spiritSojournDuration; internal static ConfigEntry spiritSojournBuffDuration; internal static ConfigEntry spiritSojournBaseSpeed; internal static ConfigEntry spiritSojournBuffBaseSpeed; internal static ConfigEntry rayDamage; internal static ConfigEntry rayExplosionDamage; internal static ConfigEntry rayExplosionBuffDamage; internal static ConfigEntry rayFireRate; internal static ConfigEntry rayHealAmount; internal static ConfigEntry veilBarrierAmount; internal static ConfigEntry veilBuffBarrierAmount; internal static ConfigEntry veilBaseMaxDistance; internal static ConfigEntry veilBuffBaseMaxDistance; internal static ConfigEntry skyBeamDamageCoefficient; internal static ConfigEntry skyBeamBuffDamageCoefficient; internal static ConfigEntry skyBeamHealCoefficient; internal static ConfigEntry skyBeamBuffHealCoefficient; internal static ConfigEntry skyBeamRadius; internal static void Init() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown config = new ConfigFile(Paths.ConfigPath + "\\com.Dragonyck.SeekerTweaks.cfg", true); string text = "01 - General"; addAlts = config.Bind(text, "Add Alt Skills", true, (ConfigDescription)null); canInterrupt = config.Bind(text, "Spirit Punch Is Interruptable", true, "Enables all skills to be activatable during Spirit Punch."); petalIndicatorReplacer = config.Bind(text, "HG Style Petal Counter", true, (ConfigDescription)null); string text2 = "02 - Unseen Hand"; targetedHand = config.Bind(text2, "Targeted Unseen Hand", true, "Can be cast by aiming directly at an enemy. It places the projectile on the ground below the target, *if* it has enough range to reach it, otherwise it will be placed directly on the target."); string text3 = "03 - Soul Spiral"; spiralLimit = config.Bind(text3, "Soul Spiral Limit", 999, "Default is 6"); autoCastSpiral = config.Bind(text3, "Auto Cast Soul Spiral", true, (ConfigDescription)null); spiralSpeedScaling = config.Bind(text3, "Soul Spiral Orbiting Speed Scale w/ Attack Speed", true, (ConfigDescription)null); spiralRadius = config.Bind(text3, "Soul Spiral Orbiting Radius", 6f, "Default is 4.75"); spiralSmallHop = config.Bind(text3, "Soul Spiral Hop On Hit", true, (ConfigDescription)null); spiralSmallHopAmount = config.Bind(text3, "Soul Spiral Hop Amount", 4f, (ConfigDescription)null); spiralSmallHopWhileGrounded = config.Bind(text3, "Soul Spiral Hop While Grounded", false, "Needs Soul Spiral Hop On Hit to be enabled."); string text4 = "04 - Sojourn"; sojournTimer = config.Bind(text4, "Sojourn Timer On Crosshair", true, (ConfigDescription)null); castSecondary = config.Bind(text4, "Cast Secondary While In Sojourn", true, (ConfigDescription)null); castSpecial = config.Bind(text4, "Cast Special While In Sojourn", true, (ConfigDescription)null); wasdMovement = config.Bind(text4, "Directional Input Movement Sojourn", true, "Aim up/down, directional input for movement."); string text5 = "05 - Meditate"; noMinigame = config.Bind(text5, "No Meditate QTE", true, "Functions like usual, but lets you move and removes the minigame."); minigameRevive = config.Bind(text5, "QTE On Revive", true, "Enables minigame for the revive only. Requires No Minigame to be enabled."); string text6 = "06 - Sojourn Spirit"; spiritSojournDuration = config.Bind(text6, "Sojourn Spirit Duration", 3.5f, (ConfigDescription)null); spiritSojournBuffDuration = config.Bind(text6, "Sojourn Spirit Additional Duration Per Tranquility", 0.5f, (ConfigDescription)null); spiritSojournBaseSpeed = config.Bind(text6, "Sojourn Spirit Base Speed", 15f, (ConfigDescription)null); spiritSojournBuffBaseSpeed = config.Bind(text6, "Sojourn Spirit Additional Base Speed Per Tranquility", 2.5f, (ConfigDescription)null); string text7 = "07 - Mantra Ray"; rayDamage = config.Bind(text7, "Mantra Ray Damage Coefficient", 0.9f, (ConfigDescription)null); rayExplosionDamage = config.Bind(text7, "Mantra Ray Explosion Damage Coefficient", 2f, (ConfigDescription)null); rayExplosionBuffDamage = config.Bind(text7, "Mantra Ray Additional Explosion Damage Coefficient Per Tranquility", 0.2f, (ConfigDescription)null); rayFireRate = config.Bind(text7, "Mantra Ray Fire Interval", 0.25f, (ConfigDescription)null); rayHealAmount = config.Bind(text7, "Mantra Ray Explosion Heal Coefficient", 0.02f, (ConfigDescription)null); string text8 = "08 - SpiritVeil"; veilBarrierAmount = config.Bind(text8, "Spirit Veil Barrier Coefficient", 0.2f, (ConfigDescription)null); veilBuffBarrierAmount = config.Bind(text8, "Spirit Veil Additional Barrier Coefficient Per Tranquility", 0.05f, (ConfigDescription)null); veilBaseMaxDistance = config.Bind(text8, "Spirit Veil Base Max Distance", 70f, (ConfigDescription)null); veilBuffBaseMaxDistance = config.Bind(text8, "Spirit Veil Additional Base Max Distance Per Tranquility", 15f, (ConfigDescription)null); string text9 = "09 - Dhamma"; skyBeamDamageCoefficient = config.Bind(text9, "Dhamma Damage Coefficient", 4f, "Damage Per Second"); skyBeamBuffDamageCoefficient = config.Bind(text9, "Dhamma Additional Damage Coefficient Per Tranquility", 0.35f, "Additional Damage Per Second"); skyBeamHealCoefficient = config.Bind(text9, "Dhamma Heal Coefficient", 0.05f, "Total Heal Max HP Per Second"); skyBeamBuffHealCoefficient = config.Bind(text9, "Dhamma Additional Heal Coefficient Per Tranquility", 0.025f, "Additional Total Heal Max HP Per Second"); skyBeamRadius = config.Bind(text9, "Dhamma Radius", 35f, (ConfigDescription)null); } } internal class TravelSojourn : Sojourn { private float skillDuration; private GameObject indicator; private SojournVehicle vehicle; private float stopwatch; private bool triggeredExit; public override void OnEnter() { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) ((Sojourn)this).OnEnter(); skillDuration = Configs.spiritSojournDuration.Value + Configs.spiritSojournBuffDuration.Value * (float)((EntityState)this).characterBody.GetBuffCount(Buffs.ChakraBuff); base.vehiclePrefab = Prefabs.vehiclePrefab; Debug.LogWarning((object)base.vehiclePrefab); if (((EntityState)this).isAuthority && Configs.sojournTimer.Value) { CrosshairManager val = CrosshairManager.instancesList.Find((CrosshairManager x) => (Object)(object)x.crosshairHudElement.targetBodyObject == (Object)(object)((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)val)) { indicator = Object.Instantiate(Prefabs.sojournIndicator, (Transform)(object)val.container); indicator.transform.localPosition = Vector3.zero; indicator.GetComponent().duration = skillDuration; } } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } public override void Update() { ((EntityState)this).Update(); if (Configs.castSecondary.Value && ((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed && ((EntityState)this).skillLocator.secondary.CanExecute()) { ((EntityState)this).skillLocator.secondary.ExecuteIfReady(); } if (Configs.castSpecial.Value && ((ButtonState)(ref ((EntityState)this).inputBank.skill4)).justPressed && ((EntityState)this).skillLocator.special.CanExecute()) { ((EntityState)this).skillLocator.special.ExecuteIfReady(); } } public override void FixedUpdate() { ((Sojourn)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (!Object.op_Implicit((Object)(object)vehicle) && (Object)(object)((EntityState)this).characterBody.currentVehicle != (Object)null) { vehicle = ((Component)((EntityState)this).characterBody.currentVehicle).GetComponent(); } if (Object.op_Implicit((Object)(object)vehicle) && stopwatch >= 0.1f) { stopwatch = 0f; vehicle.currentSpeed = Configs.spiritSojournBaseSpeed.Value + Configs.spiritSojournBuffBaseSpeed.Value * (float)((EntityState)this).characterBody.GetBuffCount(Buffs.ChakraBuff); } if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.currentVehicle) && ((EntityState)this).fixedAge >= skillDuration && !triggeredExit) { ((EntityState)this).characterBody.currentVehicle.SetPassenger((GameObject)null); } if (((EntityState)this).isAuthority && base.seekerController.doesExitVehicle) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } if (Object.op_Implicit((Object)(object)indicator)) { EntityState.Destroy((Object)(object)indicator); } ((Sojourn)this).OnExit(); } } internal class BetterSojourn : Sojourn { private GameObject indicator; public override void OnEnter() { //IL_0075: Unknown result type (might be due to invalid IL or missing references) ((Sojourn)this).OnEnter(); base.vehiclePrefab = Prefabs.Load("RoR2/DLC2/Seeker/SojournVehicle/SojournVehicle.prefab"); if (((EntityState)this).isAuthority && Configs.sojournTimer.Value) { CrosshairManager val = CrosshairManager.instancesList.Find((CrosshairManager x) => (Object)(object)x.crosshairHudElement.targetBodyObject == (Object)(object)((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)val)) { indicator = Object.Instantiate(Prefabs.sojournIndicator, (Transform)(object)val.container); indicator.transform.localPosition = Vector3.zero; } } } public override void Update() { ((EntityState)this).Update(); if (Configs.castSecondary.Value && ((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed && ((EntityState)this).skillLocator.secondary.CanExecute()) { ((EntityState)this).skillLocator.secondary.ExecuteIfReady(); } if (Configs.castSpecial.Value && ((ButtonState)(ref ((EntityState)this).inputBank.skill4)).justPressed && ((EntityState)this).skillLocator.special.CanExecute()) { ((EntityState)this).skillLocator.special.ExecuteIfReady(); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)indicator)) { EntityState.Destroy((Object)(object)indicator); } ((Sojourn)this).OnExit(); } } internal class SkyBeam : BaseSkillState { private SeekerController controller; private Dictionary enemyIndicators = new Dictionary(); private Dictionary allyIndicators = new Dictionary(); private AimRequest request; public override void OnEnter() { ((BaseState)this).OnEnter(); controller = ((EntityState)this).GetComponent(); ((EntityState)this).PlayAnimation("Gesture, Override", "SojournEnterTransform", "SojournEnterTransform.playbackRate", 0.5f, 0f); request = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)5); ((EntityState)this).GetModelAnimator().SetLayerWeight(6, 0.5f); AkSoundEngine.PostEvent("Play_seeker_skill4_timeout", ((EntityState)this).gameObject); } private void UpdateAreaIndicators() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) TeamMask none = TeamMask.none; ((TeamMask)(ref none)).AddTeam(((EntityState)this).teamComponent.teamIndex); TeamMask enemyTeams = TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex); GameObject value = null; float value2 = Configs.skyBeamRadius.Value; bool flag = ((EntityState)this).characterBody.HasBuff(Buffs.RevitalizeBuff); foreach (CharacterBody instances in CharacterBody.instancesList) { bool flag2 = Vector3.Distance(instances.transform.position, ((EntityState)this).transform.position) <= value2; if ((Object)(object)instances != (Object)(object)((EntityState)this).characterBody && ((TeamMask)(ref enemyTeams)).HasTeam(instances.teamComponent.teamIndex)) { if (!enemyIndicators.TryGetValue(instances, out value) && flag2) { enemyIndicators.Add(instances, Object.Instantiate(Prefabs.skyBeamAreaIndicator, instances.footPosition, Quaternion.identity, instances.transform)); } else if (Object.op_Implicit((Object)(object)value) && !flag2) { enemyIndicators.Remove(instances); EntityState.Destroy((Object)(object)value); } } else { if (!((TeamMask)(ref none)).HasTeam(((EntityState)this).teamComponent.teamIndex)) { continue; } if (!allyIndicators.TryGetValue(instances, out value)) { if (flag2 || flag) { allyIndicators.Add(instances, Object.Instantiate(Prefabs.skyBeamHealingAreaIndicator, instances.footPosition, Quaternion.identity, instances.transform)); } } else if (Object.op_Implicit((Object)(object)value) && !flag2 && !flag) { allyIndicators.Remove(instances); EntityState.Destroy((Object)(object)value); } } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= 0.1f) { ((EntityState)this).fixedAge = 0f; UpdateAreaIndicators(); } if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority()) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_seeker_skill4_win", ((EntityState)this).gameObject); AkSoundEngine.PostEvent("Play_seeker_skill3_explo", ((EntityState)this).gameObject); ((EntityState)this).GetModelAnimator().SetLayerWeight(6, 1f); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { request.Dispose(); } int buffCount = ((EntityState)this).characterBody.GetBuffCount(Buffs.ChakraBuff); bool flag = ((EntityState)this).characterBody.HasBuff(Buffs.RevitalizeBuff); foreach (KeyValuePair enemyIndicator in enemyIndicators) { CharacterBody key = enemyIndicator.Key; GameObject value = enemyIndicator.Value; if (Object.op_Implicit((Object)(object)value)) { GameObject val = Object.Instantiate(Prefabs.skyBeamBeam, key.footPosition, Quaternion.Euler(Vector3.right * -90f), key.transform); if (NetworkServer.active) { DamagingBeamBehaviour damagingBeamBehaviour = val.AddComponent(); damagingBeamBehaviour.owner = ((EntityState)this).gameObject; damagingBeamBehaviour.damage = ((BaseState)this).damageStat * (Configs.skyBeamDamageCoefficient.Value + (float)buffCount * Configs.skyBeamBuffDamageCoefficient.Value); damagingBeamBehaviour.crit = ((BaseState)this).RollCrit(); damagingBeamBehaviour.teamIndex = ((EntityState)this).teamComponent.teamIndex; } EntityState.Destroy((Object)(object)value); } } foreach (KeyValuePair allyIndicator in allyIndicators) { CharacterBody key2 = allyIndicator.Key; GameObject value2 = allyIndicator.Value; if (Object.op_Implicit((Object)(object)value2)) { GameObject val2 = Object.Instantiate(Prefabs.skyHealingBeamBeam, key2.footPosition, Quaternion.Euler(Vector3.right * -90f), key2.transform); if (NetworkServer.active) { HealingBeamBehaviour healingBeamBehaviour = val2.AddComponent(); healingBeamBehaviour.owner = ((EntityState)this).gameObject; healingBeamBehaviour.healAmount = ((EntityState)this).healthComponent.fullCombinedHealth * (Configs.skyBeamHealCoefficient.Value + (float)buffCount * Configs.skyBeamBuffHealCoefficient.Value); healingBeamBehaviour.teamIndex = ((EntityState)this).teamComponent.teamIndex; } EntityState.Destroy((Object)(object)value2); } } if (NetworkServer.active) { if (!flag) { if (buffCount < 6) { ((EntityState)this).characterBody.AddBuff(Buffs.ChakraBuff); controller.currentChakraGate = (byte)(buffCount + 1); } else { ((EntityState)this).characterBody.AddBuff(Buffs.RevitalizeBuff); controller.currentChakraGate = 7; } } else { controller.currentChakraGate = 0; ((EntityState)this).characterBody.RemoveBuff(Buffs.RevitalizeBuff); for (int i = 0; i < 6; i++) { ((EntityState)this).characterBody.RemoveBuff(Buffs.ChakraBuff); } } Debug.LogWarning((object)controller.currentChakraGate); controller.CallRpcSetPedalsValue(controller.currentChakraGate); } ((EntityState)this).PlayAnimation("Gesture, Override", "SoulSpiralFinish"); ((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)4; } } internal class SpiritRay : BaseSkillState { private float fireRate; private float baseFireRate = Configs.rayFireRate.Value; private Transform muzzle; private BezierCurveLine beamEffect; private CharacterBody cachedBody; private Animator animator; private float startupDuration = 0.5f; private float stopwatch; private SeekerTracker tracker; private float damageCoefficient = Configs.rayDamage.Value; private float explosionDamageCoefficient = Configs.rayExplosionDamage.Value; private GameObject muzzleEffect; private float downPos = 1.8f; private float backPos = 0.3f; private uint ID; private bool soundLoop; private bool pLaYiTagAin; public override void OnEnter() { ((BaseState)this).OnEnter(); Configs.config.Reload(); tracker = ((EntityState)this).GetComponent(); startupDuration /= ((BaseState)this).attackSpeedStat; cachedBody = ((HuntressTracker)tracker).trackingTarget.healthComponent.body; ((EntityState)this).PlayAnimation("Gesture, Override", "TargetHeal"); animator = ((EntityState)this).GetModelAnimator(); muzzle = ((Component)animator).GetComponent().FindChild("MuzzleEnergyBomb"); ((EntityState)this).PlayCrossfade("Gesture, Additive", "SpiritPunchFinisher", "FireGauntlet.playbackRate", startupDuration, 0.025f); ((EntityState)this).PlayCrossfade("Gesture, Override", "SpiritPunchFinisher", "FireGauntlet.playbackRate", startupDuration, 0.025f); AkSoundEngine.PostEvent(Sounds.Play_SeekerTweaks_Beam_Start, ((EntityState)this).gameObject); } private void InstantiateBeamEffect() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)beamEffect) && Object.op_Implicit((Object)(object)cachedBody) && Object.op_Implicit((Object)(object)((Component)((HuntressTracker)tracker).trackingTarget).transform)) { beamEffect = Object.Instantiate(Prefabs.beamEffect, muzzle.position + -((EntityState)this).characterDirection.forward * backPos + Vector3.down * downPos, Quaternion.identity, muzzle).GetComponent(); beamEffect.endTransform = ((Component)((HuntressTracker)tracker).trackingTarget).transform; if (!Object.op_Implicit((Object)(object)muzzleEffect)) { muzzleEffect = Object.Instantiate(Prefabs.muzzleEffect, muzzle.position + -((EntityState)this).characterDirection.forward * backPos + Vector3.down * downPos, Quaternion.identity, muzzle); } } } public override void Update() { ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)cachedBody)) { if (Object.op_Implicit((Object)(object)beamEffect) && Object.op_Implicit((Object)(object)beamEffect.endTransform) && Object.op_Implicit((Object)(object)((HuntressTracker)tracker).trackingTarget) && (Object)(object)beamEffect.endTransform != (Object)(object)((HuntressTracker)tracker).trackingTarget) { beamEffect.endTransform = ((Component)((HuntressTracker)tracker).trackingTarget).transform; cachedBody = ((HuntressTracker)tracker).trackingTarget.healthComponent.body; } if (!cachedBody.healthComponent.alive || !Object.op_Implicit((Object)(object)((HuntressTracker)tracker).trackingTarget)) { cachedBody = null; } if (!Object.op_Implicit((Object)(object)beamEffect)) { InstantiateBeamEffect(); } return; } if (soundLoop) { soundLoop = false; pLaYiTagAin = true; AkSoundEngine.StopPlayingID(ID); AkSoundEngine.PostEvent(Sounds.Play_SeekerTweaks_Beam_End, ((EntityState)this).gameObject); } if (Object.op_Implicit((Object)(object)beamEffect)) { EntityState.Destroy((Object)(object)((Component)beamEffect).gameObject); } if (Object.op_Implicit((Object)(object)((HuntressTracker)tracker).trackingTarget)) { cachedBody = ((HuntressTracker)tracker).trackingTarget.healthComponent.body; } } public override void FixedUpdate() { //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //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_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0310: 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_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Expected O, but got Unknown //IL_0340: 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_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Expected O, but got Unknown ((EntityState)this).FixedUpdate(); ((BaseState)this).StartAimMode(2f, false); fireRate = baseFireRate / ((BaseState)this).attackSpeedStat; if (((EntityState)this).fixedAge >= startupDuration * 0.9f) { animator.SetFloat("FireGauntlet.playbackRate", 0f); } if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority()) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (((EntityState)this).fixedAge >= startupDuration) { InstantiateBeamEffect(); if (!soundLoop && Object.op_Implicit((Object)(object)cachedBody)) { soundLoop = true; if (pLaYiTagAin) { pLaYiTagAin = false; AkSoundEngine.PostEvent(Sounds.Play_SeekerTweaks_Beam_Start, ((EntityState)this).gameObject); } ID = AkSoundEngine.PostEvent(Sounds.Play_SeekerTweaks_Beam_Loop, ((EntityState)this).gameObject); } stopwatch += Time.fixedDeltaTime; } if (!Object.op_Implicit((Object)(object)cachedBody) || !(stopwatch >= fireRate)) { return; } stopwatch = 0f; AkSoundEngine.PostEvent(Sounds.Play_SeekerTweaks_Beam_Impact, ((EntityState)this).gameObject); if (!NetworkServer.active) { return; } Vector3 corePosition = cachedBody.corePosition; DamageInfo val = new DamageInfo { position = corePosition, attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, crit = ((BaseState)this).RollCrit(), damage = ((BaseState)this).damageStat * (damageCoefficient * fireRate), procCoefficient = 0.65f }; cachedBody.healthComponent.TakeDamage(val); EffectManager.SimpleEffect(Prefabs.beamHitEffect, corePosition, Quaternion.identity, true); if (cachedBody.GetBuffCount(Prefabs.mantra) < 4) { cachedBody.AddTimedBuff(Prefabs.mantra, 10f); return; } MantraStacks mantraStacks = Array.Find(((Component)cachedBody).GetComponents(), (MantraStacks x) => (Object)(object)x != (Object)null && (Object)(object)x.ownerBody == (Object)(object)((EntityState)this).characterBody); if (!Object.op_Implicit((Object)(object)mantraStacks)) { mantraStacks = ((Component)cachedBody).gameObject.AddComponent(); mantraStacks.ownerBody = ((EntityState)this).characterBody; } mantraStacks.stacks++; cachedBody.ClearTimedBuffs(Prefabs.mantra); float num = 3.5f; BlastAttack val2 = new BlastAttack { position = corePosition, attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, crit = ((BaseState)this).RollCrit(), baseDamage = ((BaseState)this).damageStat * (explosionDamageCoefficient + Configs.rayExplosionBuffDamage.Value * (float)((EntityState)this).characterBody.GetBuffCount(Buffs.ChakraBuff)), procCoefficient = 0.35f, attackerFiltering = (AttackerFiltering)2, radius = num, teamIndex = ((EntityState)this).teamComponent.teamIndex, falloffModel = (FalloffModel)0, damageColorIndex = (DamageColorIndex)3 }; DamageAPI.AddModdedDamageType(val2, Prefabs.explosion); val2.Fire(); EffectManager.SpawnEffect(Prefabs.Load("RoR2/DLC2/Seeker/SoulSearchExplosionVFX.prefab"), new EffectData { origin = corePosition, scale = num }, true); } public override void OnExit() { AkSoundEngine.StopPlayingID(ID); AkSoundEngine.PostEvent(Sounds.Play_SeekerTweaks_Beam_End, ((EntityState)this).gameObject); animator.SetFloat("FireGauntlet.playbackRate", 1f); if (Object.op_Implicit((Object)(object)muzzleEffect)) { EntityState.Destroy((Object)(object)muzzleEffect); } if (Object.op_Implicit((Object)(object)beamEffect)) { EntityState.Destroy((Object)(object)((Component)beamEffect).gameObject); } animator.SetTrigger("trigger"); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class SpiritVeil : BaseSkillState { private Transform target; private CharacterBody targetBody; private Vector3 cachedPos; private float duration; private AllyTracker tracker; private ChildLocator lotusChildLocator; private GameObject lotus; private uint ID; private NetworkedBodyAttachment attachment; public override void OnEnter() { ((BaseState)this).OnEnter(); tracker = ((EntityState)this).GetComponent(); targetBody = tracker.target; target = targetBody.transform; duration = tracker.castDuration; ((EntityState)this).PlayAnimation("Body", "Idle"); ((EntityState)this).PlayAnimation("FullBody, Override", "MeditationStart", "Meditation.playbackRate", duration, 0f); lotusChildLocator = ((Component)((EntityState)this).GetModelTransform()).GetComponent(); lotus = Object.Instantiate(Prefabs.Load("RoR2/DLC2/Seeker/MeditateLotusVFX.prefab"), lotusChildLocator.FindChild("Lotus"), false); lotus.GetComponentInChildren().Play("MeditationSuccess"); ID = Util.PlaySound("Play_seeker_skill2_start", ((EntityState)this).gameObject); if (NetworkServer.active) { attachment = Object.Instantiate(Prefabs.shieldAttachment).GetComponent(); attachment.AttachToGameObjectAndSpawn(((Component)((EntityState)this).characterBody).gameObject, (string)null); } } public override void FixedUpdate() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)target)) { cachedPos = target.position; } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { TeleportHelper.TeleportBody(((EntityState)this).characterBody, Utils.FindNearestNodePosition(cachedPos, (GraphType)0)); ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown if (NetworkServer.active) { float num = ((EntityState)this).healthComponent.combinedHealth * Configs.veilBarrierAmount.Value + Configs.veilBuffBarrierAmount.Value * (float)((EntityState)this).characterBody.GetBuffCount(Buffs.ChakraBuff); ((EntityState)this).healthComponent.AddBarrier(num); if (Object.op_Implicit((Object)(object)targetBody)) { targetBody.healthComponent.AddBarrier(num); } } ((EntityState)this).PlayAnimation("FullBody, Override", "MeditationSuccess", "Meditation.playbackRate", duration, 0f); Util.PlaySound("Play_seeker_skill4_win", ((EntityState)this).gameObject); AkSoundEngine.StopPlayingID(ID); EffectManager.SpawnEffect(Prefabs.Load("RoR2/DLC2/Seeker/MeditateSuccessVFX.prefab"), new EffectData { origin = ((EntityState)this).characterBody.corePosition }, false); if (Object.op_Implicit((Object)(object)lotus)) { EntityState.Destroy((Object)(object)lotus); } if (Object.op_Implicit((Object)(object)attachment)) { EntityState.Destroy((Object)(object)((Component)attachment).gameObject); } ((EntityState)this).OnExit(); } } internal class Hook { internal static void Hooks() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown if (Configs.noMinigame.Value) { MeditationUI.OnEnter += new hook_OnEnter(MeditationUI_OnEnter); } if (Configs.spiralSpeedScaling.Value) { SoulSpiralOrbiter.UpdateCurrentSpeedAndDamage += new hook_UpdateCurrentSpeedAndDamage(SoulSpiralOrbiter_UpdateCurrentSpeedAndDamage); } if (Configs.targetedHand.Value) { UnseenHand.UpdateAreaIndicator += new hook_UpdateAreaIndicator(UnseenHand_UpdateAreaIndicator); } if (Configs.spiralSmallHop.Value) { GlobalEventManager.onClientDamageNotified += GlobalEventManager_onClientDamageNotified; } if (Configs.wasdMovement.Value) { SojournVehicle.FixedUpdateMovement += new hook_FixedUpdateMovement(SojournVehicle_FixedUpdateMovement); } if (Configs.addAlts.Value) { GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); } } private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.noHit)) { damageInfo.rejected = true; } orig.Invoke(self, damageInfo); } private static void GlobalEventManager_onServerDamageDealt(DamageReport damageReport) { //IL_0014: 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_0038: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)damageReport.attackerBody) && DamageAPI.HasModdedDamageType(damageReport.damageInfo, Prefabs.explosion)) { HealthComponent healthComponent = damageReport.attackerBody.healthComponent; HealOrb val = new HealOrb(); ((Orb)val).origin = damageReport.damageInfo.position; ((Orb)val).target = damageReport.attackerBody.mainHurtBox; val.healValue = healthComponent.fullCombinedHealth * Configs.rayHealAmount.Value; val.overrideDuration = 0.3f; OrbManager.instance.AddOrb((Orb)(object)val); } } private static void MeditationUI_OnEnter(orig_OnEnter orig, MeditationUI self) { orig.Invoke(self); bool value = Configs.minigameRevive.Value; if (!value || (value && !((EntityState)self).characterBody.HasBuff(Buffs.RevitalizeBuff))) { if (self.overlayController != null) { HudOverlayManager.RemoveOverlay(self.overlayController); self.overlayController = null; } self.meditationSuccess = true; self.meditationWrapUp = true; self.spawnedLotus = true; self.lotusChildLocator = ((Component)((EntityState)self).GetModelTransform()).GetComponent(); self.lotus = Object.Instantiate(self.lotusPrefab, self.lotusChildLocator.FindChild("Lotus"), false); } } private static void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)damageReport.victim) || !Object.op_Implicit((Object)(object)damageReport.victim.body)) { return; } MantraStacks[] components = ((Component)damageReport.victim).GetComponents(); MantraStacks[] array = components; foreach (MantraStacks mantraStacks in array) { if (!Object.op_Implicit((Object)(object)mantraStacks.ownerBody)) { continue; } foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { CharacterBody body = instance.body; if (Object.op_Implicit((Object)(object)body) && Vector3.Distance(((Component)damageReport.victim).transform.position, body.transform.position) <= 35f) { HealOrb val = new HealOrb(); ((Orb)val).origin = damageReport.victim.body.corePosition; ((Orb)val).target = damageReport.victim.body.mainHurtBox; val.healValue = mantraStacks.ownerBody.healthComponent.fullCombinedHealth * ((float)mantraStacks.stacks * 0.01f); val.overrideDuration = RoR2Application.rng.RangeFloat(0.3f, 0.75f); OrbManager.instance.AddOrb((Orb)(object)val); } } } } private static void SojournVehicle_FixedUpdateMovement(orig_FixedUpdateMovement orig, SojournVehicle self) { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self.vehicleSeat) && Object.op_Implicit((Object)(object)self.vehicleSeat.currentPassengerBody) && (Object)(object)self.vehicleSeat.currentPassengerInputBank != (Object)null) { CharacterBody currentPassengerBody = self.vehicleSeat.currentPassengerBody; CharacterMaster master = currentPassengerBody.master; if (Object.op_Implicit((Object)(object)master.playerCharacterMasterController) && Object.op_Implicit((Object)(object)master.playerCharacterMasterController.networkUser) && master.playerCharacterMasterController.networkUser.inputPlayer != null) { Player inputPlayer = master.playerCharacterMasterController.networkUser.inputPlayer; InputBankTest currentPassengerInputBank = self.vehicleSeat.currentPassengerInputBank; Vector3 aimDirection = currentPassengerInputBank.aimDirection; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(inputPlayer.GetAxis(0), 0f, inputPlayer.GetAxis(1)); Rigidbody vehicleRigidbody = self.vehicleRigidbody; Vector3 val2 = Util.QuaternionSafeLookRotation(aimDirection) * val; vehicleRigidbody.MoveRotation(Util.QuaternionSafeLookRotation(((Vector3)(ref val2)).normalized)); self.vehicleRigidbody.velocity = ((val == Vector3.zero) ? val : (((Component)self.vehicleRigidbody).transform.forward * self.currentSpeed)); } } } private static void GlobalEventManager_onClientDamageNotified(DamageDealtMessage damageMessage) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Invalid comparison between Unknown and I4 //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)damageMessage.attacker) && (int)DamageTypeCombo.op_Implicit(damageMessage.damageType) == 262144 && damageMessage.attacker.GetComponent().baseNameToken == "SEEKER_BODY_NAME") { CharacterMotor component = damageMessage.attacker.GetComponent(); if ((Object.op_Implicit((Object)(object)component) && !component.isGrounded) || Configs.spiralSmallHopWhileGrounded.Value) { ((BaseCharacterController)component).Motor.ForceUnground(0.1f); component.velocity = new Vector3(component.velocity.x, Mathf.Max(component.velocity.y, Configs.spiralSmallHopAmount.Value), component.velocity.z); } } } private static void UnseenHand_UpdateAreaIndicator(orig_UpdateAreaIndicator orig, UnseenHand self) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_0105: Unknown result type (might be due to invalid IL or missing references) self.goodPlacement = false; if (Object.op_Implicit((Object)(object)self.areaIndicatorInstance)) { float maxDistance = UnseenHand.maxDistance; float num = 0f; RaycastHit val = default(RaycastHit); if (Physics.Raycast(CameraRigController.ModifyAimRayIfApplicable(((BaseState)self).GetAimRay(), ((EntityState)self).gameObject, ref num), ref val, maxDistance + num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask))) { self.areaIndicatorInstance.transform.position = ((RaycastHit)(ref val)).point; self.goodPlacement = true; } HurtBox val2 = (Object.op_Implicit((Object)(object)((RaycastHit)(ref val)).collider) ? ((Component)((RaycastHit)(ref val)).collider).GetComponent() : null); if (Object.op_Implicit((Object)(object)val2) && Physics.Raycast(((Component)val2).transform.position, Vector3.down, ref val, 69f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask))) { self.areaIndicatorInstance.transform.position = ((RaycastHit)(ref val)).point; self.goodPlacement = true; } self.areaIndicatorInstance.SetActive(self.goodPlacement); } } private static void SoulSpiralOrbiter_UpdateCurrentSpeedAndDamage(orig_UpdateCurrentSpeedAndDamage orig, SoulSpiralOrbiter self, float _currentTime) { if (Object.op_Implicit((Object)(object)self.seekerController) && Object.op_Implicit((Object)(object)self.seekerController.characterBody)) { _currentTime *= self.seekerController.characterBody.attackSpeed; } orig.Invoke(self, _currentTime); } } [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.*/)] [BepInPlugin("com.Dragonyck.SeekerTweaks", "SeekerTweaks", "1.0.3")] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.SeekerTweaks"; public const string MODNAME = "SeekerTweaks"; public const string VERSION = "1.0.3"; public const string MODNAMEKEY = "SEEKERTWEAKS"; private void Awake() { Assets.PopulateAssets(); Configs.Init(); Prefabs.CreatePrefabs(); Hook.Hooks(); } } internal class Assets { public static AssetBundle MainAssetBundle; public static T Load(string name) where T : Object { return MainAssetBundle.LoadAsset(name); } public static void PopulateAssets() { Assembly executingAssembly = Assembly.GetExecutingAssembly(); if ((Object)(object)MainAssetBundle == (Object)null) { using Stream stream = executingAssembly.GetManifestResourceStream("SeekerTweaks.AssetBundle.seekertweaksassets"); MainAssetBundle = AssetBundle.LoadFromStream(stream); } using Stream stream2 = executingAssembly.GetManifestResourceStream("SeekerTweaks.SeekerTweaks.bnk"); byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } } internal class Prefabs { internal static GameObject seekerBodyPrefab; internal static GameObject vehiclePrefab; internal static GameObject sojournIndicator; internal static GameObject beamEffect; internal static GameObject muzzleEffect; internal static GameObject trackingIndicator; internal static GameObject beamHitEffect; internal static GameObject shieldAttachment; internal static GameObject allyIndicator; internal static GameObject areaIndicator; internal static GameObject skyBeamAreaIndicator; internal static GameObject skyBeamHealingAreaIndicator; internal static GameObject skyBeamBeam; internal static GameObject skyHealingBeamBeam; internal static Material tpTargetMat; internal static BuffDef mantra; internal static ModdedDamageType explosion; internal static ModdedDamageType noHit; internal static Dictionary bodyIcons = new Dictionary(); internal static T Load(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((object)path).WaitForCompletion(); } internal static GameObject Instantiate(string path, string name, bool registerNetwork = false) { return PrefabAPI.InstantiateClone(Load(path), name, registerNetwork); } internal static GameObject Instantiate(GameObject obj, string name, bool registerNetwork = false) { return PrefabAPI.InstantiateClone(obj, name, registerNetwork); } [SystemInitializer(new Type[] { typeof(BodyCatalog) })] internal static void SetBodyIcons() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown foreach (CharacterBody allBodyPrefabBodyBodyComponent in BodyCatalog.allBodyPrefabBodyBodyComponents) { string baseNameToken = allBodyPrefabBodyBodyComponent.baseNameToken; Sprite value = null; if (Object.op_Implicit((Object)(object)allBodyPrefabBodyBodyComponent.portraitIcon) && !bodyIcons.TryGetValue(baseNameToken, out value)) { bodyIcons.Add(baseNameToken, Utils.CreateSprite((Texture2D)allBodyPrefabBodyBodyComponent.portraitIcon)); } } } internal static void CreatePrefabs() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: 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) //IL_0246: Expected O, but got Unknown //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Expected O, but got Unknown //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_111f: Unknown result type (might be due to invalid IL or missing references) //IL_1124: Unknown result type (might be due to invalid IL or missing references) //IL_1133: Unknown result type (might be due to invalid IL or missing references) //IL_1138: Unknown result type (might be due to invalid IL or missing references) //IL_1165: Unknown result type (might be due to invalid IL or missing references) //IL_116a: Unknown result type (might be due to invalid IL or missing references) //IL_1179: Unknown result type (might be due to invalid IL or missing references) //IL_117e: Unknown result type (might be due to invalid IL or missing references) //IL_11ab: Unknown result type (might be due to invalid IL or missing references) //IL_11b0: Unknown result type (might be due to invalid IL or missing references) //IL_11bf: Unknown result type (might be due to invalid IL or missing references) //IL_11c4: Unknown result type (might be due to invalid IL or missing references) //IL_11f1: Unknown result type (might be due to invalid IL or missing references) //IL_11f6: Unknown result type (might be due to invalid IL or missing references) //IL_1205: Unknown result type (might be due to invalid IL or missing references) //IL_120a: Unknown result type (might be due to invalid IL or missing references) //IL_1237: Unknown result type (might be due to invalid IL or missing references) //IL_123c: Unknown result type (might be due to invalid IL or missing references) //IL_124b: Unknown result type (might be due to invalid IL or missing references) //IL_1250: Unknown result type (might be due to invalid IL or missing references) //IL_127d: Unknown result type (might be due to invalid IL or missing references) //IL_1282: Unknown result type (might be due to invalid IL or missing references) //IL_1291: Unknown result type (might be due to invalid IL or missing references) //IL_1296: Unknown result type (might be due to invalid IL or missing references) //IL_12c3: Unknown result type (might be due to invalid IL or missing references) //IL_12c8: Unknown result type (might be due to invalid IL or missing references) //IL_12d7: Unknown result type (might be due to invalid IL or missing references) //IL_12dc: Unknown result type (might be due to invalid IL or missing references) //IL_1303: Unknown result type (might be due to invalid IL or missing references) //IL_1312: Unknown result type (might be due to invalid IL or missing references) //IL_1317: Unknown result type (might be due to invalid IL or missing references) //IL_1332: Unknown result type (might be due to invalid IL or missing references) //IL_1341: Unknown result type (might be due to invalid IL or missing references) //IL_1346: Unknown result type (might be due to invalid IL or missing references) //IL_1361: Unknown result type (might be due to invalid IL or missing references) //IL_1370: Unknown result type (might be due to invalid IL or missing references) //IL_1375: Unknown result type (might be due to invalid IL or missing references) //IL_1390: Unknown result type (might be due to invalid IL or missing references) //IL_139f: Unknown result type (might be due to invalid IL or missing references) //IL_13a4: Unknown result type (might be due to invalid IL or missing references) //IL_13bf: Unknown result type (might be due to invalid IL or missing references) //IL_13ce: Unknown result type (might be due to invalid IL or missing references) //IL_13d3: Unknown result type (might be due to invalid IL or missing references) //IL_13ee: Unknown result type (might be due to invalid IL or missing references) //IL_13fd: Unknown result type (might be due to invalid IL or missing references) //IL_1402: Unknown result type (might be due to invalid IL or missing references) //IL_141d: Unknown result type (might be due to invalid IL or missing references) //IL_142c: Unknown result type (might be due to invalid IL or missing references) //IL_1431: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Expected O, but got Unknown //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Expected O, but got Unknown //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0565: Unknown result type (might be due to invalid IL or missing references) //IL_056a: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Unknown result type (might be due to invalid IL or missing references) //IL_062a: Unknown result type (might be due to invalid IL or missing references) //IL_062f: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_0659: Expected O, but got Unknown //IL_069f: Unknown result type (might be due to invalid IL or missing references) //IL_06a9: Expected O, but got Unknown //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06c6: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Expected O, but got Unknown //IL_0713: Unknown result type (might be due to invalid IL or missing references) //IL_071a: Expected O, but got Unknown //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_075d: Unknown result type (might be due to invalid IL or missing references) //IL_0772: Unknown result type (might be due to invalid IL or missing references) //IL_077c: Expected O, but got Unknown //IL_07e4: Unknown result type (might be due to invalid IL or missing references) //IL_07e9: Unknown result type (might be due to invalid IL or missing references) //IL_0840: Unknown result type (might be due to invalid IL or missing references) //IL_0845: Unknown result type (might be due to invalid IL or missing references) //IL_0854: Unknown result type (might be due to invalid IL or missing references) //IL_0859: Unknown result type (might be due to invalid IL or missing references) //IL_08b4: Unknown result type (might be due to invalid IL or missing references) //IL_08b9: 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_0928: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) //IL_0948: Expected O, but got Unknown //IL_0969: Unknown result type (might be due to invalid IL or missing references) //IL_0970: Expected O, but got Unknown //IL_0982: Unknown result type (might be due to invalid IL or missing references) //IL_0987: Unknown result type (might be due to invalid IL or missing references) //IL_09ab: Unknown result type (might be due to invalid IL or missing references) //IL_09b2: Expected O, but got Unknown //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Expected O, but got Unknown //IL_0acd: Unknown result type (might be due to invalid IL or missing references) //IL_0ad2: Unknown result type (might be due to invalid IL or missing references) //IL_0afe: Unknown result type (might be due to invalid IL or missing references) //IL_0b08: Unknown result type (might be due to invalid IL or missing references) //IL_0a8a: Unknown result type (might be due to invalid IL or missing references) //IL_0b84: Unknown result type (might be due to invalid IL or missing references) //IL_0b89: Unknown result type (might be due to invalid IL or missing references) //IL_0b96: Unknown result type (might be due to invalid IL or missing references) //IL_0b9b: Unknown result type (might be due to invalid IL or missing references) //IL_0ba4: Unknown result type (might be due to invalid IL or missing references) //IL_0c36: Unknown result type (might be due to invalid IL or missing references) //IL_0c43: Unknown result type (might be due to invalid IL or missing references) //IL_0c5a: Unknown result type (might be due to invalid IL or missing references) //IL_0c64: Expected O, but got Unknown //IL_0c85: Unknown result type (might be due to invalid IL or missing references) //IL_0c9a: Unknown result type (might be due to invalid IL or missing references) //IL_0ca1: Expected O, but got Unknown //IL_0ccf: Unknown result type (might be due to invalid IL or missing references) //IL_0db6: Unknown result type (might be due to invalid IL or missing references) //IL_0e3a: Unknown result type (might be due to invalid IL or missing references) //IL_0ed8: Unknown result type (might be due to invalid IL or missing references) //IL_0fa9: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("dontDestroyOnLoad"); Object.DontDestroyOnLoad((Object)(object)val); val.SetActive(false); GameObject val2 = Load("RoR2/DLC2/Seeker/SoulSpiralProjectile.prefab"); if (Configs.spiralSmallHop.Value) { val2.GetComponent().damageType = DamageTypeCombo.op_Implicit((DamageType)262144); } if (Configs.spiralLimit.Value != 6 || Configs.spiralRadius.Value != 4.75f) { val2.AddComponent(); } seekerBodyPrefab = Load("RoR2/DLC2/Seeker/SeekerBody.prefab"); Utils.NewStateMachine(seekerBodyPrefab, "Sojourn"); seekerBodyPrefab.GetComponent().stateMachines = seekerBodyPrefab.GetComponents(); bool flag = false; if (Configs.castSecondary.Value || Configs.castSpecial.Value || Configs.sojournTimer.Value) { ContentAddition.AddEntityState(ref flag); SkillDef val3 = Load("RoR2/DLC2/Seeker/SeekerBodySojourn.asset"); val3.activationState = new SerializableEntityStateType(typeof(BetterSojourn)); val3.activationStateMachineName = "Sojourn"; } if (Configs.canInterrupt.Value) { SkillDef val4 = Load("RoR2/DLC2/Seeker/SeekerBodyMeditate2.asset"); val4.interruptPriority = (InterruptPriority)1; } seekerBodyPrefab.AddComponent(); if (Configs.autoCastSpiral.Value) { seekerBodyPrefab.AddComponent(); } if (Configs.addAlts.Value) { noHit = DamageAPI.ReserveDamageType(); skyBeamBeam = Instantiate("RoR2/DLC1/VoidSurvivor/VoidSurvivorBeamCorrupt.prefab", "SkyBeamBeamBeam"); skyBeamBeam.transform.localRotation = Quaternion.Euler(-90f, 0f, 0f); skyBeamBeam.transform.localScale = new Vector3(4f, 4f, 1f); skyBeamBeam.GetComponentInChildren().color = Color.green; Object.Destroy((Object)(object)skyBeamBeam.GetComponent()); DestroyOnTimer component = skyBeamBeam.GetComponent(); ((Behaviour)component).enabled = true; component.duration = 2f; MeshRenderer componentInChildren = skyBeamBeam.GetComponentInChildren(); Material val5 = new Material(((Renderer)componentInChildren).material); val5.SetFloat("_DstBlend", 1f); val5.SetTexture("_RemapTex", (Texture)(object)Load("RoR2/Base/Common/ColorRamps/texRampEngiOffset.png")); Material val6 = new Material(Load("RoR2/DLC2/Seeker/matSpiritPunchSphereOpaque.mat")); val6.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)87, (byte)250, (byte)100, (byte)180))); val6.SetTextureScale("_Cloud1Tex", Vector2.one * 2f); val6.SetFloat("_AlphaBoost", 1f); val6.SetVector("_CutoffScroll", new Vector4(20f, -60f, 40f, -10f)); ((Renderer)componentInChildren).materials = (Material[])(object)new Material[2] { val5, val6 }; ParticleSystemRenderer[] componentsInChildren = skyBeamBeam.GetComponentsInChildren(); foreach (ParticleSystemRenderer val7 in componentsInChildren) { string name = ((Object)val7).name; if (name == "Particles") { ((Component)val7).transform.localScale = Vector3.one * 2f; ((Renderer)val7).material = Load("RoR2/DLC2/Seeker/matSpiritPunchSoftRay.mat"); } if (name == "Particles, Bright") { ((Renderer)val7).material = Load("RoR2/DLC2/Seeker/matSpiritPunchFistTendrilsOpaque.mat"); } if (name == "MuzzleRayParticles") { ((Component)val7).transform.localScale = Vector3.one; ((Renderer)val7).material = new Material(Load("RoR2/DLC1/Railgunner/matRailgunImpact.mat")); ((Renderer)val7).material.DisableKeyword("VERTEXCOLOR"); ((Renderer)val7).material.SetTexture("_RemapTex", (Texture)(object)Load("RoR2/Base/Common/ColorRamps/texRampBeetleQueen2.png")); ((Renderer)val7).material.SetFloat("_DstBlend", 1f); ((Renderer)val7).material.SetFloat("_Boost", 4f); } } skyHealingBeamBeam = Instantiate(skyBeamBeam, "SkyHealingBeamBeamBeam"); skyHealingBeamBeam.transform.localScale = new Vector3(1f, 1f, 0.15f); MeshRenderer componentInChildren2 = skyHealingBeamBeam.GetComponentInChildren(); Material val8 = new Material(val5); val8.SetTexture("_Cloud1Tex", (Texture)(object)Load("RoR2/DLC2/Child/texChildPrimaryStarCloud.png")); val8.SetTextureScale("_Cloud1Tex", Vector2.one); Material val9 = new Material(Load("RoR2/Base/Captain/matCaptainAirstrikeAltAreaIndicatorOuter.mat")); val9.SetTexture("_Cloud1Tex", (Texture)(object)Load("RoR2/Base/Common/texCloudBone1.png")); val8.SetTextureScale("_Cloud1Tex", Vector2.one * 0.6f); val9.SetTexture("_RemapTex", (Texture)(object)Load("RoR2/Base/Common/ColorRamps/texRampAntler.png")); val9.SetFloat("_DstBlendFloat", 1f); ((Renderer)componentInChildren2).materials = (Material[])(object)new Material[2] { val8, val8 }; Light componentInChildren3 = skyHealingBeamBeam.GetComponentInChildren(); componentInChildren3.color = Color32.op_Implicit(new Color32((byte)88, byte.MaxValue, (byte)107, byte.MaxValue)); componentInChildren3.intensity = 20f; componentInChildren3.range = 3f; Object.Destroy((Object)(object)((Component)componentInChildren3).GetComponent()); ParticleSystemRenderer[] componentsInChildren2 = skyHealingBeamBeam.GetComponentsInChildren(); foreach (ParticleSystemRenderer val10 in componentsInChildren2) { ((Component)val10).gameObject.SetActive(false); } skyBeamAreaIndicator = Instantiate("RoR2/DLC2/Seeker/UnseenHandAreaIndicator.prefab", "SkyBeamHealingAreaIndicator"); skyBeamHealingAreaIndicator = Instantiate(skyBeamAreaIndicator, "SkyBeamHealingAreaIndicator"); skyBeamHealingAreaIndicator.transform.localScale = Vector3.one; skyBeamHealingAreaIndicator.GetComponentInChildren().color = Color32.op_Implicit(new Color32((byte)88, byte.MaxValue, (byte)107, byte.MaxValue)); MeshRenderer componentInChildren4 = skyBeamHealingAreaIndicator.GetComponentInChildren(); ((Renderer)componentInChildren4).material = new Material(((Renderer)componentInChildren4).material); ((Renderer)componentInChildren4).material.SetFloat("_DstBlendFloat", 1f); ((Renderer)componentInChildren4).material.SetTexture("_RemapTex", (Texture)(object)Load("RoR2/Base/Common/ColorRamps/texRampAntler.png")); ParticleSystemRenderer componentInChildren5 = ((Component)componentInChildren4).GetComponentInChildren(); ((Renderer)componentInChildren5).material = new Material(((Renderer)componentInChildren5).material); ((Renderer)componentInChildren5).material.SetColor("_TintColor", Color.green); allyIndicator = new GameObject("Indicator"); allyIndicator.layer = LayerIndex.ui.intVal; allyIndicator.transform.parent = val.transform; GameObject val11 = new GameObject("IndicatorSprite", new Type[1] { typeof(SpriteRenderer) }); val11.layer = LayerIndex.ui.intVal; val11.transform.parent = allyIndicator.transform; SpriteRenderer component2 = val11.GetComponent(); ((Component)component2).transform.localScale = Vector3.one * 0.04f; tpTargetMat = new Material(Load("RoR2/InDev/matEcho.mat")); tpTargetMat.SetTexture("_RemapTex", (Texture)(object)Load("RoR2/Base/Common/ColorRamps/texRampCaptainBodyArmor.png")); tpTargetMat.SetTexture("_MainTex", (Texture)null); tpTargetMat.SetTexture("_Cloud1Tex", (Texture)null); tpTargetMat.SetTexture("_Cloud2Tex", (Texture)null); tpTargetMat.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)59, (byte)243, (byte)173, byte.MaxValue))); tpTargetMat.SetFloat("_FresnelPower", 2f); tpTargetMat.SetFloat("_ZTest", 8f); mantra = Utils.NewBuffDef("Mantra", stack: true, hidden: false, Assets.Load("buff"), Color32.op_Implicit(new Color32((byte)59, (byte)243, (byte)173, byte.MaxValue))); explosion = DamageAPI.ReserveDamageType(); vehiclePrefab = Instantiate("RoR2/DLC2/Seeker/SojournVehicle/SojournVehicle.prefab", "ChillVehicle", registerNetwork: true); SojournVehicle component3 = vehiclePrefab.GetComponent(); component3.initialFlightGracePeriod = 9999f; component3.overlapFirePeriod = 9999f; component3.blastRadiusIndicators = (GameObject[])(object)new GameObject[0]; component3.blastDamageCoefficient = 0f; component3.blastDamageType = DamageTypeCombo.op_Implicit((DamageType)32); component3.sojournOverlayPrefab = null; component3.detonateOnCollision = false; component3.startingSpeedBoost = Configs.spiritSojournBaseSpeed.Value; vehiclePrefab.AddComponent(); vehiclePrefab.GetComponent().radius = 1f; shieldAttachment = Instantiate("RoR2/DLC1/MajorAndMinorConstruct/MegaConstructBubbleShield.prefab", "ShieldAttachment", registerNetwork: true); shieldAttachment.transform.localScale = Vector3.one * 0.2f; Material val12 = Load("RoR2/DLC1/MajorAndMinorConstruct/matMajorConstructDefenseMatrixEdges.mat"); Material val13 = new Material(val12); val13.SetTexture("_Cloud1Tex", (Texture)(object)Load("RoR2/DLC2/Seeker/texSeekerLotusMask3.png")); Material val14 = new Material(Load("RoR2/DLC2/Seeker/matSpiritPunchSphereFresnel.mat")); val14.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)34, (byte)34, (byte)34, byte.MaxValue))); val14.SetTexture("_RemapTex", (Texture)(object)Load("RoR2/DLC1/Common/ColorRamps/texRampConstructLaserTypeB.png")); Material val15 = new Material(val12); val15.SetTexture("_Cloud1Tex", (Texture)(object)Load("RoR2/Base/Common/VFX/ParticleMasks/texAlphaGradient2Mask.png")); ((Renderer)shieldAttachment.GetComponentInChildren()).materials = (Material[])(object)new Material[3] { val13, val14, val15 }; seekerBodyPrefab.AddComponent(); beamHitEffect = Instantiate("RoR2/DLC2/Seeker/SpiritPunchOmniImpactVFX.prefab", "BeamHitEffect"); beamHitEffect.GetComponent().soundName = "Play_SeekerTweaks_Beam_Impact"; ContentAddition.AddEffect(beamHitEffect); trackingIndicator = Instantiate("RoR2/Base/Huntress/HuntressTrackingIndicator.prefab", "TrackingIndicator"); SpriteRenderer[] componentsInChildren3 = trackingIndicator.GetComponentsInChildren(true); for (int k = 0; k < componentsInChildren3.Length; k++) { if (k != 0) { ((Component)componentsInChildren3[k]).gameObject.SetActive(false); } else { componentsInChildren3[k].color = new Color(0.8549f, 0.698f, 0.3137f); } } Transform child = trackingIndicator.transform.GetChild(1); GameObject val16 = Object.Instantiate(((Component)componentsInChildren3[0]).gameObject, ((Component)child).transform.position, Quaternion.identity, child); val16.GetComponent().sprite = Load("RoR2/DLC2/Seeker/texMeditationInputCircle.png"); val16.transform.localScale = Vector3.one * 0.15f; muzzleEffect = Instantiate("RoR2/DLC2/Seeker/SpiritPunchMuzzleFlashVFX.prefab", "MuzzleEffect"); Object.Destroy((Object)(object)muzzleEffect.GetComponent()); Object.Destroy((Object)(object)muzzleEffect.GetComponent()); Object.Destroy((Object)(object)muzzleEffect.GetComponent()); Object.Destroy((Object)(object)muzzleEffect.GetComponent()); ParticleSystem[] componentsInChildren4 = muzzleEffect.GetComponentsInChildren(); foreach (ParticleSystem val17 in componentsInChildren4) { MainModule main = val17.main; ((MainModule)(ref main)).loop = true; EmissionModule emission = val17.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(5f); } beamEffect = PrefabAPI.InstantiateClone(((Component)Load("RoR2/Base/ChainLightning/ChainLightningOrbEffect.prefab").transform.GetChild(0)).gameObject, "BeamEffect", false); Object.Destroy((Object)(object)beamEffect.GetComponent()); LineRenderer component4 = beamEffect.GetComponent(); component4.widthMultiplier = 1f; component4.startWidth = 0.25f; component4.endWidth = 1f; component4.textureMode = (LineTextureMode)0; component4.startColor = Color.white; component4.endColor = Color.white; ((Renderer)component4).material = new Material(Load("RoR2/DLC2/Seeker/matSpiritPunchSoftRay.mat")); ((Renderer)component4).material.SetVector("_CutoffScroll", new Vector4(0f, -6f, 0f, -60f)); Material val18 = new Material(Load("RoR2/DLC2/Seeker/matSpiritPunchSphereOpaque.mat")); areaIndicator = Instantiate("RoR2/DLC2/Seeker/MeditateLotusVFX.prefab", "AreaIndicator"); areaIndicator.transform.localScale = new Vector3(1.5f, 2f, 1.5f); ((HuntressTracker)seekerBodyPrefab.AddComponent()).maxTrackingDistance = 25f; SkillLocator component5 = seekerBodyPrefab.GetComponent(); LanguageAPI.Add("SEEKERTWEAKS_PRIMARY_KEYWORD", "ResolveEvery 5th stack causes the target to detonate for " + Configs.rayExplosionDamage.Value * 100f + "% and heals for " + Configs.rayHealAmount.Value * 100f + "% max health."); LanguageAPI.Add("SEEKERTWEAKS_PRIMARY", "Mantra Ray"); LanguageAPI.Add("SEEKERTWEAKS_PRIMARY_DESCRIPTION", "Channel a beam to deal " + Configs.rayDamage.Value * 100f * (1f / Configs.rayFireRate.Value) + "% damage per second. Each hit applies Resolve"); ContentAddition.AddEntityState(ref flag); SkillDef skillDef = Utils.NewSkillDef(typeof(SpiritRay), "Weapon", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 0, 0, 0, Assets.Load("primary"), "SEEKERTWEAKS_PRIMARY_DESCRIPTION", "SEEKERTWEAKS_PRIMARY", new string[1] { "SEEKERTWEAKS_PRIMARY_KEYWORD" }); Utils.AddAlt(component5.primary._skillFamily, skillDef); LanguageAPI.Add("SEEKERTWEAKS_UTIL", "Sojourn Spirit"); LanguageAPI.Add("SEEKERTWEAKS_UTIL_DESCRIPTION", "Stunning. Transform and take flight as a volatile flame, becoming immune for the duration."); ContentAddition.AddEntityState(ref flag); skillDef = Utils.NewSkillDef(typeof(TravelSojourn), "Sojourn", 1, 6f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: false, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.Load("utility"), "SEEKERTWEAKS_UTIL_DESCRIPTION", "SEEKERTWEAKS_UTIL", Array.Empty()); Utils.AddAlt(component5.utility._skillFamily, skillDef); LanguageAPI.Add("SEEKERTWEAKS_UTIL2", "Spirit Veil"); LanguageAPI.Add("SEEKERTWEAKS_UTIL2_DESCRIPTION", "Teleport to an allys location and grant both of you " + Configs.veilBarrierAmount.Value * 100f + "% barrier based on your max health."); ContentAddition.AddEntityState(ref flag); skillDef = Utils.NewSkillDef(typeof(SpiritVeil), "Body", 1, 8f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: false, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.Load("utility2"), "SEEKERTWEAKS_UTIL2_DESCRIPTION", "SEEKERTWEAKS_UTIL2", Array.Empty()); Utils.AddAlt(component5.utility._skillFamily, skillDef); LanguageAPI.Add("SEEKERTWEAKS_SPEC", "Dhamma"); LanguageAPI.Add("SEEKERTWEAKS_SPEC_DESCRIPTION", "Create beams that hurt nearby enemies for " + Configs.skyBeamDamageCoefficient.Value * 100f + "% damage per second, and beams that heal nearby allies for " + Configs.skyBeamHealCoefficient.Value * 100f + "% max health per second. Grants Tranquility. The 7th Tranquility makes healing beams map wide, and consumes all Tranquility stacks."); ContentAddition.AddEntityState(ref flag); skillDef = Utils.NewSkillDef(typeof(SkyBeam), "Weapon", 1, 12f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.Load("special"), "SEEKERTWEAKS_SPEC_DESCRIPTION", "SEEKERTWEAKS_SPEC", Array.Empty()); Utils.AddAlt(component5.special._skillFamily, skillDef); } GameObject val19 = Load("RoR2/DLC2/Seeker/SeekerCrosshair.prefab"); if (Configs.sojournTimer.Value) { sojournIndicator = PrefabAPI.InstantiateClone(val19, "SojournIndicator", false); ((Behaviour)sojournIndicator.GetComponent()).enabled = false; CrosshairController component6 = sojournIndicator.GetComponent(); RectTransform target = component6.spriteSpreadPositions[0].target; GameObject gameObject = ((Component)component6.spriteSpreadPositions[1].target).gameObject; SojournIndicatorBehaviour sojournIndicatorBehaviour = sojournIndicator.AddComponent(); sojournIndicatorBehaviour.upper = NewSpriteImage(((Component)target).gameObject); Object.Destroy((Object)(object)gameObject); Object.Destroy((Object)(object)component6); } if (Configs.petalIndicatorReplacer.Value) { ((Component)Load("RoR2/DLC2/Seeker/SeekerLotusUI.prefab").transform.GetChild(0)).gameObject.SetActive(false); Image componentInChildren6 = val19.GetComponentInChildren(); Sprite sprite = Load("RoR2/Base/UI/texCrosshairDot.png"); Sprite sprite2 = Load("RoR2/Base/UI/texCrosshairDotCropped.png"); NewDotImage(((Component)componentInChildren6).transform, sprite, Color32.op_Implicit(new Color32((byte)134, (byte)134, (byte)134, byte.MaxValue)), Vector2.op_Implicit(new Vector2(-38f, 0f)), 100f); NewDotImage(((Component)componentInChildren6).transform, sprite, Color32.op_Implicit(new Color32((byte)134, (byte)134, (byte)134, byte.MaxValue)), Vector2.op_Implicit(new Vector2(-29f, 14f)), 100f); NewDotImage(((Component)componentInChildren6).transform, sprite, Color32.op_Implicit(new Color32((byte)134, (byte)134, (byte)134, byte.MaxValue)), Vector2.op_Implicit(new Vector2(-15f, 21f)), 100f); NewDotImage(((Component)componentInChildren6).transform, sprite, Color32.op_Implicit(new Color32((byte)134, (byte)134, (byte)134, byte.MaxValue)), Vector2.op_Implicit(new Vector2(0f, 23f)), 100f); NewDotImage(((Component)componentInChildren6).transform, sprite, Color32.op_Implicit(new Color32((byte)134, (byte)134, (byte)134, byte.MaxValue)), Vector2.op_Implicit(new Vector2(15f, 21f)), 100f); NewDotImage(((Component)componentInChildren6).transform, sprite, Color32.op_Implicit(new Color32((byte)134, (byte)134, (byte)134, byte.MaxValue)), Vector2.op_Implicit(new Vector2(29f, 14f)), 100f); NewDotImage(((Component)componentInChildren6).transform, sprite, Color32.op_Implicit(new Color32((byte)134, (byte)134, (byte)134, byte.MaxValue)), Vector2.op_Implicit(new Vector2(38f, 0f)), 100f); val19.AddComponent().dots = (Image[])(object)new Image[7] { NewDotImage(((Component)componentInChildren6).transform, sprite2, Color.white, Vector2.op_Implicit(new Vector2(-38f, 0f)), 12f), NewDotImage(((Component)componentInChildren6).transform, sprite2, Color.white, Vector2.op_Implicit(new Vector2(38f, 0f)), 12f), NewDotImage(((Component)componentInChildren6).transform, sprite2, Color.white, Vector2.op_Implicit(new Vector2(-29f, 14f)), 12f), NewDotImage(((Component)componentInChildren6).transform, sprite2, Color.white, Vector2.op_Implicit(new Vector2(29f, 14f)), 12f), NewDotImage(((Component)componentInChildren6).transform, sprite2, Color.white, Vector2.op_Implicit(new Vector2(-15f, 21f)), 12f), NewDotImage(((Component)componentInChildren6).transform, sprite2, Color.white, Vector2.op_Implicit(new Vector2(15f, 21f)), 12f), NewDotImage(((Component)componentInChildren6).transform, sprite2, Color.white, Vector2.op_Implicit(new Vector2(0f, 24f)), 12f) }; } } internal static Image NewDotImage(Transform parent, Sprite sprite, Color color, Vector3 localPosition, float sizeDelta) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("dot", new Type[2] { typeof(RectTransform), typeof(Image) }); val.layer = LayerIndex.ui.intVal; RectTransform val2 = (RectTransform)val.transform; ((Transform)val2).SetParent(parent); ((Component)val2).transform.localPosition = localPosition; ((Transform)val2).localRotation = Quaternion.identity; ((Transform)val2).localScale = Vector3.one; val2.sizeDelta = Vector2.one * sizeDelta; Image component = ((Component)val2).GetComponent(); ((Graphic)component).color = color; component.sprite = sprite; if (sizeDelta == 12f) { val.SetActive(false); } return component; } internal static Image NewSpriteImage(GameObject source) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_0027: 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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(source); RectTransform val2 = (RectTransform)val.transform; ((Transform)val2).SetParent(source.transform); ((Component)val2).transform.localPosition = Vector3.zero; ((Transform)val2).localRotation = Quaternion.identity; ((Transform)val2).localScale = Vector3.one; Image component = ((Component)val2).GetComponent(); ((Graphic)component).color = new Color(0.8549f, 0.698f, 0.3137f); component.fillAmount = 0f; component.fillMethod = (FillMethod)1; component.fillOrigin = 1; return component; } } internal class Sounds { internal static uint Play_SeekerTweaks_Beam_Start = 2596495775u; internal static uint Play_SeekerTweaks_Beam_Loop = 391561119u; internal static uint Play_SeekerTweaks_Beam_End = 2081301756u; internal static uint Play_SeekerTweaks_Beam_Impact = 1210612895u; } internal static class Extensions { public static GameObject NewSyringe(this GameObject g, params Material[] m) { ((Renderer)g.GetComponentsInChildren(false)[0]).material = m[0]; ((Renderer)g.GetComponent()).material = m[1]; ((Renderer)g.GetComponent()).material = m[2]; return g; } public static Material SwapTexture(this Material m, Texture2D t) { m.mainTexture = (Texture)(object)t; return m; } public static GameObject SwapMaterials(this GameObject g, Material[] m) { Renderer[] componentsInChildren = g.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if (Object.op_Implicit((Object)(object)m[i])) { componentsInChildren[i].material = m[i]; } } return g; } public static float Mult(this float f, float mult = 100f) { return f * mult; } public static Color ToRGB255(this Color c, string title, string body) { //IL_0001: 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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) return new Color(c.r / 255f, c.g / 255f, c.b / 255f); } public static void SetStrings(this TooltipProvider t, string title, string body) { t.overrideTitleText = title; t.overrideBodyText = body; } } internal class Utils { public static SkillDef NewSkillDef(Type activationState, string activationStateMachineName, int baseMaxStock, float baseRechargeInterval, bool beginSkillCooldownOnSkillEnd, bool canceledFromSprinting, bool fullRestockOnAssign, InterruptPriority interruptPriority, bool isCombatSkill, bool mustKeyPress, bool cancelSprintingOnActivation, int rechargeStock, int requiredStock, int stockToConsume, Sprite icon, string skillDescriptionToken, string skillName, params string[] keywordTokens) where T : SkillDef { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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) T val = ScriptableObject.CreateInstance(); ((SkillDef)val).activationState = new SerializableEntityStateType(activationState); ((SkillDef)val).activationStateMachineName = activationStateMachineName; ((SkillDef)val).baseMaxStock = baseMaxStock; ((SkillDef)val).baseRechargeInterval = baseRechargeInterval; ((SkillDef)val).beginSkillCooldownOnSkillEnd = beginSkillCooldownOnSkillEnd; ((SkillDef)val).canceledFromSprinting = canceledFromSprinting; ((SkillDef)val).fullRestockOnAssign = fullRestockOnAssign; ((SkillDef)val).interruptPriority = interruptPriority; ((SkillDef)val).isCombatSkill = isCombatSkill; ((SkillDef)val).mustKeyPress = mustKeyPress; ((SkillDef)val).cancelSprintingOnActivation = cancelSprintingOnActivation; ((SkillDef)val).rechargeStock = rechargeStock; ((SkillDef)val).requiredStock = requiredStock; ((SkillDef)val).stockToConsume = stockToConsume; ((SkillDef)val).icon = icon; ((SkillDef)val).skillDescriptionToken = skillDescriptionToken; ((SkillDef)val).skillName = skillName; ((SkillDef)val).skillNameToken = ((SkillDef)val).skillName; ((SkillDef)val).keywordTokens = keywordTokens; ContentAddition.AddSkillDef((SkillDef)(object)val); return (SkillDef)(object)val; } public static Color HexTo10(string hexColor) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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_0039: Unknown result type (might be due to invalid IL or missing references) char[] array = hexColor.ToCharArray(); return new Color((float)(array[0] + array[1]), (float)(array[2] + array[3]), (float)(array[4] + array[5]), 255f) / 255f; } public static EntityStateMachine NewStateMachine(GameObject obj, string customName) where T : EntityState { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) SerializableEntityStateType val = default(SerializableEntityStateType); ((SerializableEntityStateType)(ref val))..ctor(typeof(T)); EntityStateMachine val2 = obj.AddComponent(); val2.customName = customName; val2.initialStateType = val; val2.mainStateType = val; return val2; } public static GenericSkill NewGenericSkill(GameObject obj, SkillDef skill) { //IL_0031: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) GenericSkill val = obj.AddComponent(); SkillFamily val2 = ScriptableObject.CreateInstance(); val2.variants = (Variant[])(object)new Variant[1]; val._skillFamily = val2; SkillFamily skillFamily = val.skillFamily; Variant[] variants = skillFamily.variants; Variant val3 = new Variant { skillDef = skill }; ((Variant)(ref val3)).viewableNode = new Node(skill.skillNameToken, false, (Node)null); variants[0] = val3; ContentAddition.AddSkillFamily(skillFamily); return val; } public static void AddAlt(SkillFamily skillFamily, SkillDef SkillDef) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1); Variant[] variants = skillFamily.variants; int num = skillFamily.variants.Length - 1; Variant val = new Variant { skillDef = SkillDef }; ((Variant)(ref val)).viewableNode = new Node(SkillDef.skillNameToken, false, (Node)null); variants[num] = val; } public static BuffDef NewBuffDef(string name, bool stack, bool hidden, Sprite sprite, Color color) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); ((Object)val).name = name; val.canStack = stack; val.isHidden = hidden; val.iconSprite = sprite; val.buffColor = color; ContentAddition.AddBuffDef(val); return val; } public static ObjectScaleCurve AddScaleComponent(GameObject target, float timeMax) { ObjectScaleCurve val = target.AddComponent(); val.useOverallCurveOnly = true; val.timeMax = timeMax; val.overallCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); return val; } public static RotateAroundAxis AddRotationComponent(GameObject target, float speed, RotationAxis axis) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) RotateAroundAxis val = target.AddComponent(); val.speed = (Speed)2; val.fastRotationSpeed = speed; val.rotateAroundAxis = axis; return val; } public static AnimateShaderAlpha AddShaderAlphaComponent(GameObject target, float timeMax, AnimationCurve curve, bool destroyOnEnd = true, bool disableOnEnd = false) { AnimateShaderAlpha val = target.AddComponent(); val.timeMax = timeMax; val.alphaCurve = curve; val.destroyOnEnd = destroyOnEnd; val.disableOnEnd = disableOnEnd; return val; } internal static Sprite CreateSprite(Texture2D tex) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) return Sprite.Create(tex, new Rect(0f, 0f, (float)((Texture)tex).width, (float)((Texture)tex).height), new Vector2(0.5f, 0.5f), 128f); } internal static T CopyComponent(T original, GameObject destination) where T : Component { Type type = ((object)original).GetType(); Component val = destination.AddComponent(type); FieldInfo[] fields = type.GetFields(); FieldInfo[] array = fields; foreach (FieldInfo fieldInfo in array) { fieldInfo.SetValue(val, fieldInfo.GetValue(original)); } return (T)(object)((val is T) ? val : null); } public static Sprite CreateSpriteFromTexture(Texture2D texture) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)texture)) { return Sprite.Create(texture, new Rect(0f, 0f, (float)((Texture)texture).width, (float)((Texture)texture).height), new Vector2(0.5f, 0.5f)); } return null; } public static GameObject FindInActiveObjectByName(string name) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 Transform[] array = Resources.FindObjectsOfTypeAll(); for (int i = 0; i < array.Length; i++) { if ((int)((Object)array[i]).hideFlags == 0 && ((Object)array[i]).name == name) { return ((Component)array[i]).gameObject; } } return null; } public static Vector3 FindNearestNodePosition(Vector3 targetPosition, GraphType nodeGraphType) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_0089: Unknown result type (might be due to invalid IL or missing references) SpawnCard val = ScriptableObject.CreateInstance(); val.hullSize = (HullClassification)1; val.nodeGraphType = nodeGraphType; val.prefab = Prefabs.Load("RoR2/Base/Common/DirectorSpawnProbeHelperPrefab.prefab"); Vector3 result = targetPosition; GameObject val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, new DirectorPlacementRule { placementMode = (PlacementMode)3, position = targetPosition }, RoR2Application.rng)); if (Object.op_Implicit((Object)(object)val2)) { result = val2.transform.position; } if (Object.op_Implicit((Object)(object)val2)) { Object.Destroy((Object)(object)val2); } Object.Destroy((Object)(object)val); return result; } public static void CreateHitboxes(string name, Transform parent, Vector3[] sizes, Vector3[] positions) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_004f: 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_0073: Unknown result type (might be due to invalid IL or missing references) HitBoxGroup val = ((Component)parent).gameObject.AddComponent(); val.groupName = name; List list = new List(); for (int i = 0; i < sizes.Length; i++) { GameObject val2 = new GameObject(name + (i + 1)); val2.transform.SetParent(parent); val2.transform.localPosition = positions[i]; val2.transform.localRotation = Quaternion.identity; val2.transform.localScale = sizes[i]; HitBox item = val2.AddComponent(); val2.layer = LayerIndex.projectile.intVal; list.Add(item); } val.hitBoxes = list.ToArray(); } public static GameObject CreateHitbox(string name, Transform parent, Vector3 scale, Vector3 localPosition) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.transform.SetParent(parent); val.transform.localPosition = localPosition; val.transform.localRotation = Quaternion.identity; val.transform.localScale = scale; HitBoxGroup val2 = ((Component)parent).gameObject.AddComponent(); HitBox val3 = val.AddComponent(); val.layer = LayerIndex.projectile.intVal; val2.hitBoxes = (HitBox[])(object)new HitBox[1] { val3 }; val2.groupName = name; return val; } internal static EffectComponent RegisterEffect(GameObject effect, float duration, string soundName = "", bool applyScale = false, bool parentToReferencedTransform = true, bool positionAtReferencedTransform = true) { //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) EffectComponent val = effect.GetComponent(); if (!Object.op_Implicit((Object)(object)val)) { val = effect.AddComponent(); } if (duration != -1f) { DestroyOnTimer component = effect.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { effect.AddComponent().duration = duration; } else { component.duration = duration; } } if (!Object.op_Implicit((Object)(object)effect.GetComponent())) { effect.AddComponent(); } if (!Object.op_Implicit((Object)(object)effect.GetComponent())) { effect.AddComponent().vfxPriority = (VFXPriority)2; } val.applyScale = applyScale; val.effectIndex = (EffectIndex)(-1); val.parentToReferencedTransform = parentToReferencedTransform; val.positionAtReferencedTransform = positionAtReferencedTransform; val.soundName = soundName; ContentAddition.AddEffect(effect); return val; } public static Material InstantiateMaterial(Texture tex) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) Material val = Object.Instantiate(Prefabs.Load("RoR2/Base/Commando/matCommandoDualies.mat")); if (Object.op_Implicit((Object)(object)val)) { val.SetColor("_Color", Color.white); val.SetTexture("_MainTex", tex); val.SetColor("_EmColor", Color.black); val.SetFloat("_EmPower", 0f); val.SetTexture("_EmTex", (Texture)null); val.SetFloat("_NormalStrength", 1f); val.SetTexture("_NormalTex", (Texture)null); return val; } return val; } public static Material InstantiateMaterial(Color color, Texture tex, Color emColor, float emPower, Texture emTex, float normStr, Texture normTex) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) Material val = Object.Instantiate(LegacyResourcesAPI.Load("Prefabs/CharacterBodies/CommandoBody").GetComponentInChildren().baseRendererInfos[0].defaultMaterial); if (Object.op_Implicit((Object)(object)val)) { val.SetColor("_Color", color); val.SetTexture("_MainTex", tex); val.SetColor("_EmColor", emColor); val.SetFloat("_EmPower", emPower); val.SetTexture("_EmTex", emTex); val.SetFloat("_NormalStrength", 1f); val.SetTexture("_NormalTex", normTex); return val; } return val; } public static Material FindMaterial(string name) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 Material[] array = Resources.FindObjectsOfTypeAll(); for (int i = 0; i < array.Length; i++) { if ((int)((Object)array[i]).hideFlags == 0 && ((Object)array[i]).name == name) { return array[i]; } } return null; } } internal class VeilSkillDef : SkillDef { private class InstanceData : BaseSkillInstanceData { public AllyTracker behaviour; } public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new InstanceData { behaviour = ((Component)skillSlot).GetComponent() }; } internal static bool IsExecutable([NotNull] GenericSkill skillSlot) { InstanceData instanceData = (InstanceData)(object)skillSlot.skillInstanceData; AllyTracker behaviour = instanceData.behaviour; return Object.op_Implicit((Object)(object)behaviour.target); } 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); } }