Decompiled source of SeekerTweaks v1.0.0

SeekerTweaks.dll

Decompiled 4 hours ago
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<CharacterBody>();
		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<SpriteRenderer>();
			}
			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<CharacterModel>();
				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<SkillLocator>();
		controller = ((Component)this).GetComponent<SeekerController>();
	}

	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<GameObject>("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<HudElement>();
	}

	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<SeekerController>();
		}
		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<SeekerController>();
	}

	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<SoulSpiralProjectile>();
		controller = ((Component)this).GetComponent<ProjectileController>();
	}

	private void OnEnable()
	{
		InstanceTracker.Add<SoulSpiralTracker>(this);
	}

	private void Start()
	{
		owner = controller.owner;
		ownerBody = (Object.op_Implicit((Object)(object)owner) ? owner.GetComponent<CharacterBody>() : 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<SoulSpiralTracker> instancesList = InstanceTracker.GetInstancesList<SoulSpiralTracker>();
		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<SoulSpiralTracker>(this);
		UpdateProjectile(owner);
	}
}
internal class VehicleTimer : MonoBehaviour
{
	public float duration = 4f;

	private VehicleSeat vehicle;

	private float stopwatch;

	private void Awake()
	{
		vehicle = ((Component)this).GetComponent<VehicleSeat>();
	}

	private void FixedUpdate()
	{
		stopwatch += Time.fixedDeltaTime;
		if (stopwatch >= duration && NetworkServer.active)
		{
			vehicle.EjectPassenger();
		}
	}
}
internal class Configs
{
	internal static ConfigFile config;

	internal static ConfigEntry<bool> addAlts;

	internal static ConfigEntry<bool> canInterrupt;

	internal static ConfigEntry<bool> petalIndicatorReplacer;

	internal static ConfigEntry<bool> targetedHand;

	internal static ConfigEntry<int> spiralLimit;

	internal static ConfigEntry<bool> autoCastSpiral;

	internal static ConfigEntry<bool> spiralSpeedScaling;

	internal static ConfigEntry<float> spiralRadius;

	internal static ConfigEntry<bool> spiralSmallHop;

	internal static ConfigEntry<float> spiralSmallHopAmount;

	internal static ConfigEntry<bool> spiralSmallHopWhileGrounded;

	internal static ConfigEntry<bool> sojournTimer;

	internal static ConfigEntry<bool> castSecondary;

	internal static ConfigEntry<bool> castSpecial;

	internal static ConfigEntry<bool> wasdMovement;

	internal static ConfigEntry<bool> noMinigame;

	internal static ConfigEntry<bool> minigameRevive;

	internal static ConfigEntry<float> spiritSojournDuration;

	internal static ConfigEntry<float> spiritSojournBuffDuration;

	internal static ConfigEntry<float> spiritSojournBaseSpeed;

	internal static ConfigEntry<float> spiritSojournBuffBaseSpeed;

	internal static ConfigEntry<float> rayDamage;

	internal static ConfigEntry<float> rayExplosionDamage;

	internal static ConfigEntry<float> rayExplosionBuffDamage;

	internal static ConfigEntry<float> rayFireRate;

	internal static ConfigEntry<float> rayHealAmount;

	internal static ConfigEntry<float> veilBarrierAmount;

	internal static ConfigEntry<float> veilBuffBarrierAmount;

	internal static ConfigEntry<float> veilBaseMaxDistance;

	internal static ConfigEntry<float> veilBuffBaseMaxDistance;

	internal static ConfigEntry<float> skyBeamDamageCoefficient;

	internal static ConfigEntry<float> skyBeamBuffDamageCoefficient;

	internal static ConfigEntry<float> skyBeamHealCoefficient;

	internal static ConfigEntry<float> skyBeamBuffHealCoefficient;

	internal static ConfigEntry<float> 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<bool>(text, "Add Alt Skills", true, (ConfigDescription)null);
		canInterrupt = config.Bind<bool>(text, "Spirit Punch Is Interruptable", true, "Enables all skills to be activatable during Spirit Punch.");
		petalIndicatorReplacer = config.Bind<bool>(text, "HG Style Petal Counter", true, (ConfigDescription)null);
		string text2 = "02 - Unseen Hand";
		targetedHand = config.Bind<bool>(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<int>(text3, "Soul Spiral Limit", 999, "Default is 6");
		autoCastSpiral = config.Bind<bool>(text3, "Auto Cast Soul Spiral", true, (ConfigDescription)null);
		spiralSpeedScaling = config.Bind<bool>(text3, "Soul Spiral Orbiting Speed Scale w/ Attack Speed", true, (ConfigDescription)null);
		spiralRadius = config.Bind<float>(text3, "Soul Spiral Orbiting Radius", 6f, "Default is 4.75");
		spiralSmallHop = config.Bind<bool>(text3, "Soul Spiral Hop On Hit", true, (ConfigDescription)null);
		spiralSmallHopAmount = config.Bind<float>(text3, "Soul Spiral Hop Amount", 4f, (ConfigDescription)null);
		spiralSmallHopWhileGrounded = config.Bind<bool>(text3, "Soul Spiral Hop While Grounded", false, "Needs Soul Spiral Hop On Hit to be enabled.");
		string text4 = "04 - Sojourn";
		sojournTimer = config.Bind<bool>(text4, "Sojourn Timer On Crosshair", true, (ConfigDescription)null);
		castSecondary = config.Bind<bool>(text4, "Cast Secondary While In Sojourn", true, (ConfigDescription)null);
		castSpecial = config.Bind<bool>(text4, "Cast Special While In Sojourn", true, (ConfigDescription)null);
		wasdMovement = config.Bind<bool>(text4, "Directional Input Movement Sojourn", true, "Aim up/down, directional input for movement.");
		string text5 = "05 - Meditate";
		noMinigame = config.Bind<bool>(text5, "No Meditate QTE", true, "Functions like usual, but lets you move and removes the minigame.");
		minigameRevive = config.Bind<bool>(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<float>(text6, "Sojourn Spirit Duration", 3.5f, (ConfigDescription)null);
		spiritSojournBuffDuration = config.Bind<float>(text6, "Sojourn Spirit Additional Duration Per Tranquility", 0.5f, (ConfigDescription)null);
		spiritSojournBaseSpeed = config.Bind<float>(text6, "Sojourn Spirit Base Speed", 15f, (ConfigDescription)null);
		spiritSojournBuffBaseSpeed = config.Bind<float>(text6, "Sojourn Spirit Additional Base Speed Per Tranquility", 2.5f, (ConfigDescription)null);
		string text7 = "07 - Mantra Ray";
		rayDamage = config.Bind<float>(text7, "Mantra Ray Damage Coefficient", 0.9f, (ConfigDescription)null);
		rayExplosionDamage = config.Bind<float>(text7, "Mantra Ray Explosion Damage Coefficient", 2f, (ConfigDescription)null);
		rayExplosionBuffDamage = config.Bind<float>(text7, "Mantra Ray Additional Explosion Damage Coefficient Per Tranquility", 0.2f, (ConfigDescription)null);
		rayFireRate = config.Bind<float>(text7, "Mantra Ray Fire Interval", 0.25f, (ConfigDescription)null);
		rayHealAmount = config.Bind<float>(text7, "Mantra Ray Explosion Heal Coefficient", 0.02f, (ConfigDescription)null);
		string text8 = "08 - SpiritVeil";
		veilBarrierAmount = config.Bind<float>(text8, "Spirit Veil Barrier Coefficient", 0.2f, (ConfigDescription)null);
		veilBuffBarrierAmount = config.Bind<float>(text8, "Spirit Veil Additional Barrier Coefficient Per Tranquility", 0.05f, (ConfigDescription)null);
		veilBaseMaxDistance = config.Bind<float>(text8, "Spirit Veil Base Max Distance", 70f, (ConfigDescription)null);
		veilBuffBaseMaxDistance = config.Bind<float>(text8, "Spirit Veil Additional Base Max Distance Per Tranquility", 15f, (ConfigDescription)null);
		string text9 = "09 - Dhamma";
		skyBeamDamageCoefficient = config.Bind<float>(text9, "Dhamma Damage Coefficient", 4f, "Damage Per Second");
		skyBeamBuffDamageCoefficient = config.Bind<float>(text9, "Dhamma Additional Damage Coefficient Per Tranquility", 0.35f, "Additional Damage Per Second");
		skyBeamHealCoefficient = config.Bind<float>(text9, "Dhamma Heal Coefficient", 0.05f, "Total Heal Max HP Per Second");
		skyBeamBuffHealCoefficient = config.Bind<float>(text9, "Dhamma Additional Heal Coefficient Per Tranquility", 0.025f, "Additional Total Heal Max HP Per Second");
		skyBeamRadius = config.Bind<float>(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<GameObject>(Prefabs.sojournIndicator, (Transform)(object)val.container);
				indicator.transform.localPosition = Vector3.zero;
				indicator.GetComponent<SojournIndicatorBehaviour>().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<SojournVehicle>();
		}
		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<GameObject>("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<GameObject>(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<CharacterBody, GameObject> enemyIndicators = new Dictionary<CharacterBody, GameObject>();

	private Dictionary<CharacterBody, GameObject> allyIndicators = new Dictionary<CharacterBody, GameObject>();

	private AimRequest request;

	public override void OnEnter()
	{
		((BaseState)this).OnEnter();
		controller = ((EntityState)this).GetComponent<SeekerController>();
		((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<GameObject>(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<GameObject>(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<CharacterBody, GameObject> enemyIndicator in enemyIndicators)
		{
			CharacterBody key = enemyIndicator.Key;
			GameObject value = enemyIndicator.Value;
			if (Object.op_Implicit((Object)(object)value))
			{
				GameObject val = Object.Instantiate<GameObject>(Prefabs.skyBeamBeam, key.footPosition, Quaternion.Euler(Vector3.right * -90f), key.transform);
				if (NetworkServer.active)
				{
					DamagingBeamBehaviour damagingBeamBehaviour = val.AddComponent<DamagingBeamBehaviour>();
					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<CharacterBody, GameObject> allyIndicator in allyIndicators)
		{
			CharacterBody key2 = allyIndicator.Key;
			GameObject value2 = allyIndicator.Value;
			if (Object.op_Implicit((Object)(object)value2))
			{
				GameObject val2 = Object.Instantiate<GameObject>(Prefabs.skyHealingBeamBeam, key2.footPosition, Quaternion.Euler(Vector3.right * -90f), key2.transform);
				if (NetworkServer.active)
				{
					HealingBeamBehaviour healingBeamBehaviour = val2.AddComponent<HealingBeamBehaviour>();
					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 = 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<SeekerTracker>();
		fireRate /= ((BaseState)this).attackSpeedStat;
		startupDuration /= ((BaseState)this).attackSpeedStat;
		cachedBody = ((HuntressTracker)tracker).trackingTarget.healthComponent.body;
		((EntityState)this).PlayAnimation("Gesture, Override", "TargetHeal");
		animator = ((EntityState)this).GetModelAnimator();
		muzzle = ((Component)animator).GetComponent<ChildLocator>().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<GameObject>(Prefabs.beamEffect, muzzle.position + -((EntityState)this).characterDirection.forward * backPos + Vector3.down * downPos, Quaternion.identity, muzzle).GetComponent<BezierCurveLine>();
			beamEffect.endTransform = ((Component)((HuntressTracker)tracker).trackingTarget).transform;
			if (!Object.op_Implicit((Object)(object)muzzleEffect))
			{
				muzzleEffect = Object.Instantiate<GameObject>(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_015d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0162: Unknown result type (might be due to invalid IL or missing references)
		//IL_0164: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Unknown result type (might be due to invalid IL or missing references)
		//IL_016a: Unknown result type (might be due to invalid IL or missing references)
		//IL_016c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0171: 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_0189: Unknown result type (might be due to invalid IL or missing references)
		//IL_0195: Unknown result type (might be due to invalid IL or missing references)
		//IL_01af: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bc: Expected O, but got Unknown
		//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_028f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0294: Unknown result type (might be due to invalid IL or missing references)
		//IL_0295: Unknown result type (might be due to invalid IL or missing references)
		//IL_0297: Unknown result type (might be due to invalid IL or missing references)
		//IL_029c: 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_02b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0302: Unknown result type (might be due to invalid IL or missing references)
		//IL_030a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0311: Unknown result type (might be due to invalid IL or missing references)
		//IL_0316: Unknown result type (might be due to invalid IL or missing references)
		//IL_031b: Unknown result type (might be due to invalid IL or missing references)
		//IL_031d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0322: Unknown result type (might be due to invalid IL or missing references)
		//IL_0324: Unknown result type (might be due to invalid IL or missing references)
		//IL_032b: Expected O, but got Unknown
		//IL_032d: Unknown result type (might be due to invalid IL or missing references)
		//IL_033a: Unknown result type (might be due to invalid IL or missing references)
		//IL_034a: Unknown result type (might be due to invalid IL or missing references)
		//IL_034f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0350: Unknown result type (might be due to invalid IL or missing references)
		//IL_0358: Unknown result type (might be due to invalid IL or missing references)
		//IL_0366: Expected O, but got Unknown
		((EntityState)this).FixedUpdate();
		((BaseState)this).StartAimMode(2f, false);
		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>(), (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>();
			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<GameObject>("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<AllyTracker>();
		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<ChildLocator>();
		lotus = Object.Instantiate<GameObject>(Prefabs.Load<GameObject>("RoR2/DLC2/Seeker/MeditateLotusVFX.prefab"), lotusChildLocator.FindChild("Lotus"), false);
		lotus.GetComponentInChildren<Animator>().Play("MeditationSuccess");
		ID = Util.PlaySound("Play_seeker_skill2_start", ((EntityState)this).gameObject);
		if (NetworkServer.active)
		{
			attachment = Object.Instantiate<GameObject>(Prefabs.shieldAttachment).GetComponent<NetworkedBodyAttachment>();
			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<GameObject>("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<ChildLocator>();
			self.lotus = Object.Instantiate<GameObject>(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>();
		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_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		//IL_007a: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_0094: 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_00bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)self.vehicleSeat.currentPassengerInputBank != (Object)null)
		{
			Player inputPlayer = self.vehicleSeat.currentPassengerBody.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<CharacterBody>().baseNameToken == "SEEKER_BODY_NAME")
		{
			CharacterMotor component = damageMessage.attacker.GetComponent<CharacterMotor>();
			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<HurtBox>() : 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.0")]
public class MainPlugin : BaseUnityPlugin
{
	public const string MODUID = "com.Dragonyck.SeekerTweaks";

	public const string MODNAME = "SeekerTweaks";

	public const string VERSION = "1.0.0";

	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<T>(string name) where T : Object
	{
		return MainAssetBundle.LoadAsset<T>(name);
	}

	public static void PopulateAssets()
	{
		Assembly executingAssembly = Assembly.GetExecutingAssembly();
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			using Stream stream = executingAssembly.GetManifestResourceStream("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<string, Sprite> bodyIcons = new Dictionary<string, Sprite>();

	internal static T Load<T>(string path)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		return Addressables.LoadAssetAsync<T>((object)path).WaitForCompletion();
	}

	internal static GameObject Instantiate(string path, string name, bool registerNetwork = false)
	{
		return PrefabAPI.InstantiateClone(Load<GameObject>(path), name, registerNetwork);
	}

	internal static GameObject Instantiate(GameObject obj, string name, bool registerNetwork = false)
	{
		return PrefabAPI.InstantiateClone(obj, name, registerNetwork);
	}

	[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<GameObject>("RoR2/DLC2/Seeker/SoulSpiralProjectile.prefab");
		if (Configs.spiralSmallHop.Value)
		{
			val2.GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)262144);
		}
		if (Configs.spiralLimit.Value != 6 || Configs.spiralRadius.Value != 4.75f)
		{
			val2.AddComponent<SoulSpiralTracker>();
		}
		seekerBodyPrefab = Load<GameObject>("RoR2/DLC2/Seeker/SeekerBody.prefab");
		Utils.NewStateMachine<Idle>(seekerBodyPrefab, "Sojourn");
		seekerBodyPrefab.GetComponent<NetworkStateMachine>().stateMachines = seekerBodyPrefab.GetComponents<EntityStateMachine>();
		bool flag = false;
		if (Configs.castSecondary.Value || Configs.castSpecial.Value || Configs.sojournTimer.Value)
		{
			ContentAddition.AddEntityState<BetterSojourn>(ref flag);
			SkillDef val3 = Load<SkillDef>("RoR2/DLC2/Seeker/SeekerBodySojourn.asset");
			val3.activationState = new SerializableEntityStateType(typeof(BetterSojourn));
			val3.activationStateMachineName = "Sojourn";
		}
		if (Configs.canInterrupt.Value)
		{
			SkillDef val4 = Load<SkillDef>("RoR2/DLC2/Seeker/SeekerBodyMeditate2.asset");
			val4.interruptPriority = (InterruptPriority)1;
		}
		seekerBodyPrefab.AddComponent<SeekerTweakBehaviour>();
		if (Configs.autoCastSpiral.Value)
		{
			seekerBodyPrefab.AddComponent<AutoCastBehaviour>();
		}
		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<Light>().color = Color.green;
			Object.Destroy((Object)(object)skyBeamBeam.GetComponent<VfxKillBehavior>());
			DestroyOnTimer component = skyBeamBeam.GetComponent<DestroyOnTimer>();
			((Behaviour)component).enabled = true;
			component.duration = 2f;
			MeshRenderer componentInChildren = skyBeamBeam.GetComponentInChildren<MeshRenderer>();
			Material val5 = new Material(((Renderer)componentInChildren).material);
			val5.SetFloat("_DstBlend", 1f);
			val5.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampEngiOffset.png"));
			Material val6 = new Material(Load<Material>("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<ParticleSystemRenderer>();
			foreach (ParticleSystemRenderer val7 in componentsInChildren)
			{
				string name = ((Object)val7).name;
				if (name == "Particles")
				{
					((Component)val7).transform.localScale = Vector3.one * 2f;
					((Renderer)val7).material = Load<Material>("RoR2/DLC2/Seeker/matSpiritPunchSoftRay.mat");
				}
				if (name == "Particles, Bright")
				{
					((Renderer)val7).material = Load<Material>("RoR2/DLC2/Seeker/matSpiritPunchFistTendrilsOpaque.mat");
				}
				if (name == "MuzzleRayParticles")
				{
					((Component)val7).transform.localScale = Vector3.one;
					((Renderer)val7).material = new Material(Load<Material>("RoR2/DLC1/Railgunner/matRailgunImpact.mat"));
					((Renderer)val7).material.DisableKeyword("VERTEXCOLOR");
					((Renderer)val7).material.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("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<MeshRenderer>();
			Material val8 = new Material(val5);
			val8.SetTexture("_Cloud1Tex", (Texture)(object)Load<Texture2D>("RoR2/DLC2/Child/texChildPrimaryStarCloud.png"));
			val8.SetTextureScale("_Cloud1Tex", Vector2.one);
			Material val9 = new Material(Load<Material>("RoR2/Base/Captain/matCaptainAirstrikeAltAreaIndicatorOuter.mat"));
			val9.SetTexture("_Cloud1Tex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/texCloudBone1.png"));
			val8.SetTextureScale("_Cloud1Tex", Vector2.one * 0.6f);
			val9.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampAntler.png"));
			val9.SetFloat("_DstBlendFloat", 1f);
			((Renderer)componentInChildren2).materials = (Material[])(object)new Material[2] { val8, val8 };
			Light componentInChildren3 = skyHealingBeamBeam.GetComponentInChildren<Light>();
			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<ShakeEmitter>());
			ParticleSystemRenderer[] componentsInChildren2 = skyHealingBeamBeam.GetComponentsInChildren<ParticleSystemRenderer>();
			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<Light>().color = Color32.op_Implicit(new Color32((byte)88, byte.MaxValue, (byte)107, byte.MaxValue));
			MeshRenderer componentInChildren4 = skyBeamHealingAreaIndicator.GetComponentInChildren<MeshRenderer>();
			((Renderer)componentInChildren4).material = new Material(((Renderer)componentInChildren4).material);
			((Renderer)componentInChildren4).material.SetFloat("_DstBlendFloat", 1f);
			((Renderer)componentInChildren4).material.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampAntler.png"));
			ParticleSystemRenderer componentInChildren5 = ((Component)componentInChildren4).GetComponentInChildren<ParticleSystemRenderer>();
			((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<SpriteRenderer>();
			((Component)component2).transform.localScale = Vector3.one * 0.04f;
			tpTargetMat = new Material(Load<Material>("RoR2/InDev/matEcho.mat"));
			tpTargetMat.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("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<Sprite>("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<SojournVehicle>();
			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<VehicleTimer>();
			vehiclePrefab.GetComponent<SphereCollider>().radius = 1f;
			shieldAttachment = Instantiate("RoR2/DLC1/MajorAndMinorConstruct/MegaConstructBubbleShield.prefab", "ShieldAttachment", registerNetwork: true);
			shieldAttachment.transform.localScale = Vector3.one * 0.2f;
			Material val12 = Load<Material>("RoR2/DLC1/MajorAndMinorConstruct/matMajorConstructDefenseMatrixEdges.mat");
			Material val13 = new Material(val12);
			val13.SetTexture("_Cloud1Tex", (Texture)(object)Load<Texture2D>("RoR2/DLC2/Seeker/texSeekerLotusMask3.png"));
			Material val14 = new Material(Load<Material>("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<Texture2D>("RoR2/DLC1/Common/ColorRamps/texRampConstructLaserTypeB.png"));
			Material val15 = new Material(val12);
			val15.SetTexture("_Cloud1Tex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/VFX/ParticleMasks/texAlphaGradient2Mask.png"));
			((Renderer)shieldAttachment.GetComponentInChildren<MeshRenderer>()).materials = (Material[])(object)new Material[3] { val13, val14, val15 };
			seekerBodyPrefab.AddComponent<AllyTracker>();
			beamHitEffect = Instantiate("RoR2/DLC2/Seeker/SpiritPunchOmniImpactVFX.prefab", "BeamHitEffect");
			beamHitEffect.GetComponent<EffectComponent>().soundName = "Play_SeekerTweaks_Beam_Impact";
			ContentAddition.AddEffect(beamHitEffect);
			trackingIndicator = Instantiate("RoR2/Base/Huntress/HuntressTrackingIndicator.prefab", "TrackingIndicator");
			SpriteRenderer[] componentsInChildren3 = trackingIndicator.GetComponentsInChildren<SpriteRenderer>(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<GameObject>(((Component)componentsInChildren3[0]).gameObject, ((Component)child).transform.position, Quaternion.identity, child);
			val16.GetComponent<SpriteRenderer>().sprite = Load<Sprite>("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<EffectComponent>());
			Object.Destroy((Object)(object)muzzleEffect.GetComponent<DestroyOnParticleEnd>());
			Object.Destroy((Object)(object)muzzleEffect.GetComponent<EffectManagerHelper>());
			Object.Destroy((Object)(object)muzzleEffect.GetComponent<VFXAttributes>());
			ParticleSystem[] componentsInChildren4 = muzzleEffect.GetComponentsInChildren<ParticleSystem>();
			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<GameObject>("RoR2/Base/ChainLightning/ChainLightningOrbEffect.prefab").transform.GetChild(0)).gameObject, "BeamEffect", false);