Decompiled source of KatarinaMod v1.9.2

LemonKatarinaMod.dll

Decompiled a week ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.Huntress;
using HG.Reflection;
using IL.RoR2;
using JetBrains.Annotations;
using KatarinaMod.Modules;
using KatarinaMod.Modules.LeagueSkins;
using KatarinaMod.Modules.LeagueVfx;
using KatarinaMod.Modules.Survivors;
using KatarinaMod.SkillStates;
using KatarinaMod.SkillStates.BaseStates;
using KatarinaMod.SkillStates.Katarina;
using KatarinaMod.SkillStates.Katarina.Weapon;
using KatarinaMod.Skills;
using KinematicCharacterController;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.RoR2;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.ContentManagement;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: OptIn]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LemonKatarinaMod")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.9.2.0")]
[assembly: AssemblyInformationalVersion("1.9.2+eb395b2f643199fc185233fee0ebaf1fdb1f68c9")]
[assembly: AssemblyProduct("LemonKatarinaMod")]
[assembly: AssemblyTitle("LemonKatarinaMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.9.2.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
internal class BodyInfo
{
	internal float acceleration = 80f;

	internal Vector3 aimOriginPosition = new Vector3(0f, 1.8f, 0f);

	internal float armor;

	internal float armorGrowth;

	internal float attackSpeed = 1f;

	internal float attackSpeedGrowth;

	internal Color bodyColor = Color.grey;

	internal string bodyName = "";

	internal string bodyNameToClone = "Commando";

	internal string bodyNameToken = "";

	internal Vector3 cameraPivotPosition = new Vector3(0f, 1.6f, 0f);

	internal Texture characterPortrait;

	internal float crit = 1f;

	internal float critGrowth;

	internal GameObject crosshair;

	internal float damage = 12f;

	internal float healthGrowth = 2f;

	internal float damageGrowth;

	internal float healthRegen;

	internal float regenGrowth;

	internal int jumpCount = 1;

	internal float jumpPower = 15f;

	internal float jumpPowerGrowth;

	internal float maxHealth = 100f;

	internal Vector3 modelBasePosition = new Vector3(0f, -0.92f, 0f);

	internal float moveSpeed = 7f;

	internal float moveSpeedGrowth;

	internal GameObject podPrefab;

	internal float shield;

	internal float shieldGrowth;

	internal string subtitleNameToken = "";
}
internal class CustomRendererInfo
{
	internal string childName;

	internal bool ignoreOverlays;

	internal Material material;
}
internal class SkillDefInfo
{
	public SerializableEntityStateType activationState;

	public string activationStateMachineName;

	public int baseMaxStock;

	public float baseRechargeInterval;

	public bool beginSkillCooldownOnSkillEnd;

	public bool canceledFromSprinting;

	public bool cancelSprintingOnActivation;

	public bool forceSprintDuringState;

	public bool fullRestockOnAssign;

	public InterruptPriority interruptPriority;

	public bool isCombatSkill;

	public string[] keywordTokens;

	public bool mustKeyPress;

	public int rechargeStock;

	public int requiredStock;

	public bool resetCooldownTimerOnUse;

	public string skillDescriptionToken;

	public Sprite skillIcon;

	public string skillName;

	public string skillNameToken;

	public int stockToConsume;
}
namespace RoR2.Orbs
{
	public class KnifeDamageOrb : GenericDamageOrb
	{
		public override void Begin()
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: 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_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Expected O, but got Unknown
			base.speed = 400f;
			((Orb)this).duration = ((Orb)this).distanceToTarget / base.speed;
			if (Object.op_Implicit((Object)(object)((GenericDamageOrb)this).GetOrbEffect()))
			{
				EffectData val = new EffectData
				{
					scale = base.scale,
					origin = ((Orb)this).origin,
					genericFloat = ((Orb)this).duration,
					networkSoundEventIndex = (NetworkSoundEventIndex)(-1)
				};
				val.SetHurtBoxReference(((Orb)this).target);
				EffectManager.SpawnEffect(((GenericDamageOrb)this).GetOrbEffect(), val, true);
			}
		}

		public override GameObject GetOrbEffect()
		{
			return LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OrbEffects/ArrowOrbEffect");
		}
	}
}
namespace KatarinaMod
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.Lemonlust.KatarinaMod", "KatarinaMod", "1.9.2")]
	public class KatarinaPlugin : BaseUnityPlugin
	{
		public const string developerPrefix = "Lemonlust";

		public const string MODNAME = "KatarinaMod";

		public const string MODUID = "com.Lemonlust.KatarinaMod";

		public const string MODVERSION = "1.9.2";

		public static KatarinaPlugin instance;

		internal List<SurvivorBase> Survivors = new List<SurvivorBase>();

		public ManualLogSource Logger => ((BaseUnityPlugin)this).Logger;

		private void Awake()
		{
			instance = this;
			try
			{
				Assets.Initialize();
				Config.ReadConfig();
				States.RegisterStates();
				NetworkingAPI.RegisterMessageType<DaggerPickupMessage>();
				NetworkingAPI.RegisterMessageType<DaggerLandingPreview.CancelMessage>();
				Buffs.RegisterBuffs();
				Projectiles.RegisterProjectiles();
				Tokens.AddTokens();
				new MyCharacter().Initialize();
				new ContentPacks().Initialize();
				Hook();
			}
			catch (Exception ex)
			{
				Logger.LogError((object)ex.ToString());
			}
		}

		private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self) && self.HasBuff(Buffs.armorBuff))
			{
				self.armor += 300f;
			}
		}

		private void Hook()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats);
			GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(GlobalEventManager_OnCharacterDeath);
		}

		private void GlobalEventManager_OnCharacterDeath(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Invalid comparison between Unknown and I4
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, damageReport);
			if (!NetworkServer.active || !((Object)(object)damageReport.attackerBody != (Object)null) || !((Object)(object)damageReport.attacker != (Object)null) || damageReport == null)
			{
				return;
			}
			BodyIndex val = BodyCatalog.FindBodyIndex("Katarina");
			if ((int)damageReport.victimTeamIndex != 1 && damageReport.attackerBodyIndex == val)
			{
				SkillLocator skillLocator = damageReport.attackerBody.skillLocator;
				if (NetworkServer.active)
				{
					skillLocator.DeductCooldownFromAllSkillsServer(1f);
				}
			}
		}
	}
	public class MenuSound : MonoBehaviour
	{
		private uint playID;

		private void OnDestroy()
		{
			if (playID != 0)
			{
				AkSoundEngine.StopPlayingID(playID);
			}
		}

		private void OnEnable()
		{
			((MonoBehaviour)this).Invoke("PlayEffect", 0.05f);
		}

		private void PlayEffect()
		{
			if (Config.voiceLines.Value)
			{
				playID = Util.PlaySound("KatarinaMenu", ((Component)this).gameObject);
			}
		}
	}
	public class DaggerOrb : Orb
	{
		public float speed = 100f;

		public float damageValue;

		public GameObject attacker;

		public GameObject inflictor;

		public int bouncesRemaining;

		public List<HealthComponent> bouncedObjects;

		public TeamIndex teamIndex;

		public bool isCrit;

		public ProcChainMask procChainMask;

		public float procCoefficient = 1f;

		public DamageColorIndex damageColorIndex;

		public float range = 5f;

		public float damageCoefficientPerBounce = 1f;

		public DamageType damageType;

		public bool tossDaggerOnArrival;

		public float landingDistance = 3f;

		private const float MinFlightTime = 0.1f;

		private Vector3 lastTargetPosition;

		private BullseyeSearch search;

		public override void Begin()
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			((Orb)this).duration = Mathf.Max(((Orb)this).distanceToTarget / speed, 0.1f);
			lastTargetPosition = (Object.op_Implicit((Object)(object)base.target) ? ((Component)base.target).transform.position : base.origin);
			DaggerOrbEffect.Spawn(base.origin, base.target, ((Orb)this).duration, attacker);
		}

		public override void OnArrival()
		{
			//IL_003c: 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_0041: 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_005f: Expected O, but got Unknown
			//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_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: 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_0187: 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)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			//IL_023b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			HealthComponent val = (Object.op_Implicit((Object)(object)base.target) ? base.target.healthComponent : null);
			Vector3 val2 = (Object.op_Implicit((Object)(object)base.target) ? ((Component)base.target).transform.position : lastTargetPosition);
			if (Object.op_Implicit((Object)(object)val) && val.alive)
			{
				DamageInfo val3 = new DamageInfo();
				val3.damage = damageValue;
				val3.attacker = attacker;
				val3.inflictor = inflictor;
				val3.force = Vector3.zero;
				val3.crit = isCrit;
				val3.procChainMask = procChainMask;
				val3.procCoefficient = procCoefficient;
				val3.position = val2;
				val3.damageColorIndex = damageColorIndex;
				val3.damageType = DamageTypeCombo.op_Implicit(damageType);
				val.TakeDamage(val3);
				GlobalEventManager.instance.OnHitEnemy(val3, ((Component)val).gameObject);
				GlobalEventManager.instance.OnHitAll(val3, ((Component)val).gameObject);
			}
			if (bouncedObjects == null)
			{
				bouncedObjects = new List<HealthComponent>();
			}
			if (Object.op_Implicit((Object)(object)val) && !bouncedObjects.Contains(val))
			{
				bouncedObjects.Add(val);
			}
			HurtBox val4 = ((bouncesRemaining > 0) ? PickNextTarget(val2) : null);
			if (!Object.op_Implicit((Object)(object)val4))
			{
				if (tossDaggerOnArrival)
				{
					tossDaggerOnArrival = false;
					TossDagger(val2);
				}
				return;
			}
			DaggerOrb daggerOrb = new DaggerOrb();
			daggerOrb.search = search;
			((Orb)daggerOrb).origin = val2;
			((Orb)daggerOrb).target = val4;
			daggerOrb.attacker = attacker;
			daggerOrb.inflictor = inflictor;
			daggerOrb.teamIndex = teamIndex;
			daggerOrb.damageValue = damageValue * damageCoefficientPerBounce;
			daggerOrb.bouncesRemaining = bouncesRemaining - 1;
			daggerOrb.isCrit = isCrit;
			daggerOrb.bouncedObjects = bouncedObjects;
			daggerOrb.procChainMask = procChainMask;
			daggerOrb.procCoefficient = procCoefficient;
			daggerOrb.damageColorIndex = damageColorIndex;
			daggerOrb.damageCoefficientPerBounce = damageCoefficientPerBounce;
			daggerOrb.speed = speed;
			daggerOrb.range = range;
			daggerOrb.damageType = damageType;
			daggerOrb.landingDistance = landingDistance;
			daggerOrb.tossDaggerOnArrival = tossDaggerOnArrival;
			OrbManager.instance.AddOrb((Orb)(object)daggerOrb);
		}

		private void TossDagger(Vector3 hitPosition)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: 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_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: 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_009e: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkServer.active || !Object.op_Implicit((Object)(object)attacker))
			{
				return;
			}
			Vector3 position = hitPosition + Vector3.up * 2f;
			CharacterBody component = attacker.GetComponent<CharacterBody>();
			Vector3 katarinaPosition = (Object.op_Implicit((Object)(object)component) ? component.corePosition : attacker.transform.position);
			Vector3? pendingLanding = FindLandingPoint(hitPosition, katarinaPosition, landingDistance);
			if (pendingLanding.HasValue && Object.op_Implicit((Object)(object)Projectiles.knifePrefab))
			{
				float radius = 3f * Mathf.Abs(Projectiles.knifePrefab.transform.localScale.x);
				DaggerLandingPreview.Spawn(pendingLanding.Value, radius, 1f, attacker);
			}
			DaggerPickup.pendingLanding = pendingLanding;
			try
			{
				ProjectileManager instance = ProjectileManager.instance;
				FireProjectileInfo val = new FireProjectileInfo
				{
					projectilePrefab = Projectiles.knifePrefab,
					position = position,
					rotation = Quaternion.identity,
					owner = attacker,
					damage = 0f,
					force = 0f,
					crit = false
				};
				((FireProjectileInfo)(ref val)).speedOverride = 0f;
				instance.FireProjectile(val);
			}
			finally
			{
				DaggerPickup.pendingLanding = null;
			}
		}

		private static Vector3? FindLandingPoint(Vector3 hitPosition, Vector3 katarinaPosition, float distance)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: 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)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: 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_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_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: 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_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			int num = LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask);
			Vector3 val = hitPosition - katarinaPosition;
			val.y = 0f;
			if (((Vector3)(ref val)).sqrMagnitude < 0.0001f)
			{
				val = Vector3.forward;
			}
			((Vector3)(ref val)).Normalize();
			Vector3 val2 = hitPosition + Vector3.up;
			float num2 = Mathf.Max(0f, distance);
			RaycastHit val3 = default(RaycastHit);
			if (num2 > 0f && Physics.SphereCast(val2, 0.3f, val, ref val3, num2, num, (QueryTriggerInteraction)1))
			{
				num2 = Mathf.Max(0f, ((RaycastHit)(ref val3)).distance - 0.5f);
			}
			RaycastHit val4 = default(RaycastHit);
			if (Physics.Raycast(val2 + val * num2, Vector3.down, ref val4, 200f, num, (QueryTriggerInteraction)1))
			{
				return ((RaycastHit)(ref val4)).point;
			}
			if (Physics.Raycast(val2, Vector3.down, ref val4, 200f, num, (QueryTriggerInteraction)1))
			{
				return ((RaycastHit)(ref val4)).point;
			}
			return null;
		}

		public HurtBox PickNextTarget(Vector3 position)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: 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_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Expected O, but got Unknown
			if (search == null)
			{
				search = new BullseyeSearch();
			}
			search.searchOrigin = position;
			search.searchDirection = Vector3.zero;
			search.teamMaskFilter = TeamMask.allButNeutral;
			((TeamMask)(ref search.teamMaskFilter)).RemoveTeam(teamIndex);
			search.filterByLoS = true;
			search.filterByDistinctEntity = true;
			search.sortMode = (SortMode)1;
			search.maxDistanceFilter = range;
			search.RefreshCandidates();
			HurtBox val = search.GetResults().FirstOrDefault((Func<HurtBox, bool>)((HurtBox v) => Object.op_Implicit((Object)(object)v) && Object.op_Implicit((Object)(object)v.healthComponent) && v.healthComponent.alive && !bouncedObjects.Contains(v.healthComponent)));
			if (Object.op_Implicit((Object)(object)val))
			{
				bouncedObjects.Add(val.healthComponent);
			}
			return val;
		}
	}
	public class DaggerPickup : MonoBehaviour
	{
		private float stopwatch;

		public Rigidbody rigidbody;

		public GameObject pickupEffect;

		public bool collided;

		private bool alive = true;

		private SphereCollider sphereCollider;

		private ProjectileController projectileController;

		private Vector3 eulerAngleVelocity;

		private bool stuck;

		private Vector3 transformPositionWhenContacted;

		public AnimationCurve embedDistanceCurve;

		internal static Vector3? pendingLanding;

		internal const float LeagueLandTime = 1f;

		internal const float PickupRadius = 3f;

		private const float LandingArcHeight = 8f;

		private bool scriptedFlight;

		private Vector3 flightStart;

		private Vector3 flightEnd;

		private float apexHeight;

		private float apexTime;

		private Vector3 landingGround;

		private const float MidAirPickupDelay = 0.25f;

		private void Awake()
		{
			//IL_003a: 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_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_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			rigidbody = ((Component)this).GetComponent<Rigidbody>();
			sphereCollider = ((Component)this).GetComponent<SphereCollider>();
			sphereCollider.radius = 3f;
			((Collider)sphereCollider).isTrigger = true;
			sphereCollider.center = Vector3.zero;
			projectileController = ((Component)this).GetComponent<ProjectileController>();
			if (Object.op_Implicit((Object)(object)sphereCollider))
			{
				((Collider)sphereCollider).enabled = false;
			}
			stopwatch = 0f;
			rigidbody.velocity = Vector3.zero;
			eulerAngleVelocity = new Vector3(15f, 0f, 0f);
			if (NetworkServer.active && pendingLanding.HasValue)
			{
				scriptedFlight = true;
				flightStart = ((Component)this).transform.position;
				landingGround = pendingLanding.Value;
				flightEnd = pendingLanding.Value + Vector3.up * RestHeight();
				SetupArc();
				pendingLanding = null;
				rigidbody.isKinematic = true;
				rigidbody.useGravity = false;
			}
		}

		private float RestHeight()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			CapsuleCollider component = ((Component)this).GetComponent<CapsuleCollider>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				return 0f;
			}
			return component.height * 0.5f * Mathf.Abs(((Component)this).transform.lossyScale.y);
		}

		private void SetupArc()
		{
			apexHeight = Mathf.Max(flightStart.y, flightEnd.y) + 8f;
			float num = Mathf.Sqrt(apexHeight - flightStart.y);
			float num2 = Mathf.Sqrt(apexHeight - flightEnd.y);
			apexTime = num / (num + num2);
		}

		private float ArcY(float t)
		{
			float num = t - apexTime;
			float num2 = (apexHeight - flightStart.y) / (apexTime * apexTime);
			return apexHeight - num2 * num * num;
		}

		private void ScriptedFlightStep()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00a6: Unknown result type (might be due to invalid IL or missing references)
			float num = Mathf.Clamp01(stopwatch / 1f);
			Vector3 val = Vector3.Lerp(flightStart, flightEnd, num);
			val.y = ArcY(num);
			if (stopwatch >= 0.25f)
			{
				((Collider)sphereCollider).enabled = true;
			}
			rigidbody.MovePosition(val);
			rigidbody.MoveRotation(Quaternion.identity);
			if (num >= 1f)
			{
				scriptedFlight = false;
				stuck = true;
				transformPositionWhenContacted = flightEnd;
				((Component)this).transform.SetPositionAndRotation(flightEnd, Quaternion.identity);
				rigidbody.rotation = Quaternion.identity;
				((Collider)sphereCollider).enabled = true;
			}
		}

		private void OnTriggerEnter(Collider other)
		{
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkServer.active || !alive)
			{
				return;
			}
			CharacterBody component = ((Component)other).GetComponent<CharacterBody>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				return;
			}
			GameObject val = (Object.op_Implicit((Object)(object)projectileController) ? projectileController.owner : null);
			if (Object.op_Implicit((Object)(object)val) && !((Object)(object)((Component)component).gameObject != (Object)(object)val))
			{
				alive = false;
				if (scriptedFlight)
				{
					DaggerLandingPreview.CancelForOwner(val, landingGround);
				}
				DaggerPickupMessage.NotifyPickup(component);
				NetworkServer.Destroy(((Component)this).gameObject);
			}
		}

		private void Update()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			if (stuck)
			{
				((Component)this).transform.position = transformPositionWhenContacted;
			}
		}

		private void FixedUpdate()
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: 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_0079: 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_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: 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_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			stopwatch += Time.fixedDeltaTime;
			if (scriptedFlight)
			{
				if (alive)
				{
					ScriptedFlightStep();
				}
				return;
			}
			if (stopwatch < 0.5f && alive)
			{
				((Collider)sphereCollider).enabled = false;
				rigidbody.velocity = Vector3.up * 15f;
				Quaternion val = Quaternion.Euler(eulerAngleVelocity * 1.5f);
				rigidbody.MoveRotation(rigidbody.rotation * val);
			}
			if (stopwatch > 0.5f && alive)
			{
				((Collider)sphereCollider).enabled = true;
				rigidbody.AddForce(Vector3.down * 5f, (ForceMode)2);
				rigidbody.rotation = Quaternion.Lerp(rigidbody.rotation, Quaternion.identity, stopwatch / 1f);
			}
		}

		private void OnCollisionEnter(Collision collision)
		{
			//IL_004e: 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_0082: Unknown result type (might be due to invalid IL or missing references)
			if (!stuck && !rigidbody.isKinematic && ((Component)collision.transform).gameObject.layer == LayerIndex.world.intVal && stopwatch > 0.5f)
			{
				stuck = true;
				transformPositionWhenContacted = ((Component)this).transform.position;
				rigidbody.collisionDetectionMode = (CollisionDetectionMode)3;
				rigidbody.detectCollisions = true;
				rigidbody.isKinematic = true;
				rigidbody.velocity = Vector3.zero;
			}
		}
	}
}
namespace KatarinaMod.SkillStates
{
	public class Deathlotus : BaseState
	{
		private float baseDuration = 2.5f;

		private float duration;

		private float daggerTimer;

		private float baseDaggerThrottle = 0.166f;

		private float daggerThrottle;

		private bool throwing;

		private static float damageCoefficient = Config.deathLotus_damageCoefficient.Value;

		private static float procCoefficient = Config.deathLotus_procCoefficient.Value;

		private float stopwatch;

		private Animator animator;

		public uint activeSFXPlayID;

		public override void FixedUpdate()
		{
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			((EntityState)this).characterMotor.velocity.y = ((EntityState)this).characterMotor.velocity.y * 0.75f;
			stopwatch += Time.fixedDeltaTime;
			int layerIndex = animator.GetLayerIndex("FullBody, Override");
			animator.PlayInFixedTime("Ultimate", layerIndex, stopwatch);
			animator.Update(0f);
			AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(layerIndex);
			float length = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).length;
			animator.SetFloat("Ultimate.playbackRate", length / duration);
			if (daggerTimer < daggerThrottle)
			{
				throwing = false;
				daggerTimer += Time.fixedDeltaTime;
			}
			if (daggerTimer >= daggerThrottle && !throwing)
			{
				daggerTimer = 0f;
				throwing = true;
				ThrowDagger();
			}
			if (stopwatch >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		protected virtual GenericDamageOrb CreateArrowOrb()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			return (GenericDamageOrb)new HuntressArrowOrb();
		}

		private void ThrowDagger()
		{
			//IL_000a: 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_001f: 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_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: 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_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkServer.active)
			{
				return;
			}
			foreach (HurtBox item in new SphereSearch
			{
				radius = Config.deathLotus_radius.Value,
				mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask,
				origin = ((EntityState)this).transform.position
			}.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)).FilterCandidatesByDistinctHurtBoxEntities()
				.GetHurtBoxes()
				.ToList())
			{
				KnifeDamageOrb knifeDamageOrb = new KnifeDamageOrb();
				((GenericDamageOrb)knifeDamageOrb).damageValue = ((EntityState)this).characterBody.damage * damageCoefficient;
				((GenericDamageOrb)knifeDamageOrb).isCrit = ((BaseState)this).RollCrit();
				((GenericDamageOrb)knifeDamageOrb).teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject);
				((GenericDamageOrb)knifeDamageOrb).attacker = ((EntityState)this).gameObject;
				((GenericDamageOrb)knifeDamageOrb).procCoefficient = procCoefficient;
				if (Object.op_Implicit((Object)(object)item))
				{
					((Orb)knifeDamageOrb).origin = ((EntityState)this).transform.position + ((EntityState)this).transform.up * 0.8f;
					((Orb)knifeDamageOrb).target = item;
					OrbManager.instance.AddOrb((Orb)(object)knifeDamageOrb);
				}
			}
		}

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			stopwatch = 0f;
			duration = baseDuration;
			daggerThrottle = baseDaggerThrottle / base.attackSpeedStat;
			activeSFXPlayID = Util.PlaySound("KatarinaRSFX", ((EntityState)this).gameObject);
			if (Config.voiceLines.Value)
			{
				Util.PlaySound("KatarinaRVO", ((EntityState)this).gameObject);
			}
			animator.SetFloat("Ultimate.playbackRate", 1f);
		}

		public override void OnExit()
		{
			if (activeSFXPlayID != 0)
			{
				AkSoundEngine.StopPlayingID(activeSFXPlayID);
			}
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	public class Shunpo : BaseSkillState
	{
		private Transform modelTransform;

		public static GameObject blinkPrefab;

		private float stopwatch;

		private Vector3 blinkVector = Vector3.zero;

		public float duration = 0.3f;

		public float speedCoefficient = 12f;

		public string beginSoundString = "KatarinaESFX";

		public string endSoundString;

		private CharacterModel characterModel;

		private HurtBoxGroup hurtboxGroup;

		private Vector3 startLoc;

		private HuntressTracker huntressTracker;

		private HurtBox initialTarget;

		private float damageCoefficient = Config.shunpo_damageCoefficient.Value;

		private float procCoefficient = Config.shunpo_procCoefficient.Value;

		private bool damaged;

		public override void OnEnter()
		{
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			Util.PlaySound(beginSoundString, ((EntityState)this).gameObject);
			huntressTracker = ((EntityState)this).GetComponent<HuntressTracker>();
			if (Object.op_Implicit((Object)(object)huntressTracker) && ((EntityState)this).isAuthority)
			{
				initialTarget = huntressTracker.GetTrackingTarget();
			}
			modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				characterModel = ((Component)modelTransform).GetComponent<CharacterModel>();
				hurtboxGroup = ((Component)modelTransform).GetComponent<HurtBoxGroup>();
			}
			if (Object.op_Implicit((Object)(object)characterModel))
			{
				CharacterModel obj = characterModel;
				int invisibilityCount = obj.invisibilityCount;
				obj.invisibilityCount = invisibilityCount + 1;
			}
			if (Object.op_Implicit((Object)(object)hurtboxGroup))
			{
				HurtBoxGroup obj2 = hurtboxGroup;
				int hurtBoxesDeactivatorCounter = obj2.hurtBoxesDeactivatorCounter + 1;
				obj2.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter;
			}
			startLoc = ((EntityState)this).transform.position;
			blinkVector = GetBlinkVector();
			TossDagger(((EntityState)this).gameObject.transform.position);
			CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject));
		}

		private void TossDagger(Vector3 location)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			if (((EntityState)this).isAuthority)
			{
				FireProjectileInfo val = new FireProjectileInfo
				{
					projectilePrefab = Projectiles.knifePrefab,
					position = location + Vector3.up * 2f,
					rotation = Quaternion.identity,
					owner = ((EntityState)this).gameObject,
					damage = 0f,
					force = 0f,
					crit = false
				};
				((FireProjectileInfo)(ref val)).speedOverride = 0f;
				FireProjectileInfo val2 = val;
				ProjectileManager.instance.FireProjectile(val2);
			}
		}

		public override void OnExit()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			if (!((EntityState)this).outer.destroying)
			{
				Util.PlaySound(endSoundString, ((EntityState)this).gameObject);
				CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject));
				modelTransform = ((EntityState)this).GetModelTransform();
				if (Object.op_Implicit((Object)(object)modelTransform))
				{
					TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject);
					obj.duration = 0.6f;
					obj.animateShaderAlpha = true;
					obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
					obj.destroyComponentOnEnd = true;
					obj.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashBright");
					obj.AddToCharacterModel(((Component)modelTransform).GetComponent<CharacterModel>());
					TemporaryOverlayInstance obj2 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject);
					obj2.duration = 0.7f;
					obj2.animateShaderAlpha = true;
					obj2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
					obj2.destroyComponentOnEnd = true;
					obj2.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashExpanded");
					obj2.AddToCharacterModel(((Component)modelTransform).GetComponent<CharacterModel>());
				}
			}
			if (Object.op_Implicit((Object)(object)characterModel))
			{
				CharacterModel obj3 = characterModel;
				int invisibilityCount = obj3.invisibilityCount;
				obj3.invisibilityCount = invisibilityCount - 1;
			}
			if (Object.op_Implicit((Object)(object)hurtboxGroup))
			{
				HurtBoxGroup obj4 = hurtboxGroup;
				int hurtBoxesDeactivatorCounter = obj4.hurtBoxesDeactivatorCounter - 1;
				obj4.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter;
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				((EntityState)this).characterMotor.disableAirControlUntilCollision = false;
			}
			((EntityState)this).OnExit();
		}

		private void ShunpoDamage(HurtBox hurtbox)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			DamageInfo val = new DamageInfo();
			val.damage = ((BaseState)this).damageStat * damageCoefficient;
			val.attacker = ((EntityState)this).gameObject;
			val.inflictor = ((EntityState)this).gameObject;
			val.force = Vector3.zero;
			val.crit = ((BaseState)this).RollCrit();
			val.procCoefficient = procCoefficient;
			val.position = ((Component)hurtbox).gameObject.transform.position;
			val.damageType = DamageTypeCombo.op_Implicit((DamageType)0);
			hurtbox.healthComponent.TakeDamage(val);
			GlobalEventManager.instance.OnHitEnemy(val, ((Component)hurtbox.healthComponent).gameObject);
			GlobalEventManager.instance.OnHitAll(val, ((Component)hurtbox.healthComponent).gameObject);
			Util.PlaySound("KatarinaImpactSFX", ((EntityState)this).gameObject);
			damaged = true;
		}

		public override void FixedUpdate()
		{
			//IL_00e3: 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_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: 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_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				if (Object.op_Implicit((Object)(object)initialTarget) && ((EntityState)this).inputBank.skill1.down)
				{
					Vector3 val = Vector3.Lerp(startLoc, ((Component)initialTarget).transform.position + Vector3.up * 2f, stopwatch / duration);
					((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(val, Quaternion.LookRotation(((Component)initialTarget).gameObject.transform.forward, ((Component)initialTarget).gameObject.transform.up), true);
				}
				else
				{
					((EntityState)this).characterMotor.velocity = Vector3.zero;
					CharacterMotor characterMotor = ((EntityState)this).characterMotor;
					characterMotor.rootMotion += blinkVector * (8f * speedCoefficient * Time.fixedDeltaTime);
				}
			}
			if (stopwatch >= duration && Object.op_Implicit((Object)(object)initialTarget) && ((EntityState)this).inputBank.skill1.down && !damaged)
			{
				ShunpoDamage(initialTarget);
			}
			if (stopwatch >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		protected virtual Vector3 GetBlinkVector()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			return ((EntityState)this).inputBank.aimDirection;
		}

		private void CreateBlinkEffect(Vector3 origin)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			EffectData val = new EffectData();
			val.rotation = Util.QuaternionSafeLookRotation(blinkVector);
			val.origin = origin;
			EffectManager.SpawnEffect(BlinkState.blinkPrefab, val, false);
		}
	}
	public class SlashCombo : BaseMeleeAttack
	{
		public override void OnEnter()
		{
			//IL_000d: 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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			hitboxName = "Sword";
			damageType = (DamageType)0;
			damageCoefficient = Config.basicAttack_damageCoefficient.Value;
			procCoefficient = Config.basicAttack_procCoefficient.Value;
			pushForce = 300f;
			bonusForce = Vector3.zero;
			baseDuration = 1f;
			attackStartTime = 0.2f;
			attackEndTime = 0.4f;
			baseEarlyExitTime = 0.4f;
			hitStopDuration = 0.012f;
			attackRecoil = 0.5f;
			hitHopVelocity = 4f;
			swingSoundString = "KatarinaAutoSFX";
			hitSoundString = "KatarinaImpactSFX";
			muzzleString = ((swingIndex % 2 == 0) ? "SwingLeft" : "SwingRight");
			swingEffectPrefab = Assets.swordSwingEffect;
			hitEffectPrefab = Assets.swordHitImpactEffect;
			impactSound = Assets.swordHitSoundEvent.index;
			base.OnEnter();
		}

		public override void OnExit()
		{
			base.OnExit();
		}

		protected override void OnHitEnemyAuthority()
		{
			base.OnHitEnemyAuthority();
		}

		protected override void PlayAttackAnimation()
		{
			base.PlayAttackAnimation();
		}

		protected override void PlaySwingEffect()
		{
			base.PlaySwingEffect();
		}

		protected override void SetNextState()
		{
			int num = ((swingIndex == 0) ? 1 : 0);
			((EntityState)this).outer.SetNextState((EntityState)(object)new SlashCombo
			{
				swingIndex = num
			});
		}
	}
}
namespace KatarinaMod.SkillStates.Katarina
{
	public class Voracity : GenericCharacterMain
	{
		public float duration;

		public bool attacked;

		protected float stopwatch;

		protected float baseDuration = 0.2f;

		protected float damageCoefficient = Config.voracity_damageCoefficient.Value;

		protected float procCoefficient = Config.voracity_procCoefficient.Value;

		public float damageRadius = Config.voracity_radius.Value;

		public float shunpoRecharge = Config.voracity_shunpoRecharge.Value;

		private Animator animator;

		public override void OnEnter()
		{
			((GenericCharacterMain)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			attacked = false;
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			Util.PlaySound("KatarinaVoracitySFX", ((EntityState)this).gameObject);
			animator.SetFloat("Ultimate.playbackRate", 1f);
			((EntityState)this).skillLocator.utility.RunRecharge(shunpoRecharge);
			if (((EntityState)this).isAuthority)
			{
				VoracitySpinEffect.Spawn(((EntityState)this).characterBody, damageRadius);
			}
		}

		public override void OnExit()
		{
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			((GenericCharacterMain)this).OnExit();
		}

		public override void FixedUpdate()
		{
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			((GenericCharacterMain)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			if (((EntityState)this).isAuthority)
			{
				int layerIndex = animator.GetLayerIndex("FullBody, Override");
				animator.PlayInFixedTime("Ultimate", layerIndex, stopwatch);
				animator.Update(0f);
				AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(layerIndex);
				float length = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).length;
				animator.SetFloat("Ultimate.playbackRate", length / duration);
			}
			if (!attacked)
			{
				attacked = true;
				if (NetworkServer.active)
				{
					Fire();
				}
			}
			if (stopwatch >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void Fire()
		{
			//IL_0000: 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)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: 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_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Expected O, but got Unknown
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: 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)
			foreach (HurtBox item in new SphereSearch
			{
				radius = damageRadius,
				mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask,
				origin = ((EntityState)this).transform.position
			}.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)).FilterCandidatesByDistinctHurtBoxEntities()
				.GetHurtBoxes()
				.ToList())
			{
				DaggerPickupHitEffect.Spawn(item, ((EntityState)this).transform.position);
				DamageInfo val = new DamageInfo();
				val.damage = ((BaseState)this).damageStat * damageCoefficient;
				val.attacker = ((EntityState)this).gameObject;
				val.inflictor = ((EntityState)this).gameObject;
				val.force = Vector3.zero;
				val.crit = ((BaseState)this).RollCrit();
				val.procCoefficient = procCoefficient;
				val.position = ((Component)item).gameObject.transform.position;
				val.damageType = DamageTypeCombo.op_Implicit((DamageType)131072);
				item.healthComponent.TakeDamage(val);
				GlobalEventManager.instance.OnHitEnemy(val, ((Component)item.healthComponent).gameObject);
				GlobalEventManager.instance.OnHitAll(val, ((Component)item.healthComponent).gameObject);
				Util.PlaySound("KatarinaImpactSFX", ((EntityState)this).gameObject);
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)0;
		}
	}
}
namespace KatarinaMod.SkillStates.Katarina.Weapon
{
	public class ThrowDagger : BaseSkillState
	{
		public static float damageCoefficient = Config.bouncingBlades_damageCoefficient.Value;

		public static float daggerProcCoefficient = Config.bouncingBlades_procCoefficient.Value;

		public static int maxBounceCount = Config.bouncingBlades_maxBounceCount.Value;

		public static float daggerTravelSpeed = Config.bouncingBlades_travelSpeed.Value;

		public static float daggerBounceRange = Config.bouncingBlades_bounceRange.Value;

		public static float damageCoefficientPerBounce = Config.bouncingBlades_damageCoefficientPerBounce.Value;

		public static float landingDistance = Config.bouncingBlades_landingDistance.Value;

		public float baseDuration = 0.5f;

		private HuntressTracker huntressTracker;

		private float stopwatch;

		private float duration;

		private Transform modelTransform;

		private Animator animator;

		private bool hasTriedToThrowDagger;

		private HurtBox initialOrbTarget;

		private ChildLocator childLocator;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			stopwatch = 0f;
			duration = baseDuration;
			modelTransform = ((EntityState)this).GetModelTransform();
			animator = ((EntityState)this).GetModelAnimator();
			huntressTracker = ((EntityState)this).GetComponent<HuntressTracker>();
			if (Object.op_Implicit((Object)(object)huntressTracker) && ((EntityState)this).isAuthority)
			{
				initialOrbTarget = huntressTracker.GetTrackingTarget();
			}
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				childLocator = ((Component)modelTransform).GetComponent<ChildLocator>();
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody))
			{
				((EntityState)this).characterBody.SetAimTimer(duration);
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			if (stopwatch >= duration * 0.1f && stopwatch < duration)
			{
				AttemptDagger();
			}
			if (stopwatch >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void AttemptDagger()
		{
			if (hasTriedToThrowDagger)
			{
				return;
			}
			hasTriedToThrowDagger = true;
			if (Object.op_Implicit((Object)(object)initialOrbTarget))
			{
				Animation();
				if (NetworkServer.active)
				{
					FireDaggerOrb();
				}
			}
			else if (((EntityState)this).isAuthority)
			{
				GenericSkill activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot;
				activatorSkillSlot.rechargeStopwatch += ((BaseSkillState)this).activatorSkillSlot.CalculateFinalRechargeInterval() - duration;
			}
		}

		public override void OnExit()
		{
			AttemptDagger();
			((EntityState)this).OnExit();
		}

		public void Animation()
		{
			Util.PlaySound("KatarinaQSFX", ((EntityState)this).gameObject);
			if (Config.voiceLines.Value)
			{
				Util.PlaySound("KatarinaQVO", ((EntityState)this).gameObject);
			}
			((EntityState)this).PlayAnimation("Gesture, Override", "ThrowDagger", "ThrowDagger.playbackRate", duration, 0f);
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}

		private void FireDaggerOrb()
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: 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_00ec: Unknown result type (might be due to invalid IL or missing references)
			DaggerOrb daggerOrb = new DaggerOrb();
			daggerOrb.damageValue = ((EntityState)this).characterBody.damage * damageCoefficient;
			daggerOrb.isCrit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master);
			daggerOrb.teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject);
			daggerOrb.attacker = ((EntityState)this).gameObject;
			daggerOrb.procCoefficient = daggerProcCoefficient;
			daggerOrb.bouncesRemaining = maxBounceCount;
			daggerOrb.speed = daggerTravelSpeed;
			daggerOrb.bouncedObjects = new List<HealthComponent>();
			daggerOrb.range = daggerBounceRange;
			daggerOrb.damageCoefficientPerBounce = damageCoefficientPerBounce;
			daggerOrb.tossDaggerOnArrival = true;
			daggerOrb.landingDistance = landingDistance;
			Transform val = (Object.op_Implicit((Object)(object)childLocator) ? childLocator.FindChild("R_Hand") : null);
			((Orb)daggerOrb).origin = (Object.op_Implicit((Object)(object)val) ? val.position : ((EntityState)this).characterBody.corePosition);
			((Orb)daggerOrb).target = initialOrbTarget;
			OrbManager.instance.AddOrb((Orb)(object)daggerOrb);
		}

		public override void OnSerialize(NetworkWriter writer)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			NetworkExtensions.Write(writer, HurtBoxReference.FromHurtBox(initialOrbTarget));
		}

		public override void OnDeserialize(NetworkReader reader)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			HurtBoxReference val = NetworkExtensions.ReadHurtBoxReference(reader);
			initialOrbTarget = ((HurtBoxReference)(ref val)).ResolveHurtBox();
		}
	}
}
namespace KatarinaMod.SkillStates.BaseStates
{
	public class BaseMeleeAttack : BaseSkillState
	{
		public float duration;

		public int swingIndex;

		protected Animator animator;

		protected float attackEndTime = 0.4f;

		protected float attackRecoil = 0.75f;

		protected float attackStartTime = 0.2f;

		protected float baseDuration = 1f;

		protected float baseEarlyExitTime = 0.4f;

		protected Vector3 bonusForce = Vector3.zero;

		protected bool cancelled;

		protected float damageCoefficient = 3.5f;

		protected DamageType damageType;

		protected string hitboxName = "Sword";

		protected GameObject hitEffectPrefab;

		protected float hitHopVelocity = 4f;

		protected string hitSoundString = "";

		protected float hitStopDuration = 0.012f;

		protected NetworkSoundEventIndex impactSound;

		protected bool inHitPause;

		protected string muzzleString = "SwingCenter";

		public float procCoefficient = 1f;

		protected float pushForce = 300f;

		protected float stopwatch;

		protected GameObject swingEffectPrefab;

		protected string swingSoundString = "";

		private OverlapAttack attack;

		private float earlyExitTime;

		private bool hasFired;

		private bool hasHopped;

		private float hitPauseTimer;

		private HitStopCachedState hitStopCachedState;

		private Vector3 storedVelocity;

		public override void FixedUpdate()
		{
			//IL_002f: 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_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			hitPauseTimer -= Time.fixedDeltaTime;
			if (hitPauseTimer <= 0f && inHitPause)
			{
				((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator);
				inHitPause = false;
				((EntityState)this).characterMotor.velocity = storedVelocity;
			}
			if (!inHitPause)
			{
				stopwatch += Time.fixedDeltaTime;
			}
			else
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
				{
					((EntityState)this).characterMotor.velocity = Vector3.zero;
				}
				if (Object.op_Implicit((Object)(object)animator))
				{
					animator.SetFloat("Swing.playbackRate", 0f);
				}
			}
			if (stopwatch >= duration * attackStartTime && stopwatch <= duration * attackEndTime)
			{
				FireAttack();
			}
			if (stopwatch >= duration - earlyExitTime && ((EntityState)this).isAuthority && ((EntityState)this).inputBank.skill1.down)
			{
				if (!hasFired)
				{
					FireAttack();
				}
				SetNextState();
			}
			else if (stopwatch >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}

		public override void OnDeserialize(NetworkReader reader)
		{
			((BaseSkillState)this).OnDeserialize(reader);
			swingIndex = reader.ReadInt32();
		}

		public override void OnEnter()
		{
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Expected O, but got Unknown
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			earlyExitTime = baseEarlyExitTime / ((BaseState)this).attackSpeedStat;
			hasFired = false;
			animator = ((EntityState)this).GetModelAnimator();
			((BaseState)this).StartAimMode(0.5f + duration, false);
			((EntityState)this).characterBody.outOfCombatStopwatch = 0f;
			animator.SetBool("attacking", true);
			HitBoxGroup hitBoxGroup = null;
			Transform modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName);
			}
			PlayAttackAnimation();
			attack = new OverlapAttack();
			attack.damageType = DamageTypeCombo.op_Implicit(damageType);
			attack.attacker = ((EntityState)this).gameObject;
			attack.inflictor = ((EntityState)this).gameObject;
			attack.teamIndex = ((BaseState)this).GetTeam();
			attack.damage = damageCoefficient * ((BaseState)this).damageStat;
			attack.procCoefficient = procCoefficient;
			attack.hitEffectPrefab = hitEffectPrefab;
			attack.forceVector = bonusForce;
			attack.pushAwayForce = pushForce;
			attack.hitBoxGroup = hitBoxGroup;
			attack.isCrit = ((BaseState)this).RollCrit();
			attack.impactSound = impactSound;
		}

		public override void OnExit()
		{
			if (!hasFired && !cancelled)
			{
				FireAttack();
			}
			((EntityState)this).OnExit();
			animator.SetBool("attacking", false);
		}

		public override void OnSerialize(NetworkWriter writer)
		{
			((BaseSkillState)this).OnSerialize(writer);
			writer.Write(swingIndex);
		}

		protected virtual void OnHitEnemyAuthority()
		{
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			Util.PlaySound(hitSoundString, ((EntityState)this).gameObject);
			if (!hasHopped)
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded && hitHopVelocity > 0f)
				{
					((BaseState)this).SmallHop(((EntityState)this).characterMotor, hitHopVelocity);
				}
				hasHopped = true;
			}
			if (!inHitPause && hitStopDuration > 0f)
			{
				storedVelocity = ((EntityState)this).characterMotor.velocity;
				hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "Slash.playbackRate");
				hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat;
				inHitPause = true;
			}
		}

		protected virtual void PlayAttackAnimation()
		{
			((EntityState)this).PlayCrossfade("Gesture, Override", "Slash" + (1 + swingIndex), "Slash.playbackRate", duration, 0.05f);
		}

		protected virtual void PlaySwingEffect()
		{
			EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, muzzleString, true);
		}

		protected virtual void SetNextState()
		{
			int num = ((swingIndex == 0) ? 1 : 0);
			((EntityState)this).outer.SetNextState((EntityState)(object)new BaseMeleeAttack
			{
				swingIndex = num
			});
		}

		private void FireAttack()
		{
			if (!hasFired)
			{
				hasFired = true;
				Util.PlayAttackSpeedSound(swingSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat);
				if (((EntityState)this).isAuthority)
				{
					PlaySwingEffect();
					((BaseState)this).AddRecoil(-1f * attackRecoil, -2f * attackRecoil, -0.5f * attackRecoil, 0.5f * attackRecoil);
				}
			}
			if (((EntityState)this).isAuthority && attack.Fire((List<HurtBox>)null))
			{
				OnHitEnemyAuthority();
			}
		}
	}
	internal class Death : GenericCharacterDeath
	{
		public override void FixedUpdate()
		{
			((GenericCharacterDeath)this).FixedUpdate();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)9;
		}

		public override void OnEnter()
		{
			((GenericCharacterDeath)this).OnEnter();
			Util.PlaySound("KatarinaDeath", ((EntityState)this).gameObject);
			Animator modelAnimator = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				modelAnimator.CrossFadeInFixedTime("Death", 0.1f);
			}
		}

		public override void OnExit()
		{
			((GenericCharacterDeath)this).OnExit();
		}
	}
}
namespace KatarinaMod.Skills
{
	public class ThrowDaggerSkillDef : SkillDef
	{
		protected class InstanceData : BaseSkillInstanceData
		{
			public HuntressTracker huntressTracker;
		}

		public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot)
		{
			return (BaseSkillInstanceData)(object)new InstanceData
			{
				huntressTracker = ((Component)skillSlot).GetComponent<HuntressTracker>()
			};
		}

		private static bool HasTarget([NotNull] GenericSkill skillSlot)
		{
			HuntressTracker huntressTracker = ((InstanceData)(object)skillSlot.skillInstanceData).huntressTracker;
			return Object.op_Implicit((Object)(object)(((Object)(object)huntressTracker != (Object)null) ? huntressTracker.GetTrackingTarget() : null));
		}

		public override bool CanExecute([NotNull] GenericSkill skillSlot)
		{
			if (HasTarget(skillSlot))
			{
				return ((SkillDef)this).CanExecute(skillSlot);
			}
			return false;
		}

		public override bool IsReady([NotNull] GenericSkill skillSlot)
		{
			if (((SkillDef)this).IsReady(skillSlot))
			{
				return HasTarget(skillSlot);
			}
			return false;
		}
	}
}
namespace KatarinaMod.Modules
{
	internal static class Assets
	{
		internal static GameObject bombExplosionEffect;

		internal static GameObject katarinaKnife;

		internal static Material commandoMat;

		internal static List<EffectDef> effectDefs = new List<EffectDef>();

		internal static Shader hotpoo = LegacyResourcesAPI.Load<Shader>("Shaders/Deferred/HGStandard");

		internal static AssetBundle mainAssetBundle;

		internal static List<NetworkSoundEventDef> networkSoundEventDefs = new List<NetworkSoundEventDef>();

		internal static List<GameObject> networkedObjectPrefabs = new List<GameObject>();

		internal static GameObject swordHitImpactEffect;

		internal static GameObject daggerSpinEffect;

		internal static NetworkSoundEventDef swordHitSoundEvent;

		internal static NetworkSoundEventDef daggerSoundEvent;

		internal static GameObject swordSwingEffect;

		private const string assetbundleName = "katarina";

		private static string[] assetNames = new string[0];

		public static Material CreateMaterial(string materialName, float emission, Color emissionColor, float normalStrength)
		{
			//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_0058: Expected O, but got Unknown
			Material val = (Object.op_Implicit((Object)(object)mainAssetBundle) ? mainAssetBundle.LoadAsset<Material>(materialName) : null);
			if (!Object.op_Implicit((Object)(object)val))
			{
				Debug.LogError((object)("Failed to load material: " + materialName + " - Check to see that the name in your Unity project matches the one in this code"));
				if (!Object.op_Implicit((Object)(object)hotpoo))
				{
					return null;
				}
				return new Material(hotpoo)
				{
					name = materialName
				};
			}
			return val;
		}

		public static Material CreateMaterial(string materialName)
		{
			return CreateMaterial(materialName, 0f);
		}

		public static Material CreateMaterial(string materialName, float emission)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return CreateMaterial(materialName, emission, Color.white);
		}

		public static Material CreateMaterial(string materialName, float emission, Color emissionColor)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return CreateMaterial(materialName, emission, emissionColor, 0f);
		}

		internal static void ConvertAllRenderersToHopooShader(GameObject objectToConvert)
		{
			if (!Object.op_Implicit((Object)(object)objectToConvert))
			{
				return;
			}
			MeshRenderer[] componentsInChildren = objectToConvert.GetComponentsInChildren<MeshRenderer>();
			foreach (MeshRenderer val in componentsInChildren)
			{
				if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)((Renderer)val).material))
				{
					((Renderer)val).material.shader = hotpoo;
				}
			}
			SkinnedMeshRenderer[] componentsInChildren2 = objectToConvert.GetComponentsInChildren<SkinnedMeshRenderer>();
			foreach (SkinnedMeshRenderer val2 in componentsInChildren2)
			{
				if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)((Renderer)val2).material))
				{
					((Renderer)val2).material.shader = hotpoo;
				}
			}
		}

		internal static NetworkSoundEventDef CreateNetworkSoundEventDef(string eventName)
		{
			NetworkSoundEventDef val = ScriptableObject.CreateInstance<NetworkSoundEventDef>();
			val.akId = AkSoundEngine.GetIDFromString(eventName);
			val.eventName = eventName;
			networkSoundEventDefs.Add(val);
			return val;
		}

		internal static void Initialize()
		{
			LoadAssetBundle();
			LoadSoundbank();
			PopulateAssets();
		}

		internal static void LoadAssetBundle()
		{
			if ((Object)(object)mainAssetBundle == (Object)null)
			{
				using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("KatarinaMod.katarina");
				using MemoryStream memoryStream = new MemoryStream();
				stream.CopyTo(memoryStream);
				mainAssetBundle = AssetBundle.LoadFromMemory(memoryStream.ToArray());
			}
			assetNames = mainAssetBundle.GetAllAssetNames();
		}

		internal static Texture LoadCharacterIcon(string characterName)
		{
			return mainAssetBundle.LoadAsset<Texture>("katarina_square");
		}

		internal static GameObject LoadCrosshair(string crosshairName)
		{
			if ((Object)(object)LegacyResourcesAPI.Load<GameObject>("Prefabs/Crosshair/" + crosshairName + "Crosshair") == (Object)null)
			{
				return LegacyResourcesAPI.Load<GameObject>("Prefabs/Crosshair/StandardCrosshair");
			}
			return LegacyResourcesAPI.Load<GameObject>("Prefabs/Crosshair/" + crosshairName + "Crosshair");
		}

		internal static void LoadSoundbank()
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("KatarinaMod.Katarina.bnk");
			byte[] array = new byte[stream.Length];
			stream.Read(array, 0, array.Length);
			SoundBanks.Add(array);
		}

		internal static void PopulateAssets()
		{
			if (!Object.op_Implicit((Object)(object)mainAssetBundle))
			{
				Debug.LogError((object)"There is no AssetBundle to load assets from.");
				return;
			}
			swordHitSoundEvent = CreateNetworkSoundEventDef("KatarinaSwordHit");
			daggerSoundEvent = CreateNetworkSoundEventDef("KatarinaSwordHit");
			swordSwingEffect = LoadEffect("HenrySwordSwingEffect", parentToTransform: true);
			swordHitImpactEffect = LoadEffect("ImpactHenrySlash");
			katarinaKnife = mainAssetBundle.LoadAsset<GameObject>("KatarinaWeapon");
			katarinaKnife.AddComponent<DestroyOnTimer>().duration = 6f;
			katarinaKnife.AddComponent<NetworkIdentity>();
			PrefabAPI.RegisterNetworkPrefab(katarinaKnife);
			networkedObjectPrefabs.Add(katarinaKnife);
			VoracitySpinEffect.CreatePrefab();
			DaggerPickupHitEffect.CreatePrefab();
			DaggerOrbEffect.CreatePrefab();
			DaggerLandingPreview.CreatePrefab();
		}

		internal static RendererInfo[] SetupRendererInfos(GameObject obj)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			MeshRenderer[] componentsInChildren = obj.GetComponentsInChildren<MeshRenderer>();
			RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[componentsInChildren.Length];
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				array[i] = new RendererInfo
				{
					defaultMaterial = ((Renderer)componentsInChildren[i]).material,
					renderer = (Renderer)(object)componentsInChildren[i],
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				};
			}
			return array;
		}

		internal static void AddNewEffectDef(GameObject effectPrefab)
		{
			AddNewEffectDef(effectPrefab, "");
		}

		private static void AddNewEffectDef(GameObject effectPrefab, string soundName)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			EffectDef val = new EffectDef();
			val.prefab = effectPrefab;
			val.prefabEffectComponent = effectPrefab.GetComponent<EffectComponent>();
			val.prefabName = ((Object)effectPrefab).name;
			val.prefabVfxAttributes = effectPrefab.GetComponent<VFXAttributes>();
			val.spawnSoundEventName = soundName;
			effectDefs.Add(val);
		}

		private static GameObject CreateTracer(string originalTracerName, string newTracerName)
		{
			if ((Object)(object)LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/" + originalTracerName) == (Object)null)
			{
				return null;
			}
			GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/" + originalTracerName), newTracerName, true);
			if (!Object.op_Implicit((Object)(object)val.GetComponent<EffectComponent>()))
			{
				val.AddComponent<EffectComponent>();
			}
			if (!Object.op_Implicit((Object)(object)val.GetComponent<VFXAttributes>()))
			{
				val.AddComponent<VFXAttributes>();
			}
			if (!Object.op_Implicit((Object)(object)val.GetComponent<NetworkIdentity>()))
			{
				val.AddComponent<NetworkIdentity>();
			}
			val.GetComponent<Tracer>().speed = 250f;
			val.GetComponent<Tracer>().length = 50f;
			AddNewEffectDef(val);
			return val;
		}

		private static GameObject LoadEffect(string resourceName)
		{
			return LoadEffect(resourceName, "", parentToTransform: false);
		}

		private static GameObject LoadEffect(string resourceName, string soundName)
		{
			return LoadEffect(resourceName, soundName, parentToTransform: false);
		}

		private static GameObject LoadEffect(string resourceName, bool parentToTransform)
		{
			return LoadEffect(resourceName, "", parentToTransform);
		}

		private static GameObject LoadEffect(string resourceName, string soundName, bool parentToTransform)
		{
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			bool flag = false;
			for (int i = 0; i < assetNames.Length; i++)
			{
				if (assetNames[i].Contains(resourceName.ToLower()))
				{
					flag = true;
					i = assetNames.Length;
				}
			}
			if (!flag)
			{
				Debug.LogError((object)("Failed to load effect: " + resourceName + " because it does not exist in the AssetBundle"));
				return null;
			}
			GameObject obj = mainAssetBundle.LoadAsset<GameObject>(resourceName);
			obj.AddComponent<DestroyOnTimer>().duration = 12f;
			obj.AddComponent<NetworkIdentity>();
			obj.AddComponent<VFXAttributes>().vfxPriority = (VFXPriority)2;
			EffectComponent obj2 = obj.AddComponent<EffectComponent>();
			obj2.applyScale = false;
			obj2.effectIndex = (EffectIndex)(-1);
			obj2.parentToReferencedTransform = parentToTransform;
			obj2.positionAtReferencedTransform = true;
			obj2.soundName = soundName;
			AddNewEffectDef(obj, soundName);
			return obj;
		}
	}
	public static class Buffs
	{
		internal static BuffDef armorBuff;

		internal static List<BuffDef> buffDefs = new List<BuffDef>();

		internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			BuffDef val = ScriptableObject.CreateInstance<BuffDef>();
			((Object)val).name = buffName;
			val.buffColor = buffColor;
			val.canStack = canStack;
			val.isDebuff = isDebuff;
			val.eliteDef = null;
			val.iconSprite = buffIcon;
			buffDefs.Add(val);
			return val;
		}

		internal static void RegisterBuffs()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			armorBuff = AddNewBuff("KatarinaArmorBuff", LegacyResourcesAPI.Load<Sprite>("Textures/BuffIcons/texBuffGenericShield"), Color.white, canStack: false, isDebuff: false);
		}
	}
	public static class Config
	{
		public static ConfigEntry<float> armorGrowth;

		public static ConfigEntry<float> baseArmor;

		public static ConfigEntry<float> baseCrit;

		public static ConfigEntry<float> baseDamage;

		public static ConfigEntry<float> baseHealth;

		public static ConfigEntry<float> baseMovementSpeed;

		public static ConfigEntry<float> baseRegen;

		public static ConfigEntry<float> bonusHealthCoefficient;

		public static ConfigEntry<float> damageGrowth;

		public static ConfigEntry<int> jumpCount;

		public static ConfigEntry<float> regenGrowth;

		public static ConfigEntry<float> healthGrowth;

		public static ConfigEntry<float> voracity_damageCoefficient;

		public static ConfigEntry<float> voracity_procCoefficient;

		public static ConfigEntry<float> voracity_radius;

		public static ConfigEntry<float> voracity_shunpoRecharge;

		public static ConfigEntry<float> bouncingBlades_damageCoefficient;

		public static ConfigEntry<float> bouncingBlades_coolDown;

		public static ConfigEntry<float> bouncingBlades_damageCoefficientPerBounce;

		public static ConfigEntry<float> bouncingBlades_procCoefficient;

		public static ConfigEntry<int> bouncingBlades_maxBounceCount;

		public static ConfigEntry<float> bouncingBlades_bounceRange;

		public static ConfigEntry<float> bouncingBlades_travelSpeed;

		public static ConfigEntry<float> bouncingBlades_landingDistance;

		public static ConfigEntry<float> basicAttack_damageCoefficient;

		public static ConfigEntry<float> basicAttack_procCoefficient;

		public static ConfigEntry<float> deathLotus_procCoefficient;

		public static ConfigEntry<float> deathLotus_coolDown;

		public static ConfigEntry<float> deathLotus_damageCoefficient;

		public static ConfigEntry<float> deathLotus_radius;

		public static ConfigEntry<float> shunpo_coolDown;

		public static ConfigEntry<float> shunpo_damageCoefficient;

		public static ConfigEntry<float> shunpo_procCoefficient;

		public static ConfigEntry<bool> voiceLines;

		public static void ReadConfig()
		{
			//IL_0014: 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_002f: Expected O, but got Unknown
			//IL_002f: Expected O, but got Unknown
			//IL_0048: 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_0067: Expected O, but got Unknown
			//IL_0067: Expected O, but got Unknown
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Expected O, but got Unknown
			//IL_009f: Expected O, but got Unknown
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Expected O, but got Unknown
			//IL_00d7: Expected O, but got Unknown
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Expected O, but got Unknown
			//IL_010f: Expected O, but got Unknown
			//IL_0128: 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_0147: Expected O, but got Unknown
			//IL_0147: Expected O, but got Unknown
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Expected O, but got Unknown
			//IL_017f: Expected O, but got Unknown
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Expected O, but got Unknown
			//IL_01b7: Expected O, but got Unknown
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Expected O, but got Unknown
			//IL_01ef: Expected O, but got Unknown
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Expected O, but got Unknown
			//IL_0227: Expected O, but got Unknown
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Expected O, but got Unknown
			//IL_025f: Expected O, but got Unknown
			//IL_0278: Unknown result type (might be due to invalid IL or missing references)
			//IL_0289: Unknown result type (might be due to invalid IL or missing references)
			//IL_0293: Expected O, but got Unknown
			//IL_0293: Expected O, but got Unknown
			//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cb: Expected O, but got Unknown
			//IL_02cb: Expected O, but got Unknown
			//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Expected O, but got Unknown
			//IL_0303: Expected O, but got Unknown
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0331: Unknown result type (might be due to invalid IL or missing references)
			//IL_033b: Expected O, but got Unknown
			//IL_033b: Expected O, but got Unknown
			//IL_0354: Unknown result type (might be due to invalid IL or missing references)
			//IL_0369: Unknown result type (might be due to invalid IL or missing references)
			//IL_0373: Expected O, but got Unknown
			//IL_0373: Expected O, but got Unknown
			//IL_038c: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ab: Expected O, but got Unknown
			//IL_03ab: Expected O, but got Unknown
			//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e3: Expected O, but got Unknown
			//IL_03e3: Expected O, but got Unknown
			//IL_03fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0411: Unknown result type (might be due to invalid IL or missing references)
			//IL_041b: Expected O, but got Unknown
			//IL_041b: Expected O, but got Unknown
			//IL_0434: Unknown result type (might be due to invalid IL or missing references)
			//IL_0449: Unknown result type (might be due to invalid IL or missing references)
			//IL_0453: Expected O, but got Unknown
			//IL_0453: Expected O, but got Unknown
			//IL_046c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0481: Unknown result type (might be due to invalid IL or missing references)
			//IL_048b: Expected O, but got Unknown
			//IL_048b: Expected O, but got Unknown
			//IL_04a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bf: Expected O, but got Unknown
			//IL_04bf: Expected O, but got Unknown
			//IL_04d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f7: Expected O, but got Unknown
			//IL_04f7: Expected O, but got Unknown
			//IL_0510: Unknown result type (might be due to invalid IL or missing references)
			//IL_0525: Unknown result type (might be due to invalid IL or missing references)
			//IL_052f: Expected O, but got Unknown
			//IL_052f: Expected O, but got Unknown
			//IL_0548: Unknown result type (might be due to invalid IL or missing references)
			//IL_055d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0567: Expected O, but got Unknown
			//IL_0567: Expected O, but got Unknown
			//IL_0580: Unknown result type (might be due to invalid IL or missing references)
			//IL_0595: Unknown result type (might be due to invalid IL or missing references)
			//IL_059f: Expected O, but got Unknown
			//IL_059f: Expected O, but got Unknown
			//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d7: Expected O, but got Unknown
			//IL_05d7: Expected O, but got Unknown
			//IL_05f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0605: Unknown result type (might be due to invalid IL or missing references)
			//IL_060f: Expected O, but got Unknown
			//IL_060f: Expected O, but got Unknown
			//IL_0628: Unknown result type (might be due to invalid IL or missing references)
			//IL_063d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0647: Expected O, but got Unknown
			//IL_0647: Expected O, but got Unknown
			//IL_0660: Unknown result type (might be due to invalid IL or missing references)
			//IL_0675: Unknown result type (might be due to invalid IL or missing references)
			//IL_067f: Expected O, but got Unknown
			//IL_067f: Expected O, but got Unknown
			//IL_0698: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b7: Expected O, but got Unknown
			//IL_06b7: Expected O, but got Unknown
			//IL_06d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ef: Expected O, but got Unknown
			//IL_06ef: Expected O, but got Unknown
			//IL_0708: Unknown result type (might be due to invalid IL or missing references)
			//IL_071d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0727: Expected O, but got Unknown
			//IL_0727: Expected O, but got Unknown
			voiceLines = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<bool>(new ConfigDefinition("00 - Other", "Voice Lines"), true, new ConfigDescription("Enable Voice Lines", (AcceptableValueBase)null, Array.Empty<object>()));
			baseHealth = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Base Health"), 101f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			healthGrowth = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Health Growth"), 33f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			baseRegen = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Base Health Regen"), 1.5f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			regenGrowth = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Health Regen Growth"), 0.2f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			baseArmor = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Base Armor"), 20f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			armorGrowth = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Armor Growth"), 0f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			baseDamage = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Base Damage"), 12f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			damageGrowth = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Damage Growth"), 2.4f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			baseMovementSpeed = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Base Movement Speed"), 7f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			baseCrit = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Base Crit"), 1f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			jumpCount = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<int>(new ConfigDefinition("01 - Character Stats", "Jump Count"), 2, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			voracity_damageCoefficient = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("02 - Voracity Passive", "Damage Coefficient"), 4.5f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			voracity_procCoefficient = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("02 - Voracity Passive", "Proc Coefficient"), 1f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			voracity_radius = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("02 - Voracity Passive", "Radius"), 15f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			voracity_shunpoRecharge = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("02 - Voracity Passive", "Shunpo Recharge"), 6f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			basicAttack_damageCoefficient = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("03 - Basic Attack", "Damage Coefficient"), 2.8f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			basicAttack_procCoefficient = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("03 - Basic Attack", "Proc Coefficient"), 1f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			bouncingBlades_damageCoefficient = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("04 - Bouncing Blades", "Damage Coefficient"), 3.2f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			bouncingBlades_damageCoefficientPerBounce = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("04 - Bouncing Blades", "Damage Coefficient Per Bounce"), 1f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			bouncingBlades_procCoefficient = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("04 - Bouncing Blades", "Proc Coefficient"), 1f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			bouncingBlades_maxBounceCount = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<int>(new ConfigDefinition("04 - Bouncing Blades", "Bounce Count"), 2, new ConfigDescription("Extra enemies the dagger bounces to after the first target (League: 2)", (AcceptableValueBase)null, Array.Empty<object>()));
			bouncingBlades_bounceRange = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("04 - Bouncing Blades", "Bounce Radius (m)"), 5f, new ConfigDescription("How far (metres) the dagger looks for the next enemy to bounce to. Only the nearest unhit enemy in line of sight is picked.", (AcceptableValueBase)null, Array.Empty<object>()));
			bouncingBlades_coolDown = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("04 - Bouncing Blades", "Cooldown"), 4f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			bouncingBlades_travelSpeed = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("04 - Bouncing Blades", "Travel Speed"), 120f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			bouncingBlades_landingDistance = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("04 - Bouncing Blades", "Dagger Landing Distance (m)"), 3f, new ConfigDescription("How far behind the last enemy hit the dagger lands, in metres, on the far side from Katarina", (AcceptableValueBase)null, Array.Empty<object>()));
			deathLotus_damageCoefficient = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("05 - Death Lotus", "Damage Coefficient"), 2f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			deathLotus_procCoefficient = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("05 - Death Lotus", "Proc Coefficient"), 0.25f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			deathLotus_coolDown = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("05 - Death Lotus", "Cooldown"), 12f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			deathLotus_radius = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("05 - Death Lotus", "Radius"), 30f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			shunpo_coolDown = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("06 - Shunpo", "Cooldown"), 6f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			shunpo_damageCoefficient = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("06 - Shunpo", "Damage Coefficient"), 2f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
			shunpo_procCoefficient = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("06 - Shunpo", "Proc Coefficient"), 1f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		}

		internal static ConfigEntry<bool> CharacterEnableConfig(string characterName)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_002b: Expected O, but got Unknown
			return ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<bool>(new ConfigDefinition(characterName, "Enabled"), true, new ConfigDescription("Set to false to disable this character", (AcceptableValueBase)null, Array.Empty<object>()));
		}

		internal static ConfigEntry<bool> EnemyEnableConfig(string characterName)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_002b: Expected O, but got Unknown
			return ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<bool>(new ConfigDefinition(characterName, "Enabled"), true, new ConfigDescription("Set to false to disable this enemy", (AcceptableValueBase)null, Array.Empty<object>()));
		}
	}
	internal class ContentPacks : IContentPackProvider
	{
		internal ContentPack contentPack = new ContentPack();

		public string identifier => "com.Lemonlust.KatarinaMod";

		public IEnumerator FinalizeAsync(FinalizeAsyncArgs args)
		{
			args.ReportProgress(1f);
			yield break;
		}

		public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args)
		{
			ContentPack.Copy(contentPack, args.output);
			args.ReportProgress(1f);
			yield break;
		}

		public void Initialize()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager