Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of KatarinaMod v1.8.1
LemonKatarinaMod.dll
Decompiled a year ago
The result has been truncated due to the large size, download it to view full contents!
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 BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Huntress; using EntityStates.Huntress.HuntressWeapon; using HG; using HG.Reflection; using IL.RoR2; using JetBrains.Annotations; using KatarinaMod.Modules; 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.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.Networking; using UnityEngine.Rendering; [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.8.1.0")] [assembly: AssemblyInformationalVersion("1.8.1+d7e1c7ed455d9bbcacb2f5a9cae3ffe10207bbcb")] [assembly: AssemblyProduct("LemonKatarinaMod")] [assembly: AssemblyTitle("LemonKatarinaMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.8.1.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.8.1")] 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.8.1"; 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(); Buffs.RegisterBuffs(); Projectiles.RegisterProjectiles(); Tokens.AddTokens(); new MyCharacter().Initialize(); new ContentPacks().Initialize(); ContentManager.onContentPacksAssigned += LateSetup; Hook(); } catch (Exception ex) { Logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } 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); } } } private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj) { } } 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 = 20f; public float damageCoefficientPerBounce = 1f; public int targetsToFindPerBounce = 1; public DamageType damageType; private bool canBounceOnSameTarget; private bool failedToKill; private bool tossed; private BullseyeSearch search; private GameObject weaponInstance; private EntityStateMachine outer; public static event Action<DaggerOrb, CharacterBody> onDaggerOrbArrival; public override void Begin() { //IL_001a: 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / speed; canBounceOnSameTarget = false; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OrbEffects/HuntressGlaiveOrbEffect"), val, true); } public override void OnArrival() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0052: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_017d: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)base.target)) { return; } HealthComponent healthComponent = base.target.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent)) { DamageInfo val = new DamageInfo(); val.damage = damageValue; val.attacker = attacker; val.inflictor = inflictor; val.force = Vector3.zero; val.crit = isCrit; val.procChainMask = procChainMask; val.procCoefficient = procCoefficient; val.position = ((Component)base.target).transform.position; val.damageColorIndex = damageColorIndex; val.damageType = DamageTypeCombo.op_Implicit(damageType); healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)healthComponent).gameObject); GlobalEventManager.instance.OnHitAll(val, ((Component)healthComponent).gameObject); CharacterBody component = attacker.gameObject.GetComponent<CharacterBody>(); if (!tossed) { tossed = true; Action<DaggerOrb, CharacterBody> action = DaggerOrb.onDaggerOrbArrival; if (action == null) { return; } action(this, component); } } failedToKill |= !Object.op_Implicit((Object)(object)healthComponent) || healthComponent.alive; if (bouncesRemaining <= 0) { return; } for (int i = 0; i < targetsToFindPerBounce; i++) { if (bouncedObjects != null) { if (canBounceOnSameTarget) { bouncedObjects.Clear(); } bouncedObjects.Add(base.target.healthComponent); } HurtBox val2 = PickNextTarget(((Component)base.target).transform.position); if (Object.op_Implicit((Object)(object)val2)) { DaggerOrb daggerOrb = new DaggerOrb(); daggerOrb.search = search; ((Orb)daggerOrb).origin = ((Component)base.target).transform.position; ((Orb)daggerOrb).target = val2; 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.failedToKill = failedToKill; OrbManager.instance.AddOrb((Orb)(object)daggerOrb); } } } 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_0068: 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 = false; search.sortMode = (SortMode)1; search.maxDistanceFilter = range; search.RefreshCandidates(); HurtBox val = (from v in search.GetResults() where !bouncedObjects.Contains(v.healthComponent) select v).FirstOrDefault(); 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 contactNormal; private Vector3 contactPosition; private Vector3 transformPositionWhenContacted; private float stopwatchSinceStuck; public AnimationCurve embedDistanceCurve; 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) 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); } private void OnTriggerEnter(Collider other) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_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) CharacterBody component = ((Component)other).GetComponent<CharacterBody>(); if (!Object.op_Implicit((Object)(object)component) || component?.bodyIndex != (BodyIndex?)BodyCatalog.FindBodyIndex("Katarina")) { return; } EntityStateMachine component2 = ((Component)component).GetComponent<EntityStateMachine>(); if (Object.op_Implicit((Object)(object)component2)) { alive = false; if (Util.HasEffectiveAuthority(component2.networkIdentity)) { component2.SetNextState((EntityState)(object)new Voracity()); } Object.Destroy((Object)(object)((Component)this).gameObject); } } private void Update() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (stuck) { stopwatchSinceStuck += Time.deltaTime; ((Component)this).transform.position = transformPositionWhenContacted; } } private void FixedUpdate() { //IL_0039: 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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) stopwatch += Time.fixedDeltaTime; 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_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) //IL_0070: 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_00a4: 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; ContactPoint contact = collision.GetContact(0); contactNormal = ((ContactPoint)(ref contact)).normal; contactPosition = ((ContactPoint)(ref contact)).point; 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; private readonly BullseyeSearch search = new BullseyeSearch(); private HurtBox trackingTarget; private Rigidbody rb; 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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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_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_0035: 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_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_00b6: 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_00ed: 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) //IL_0101: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } new List<HurtBox>(); 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 { damageValue = ((EntityState)this).characterBody.damage * damageCoefficient, isCrit = ((BaseState)this).RollCrit(), teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject), attacker = ((EntityState)this).gameObject, procCoefficient = procCoefficient }; HurtBox val = item; if (Object.op_Implicit((Object)(object)val)) { ((Orb)knifeDamageOrb).origin = ((EntityState)this).transform.position + ((EntityState)this).transform.up * 0.8f; ((Orb)knifeDamageOrb).target = val; 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 = default(FireProjectileInfo); val.projectilePrefab = Projectiles.knifePrefab; val.position = location + Vector3.up * 2f; val.rotation = Quaternion.identity; val.owner = ((EntityState)this).gameObject; val.damage = 0f; val.force = 0f; val.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 Transform indicatorInstance; 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 (!Object.op_Implicit((Object)(object)indicatorInstance)) { CreateIndicator(); } } public override void OnExit() { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); if (Object.op_Implicit((Object)(object)indicatorInstance)) { EntityState.Destroy((Object)(object)((Component)indicatorInstance).gameObject); } ((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 (!Object.op_Implicit((Object)(object)indicatorInstance)) { CreateIndicator(); } UpdateIndicator(); if (!attacked) { attacked = true; if (NetworkServer.active) { Fire(); } } if (stopwatch >= duration && ((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)indicatorInstance)) { EntityState.Destroy((Object)(object)((Component)indicatorInstance).gameObject); } ((EntityState)this).outer.SetNextStateToMain(); } } private void CreateIndicator() { //IL_0027: 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_0052: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab)) { indicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab).transform; indicatorInstance.localScale = Vector3.one * damageRadius; ((Component)indicatorInstance).transform.position = ((EntityState)this).gameObject.transform.position; } } private void Fire() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) new List<HurtBox>(); 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()) { 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); } } private void UpdateIndicator() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)indicatorInstance)) { ((Component)indicatorInstance).transform.position = ((EntityState)this).gameObject.transform.position; } } 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 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; private bool hasSuccessfullyThrownDagger; private bool tossed; public override void OnEnter() { ((BaseState)this).OnEnter(); stopwatch = 0f; duration = baseDuration; modelTransform = ((EntityState)this).GetModelTransform(); animator = ((EntityState)this).GetModelAnimator(); huntressTracker = ((EntityState)this).GetComponent<HuntressTracker>(); DaggerOrb.onDaggerOrbArrival += DaggerOrb_onDaggerOrbArrival; 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); } } private void DaggerOrb_onDaggerOrbArrival(DaggerOrb obj, CharacterBody body) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) if (obj != null && !((Object)(object)body != (Object)(object)((EntityState)this).characterBody) && !tossed) { TossDagger(((Component)((Orb)obj).target).transform.position); } } 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 = default(FireProjectileInfo); val.projectilePrefab = Projectiles.knifePrefab; val.position = location + Vector3.up * 2f; val.rotation = Quaternion.identity; val.owner = ((EntityState)this).gameObject; val.damage = 0f; val.force = 0f; val.crit = false; ((FireProjectileInfo)(ref val)).speedOverride = 0f; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); tossed = true; } } 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) { FireOrbGlaive(); if (hasSuccessfullyThrownDagger) { Animation(); } if (((EntityState)this).isAuthority && hasTriedToThrowDagger && !hasSuccessfullyThrownDagger) { GenericSkill activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; activatorSkillSlot.rechargeStopwatch += ((BaseSkillState)this).activatorSkillSlot.CalculateFinalRechargeInterval() - duration; } } } public override void OnExit() { AttemptDagger(); DaggerOrb.onDaggerOrbArrival -= DaggerOrb_onDaggerOrbArrival; ((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 FireOrbGlaive() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_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) hasTriedToThrowDagger = true; 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; HurtBox val = initialOrbTarget; if (Object.op_Implicit((Object)(object)val)) { hasSuccessfullyThrownDagger = true; Transform val2 = childLocator.FindChild("R_Hand"); EffectManager.SimpleMuzzleFlash(ThrowGlaive.muzzleFlashPrefab, ((EntityState)this).gameObject, "R_Hand", true); ((Orb)daggerOrb).origin = val2.position; ((Orb)daggerOrb).target = val; 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)7; } 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 = Resources.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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)commandoMat)) { commandoMat = Resources.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody").GetComponentInChildren<CharacterModel>().baseRendererInfos[0].defaultMaterial; } Material val = Object.Instantiate<Material>(commandoMat); Material val2 = mainAssetBundle.LoadAsset<Material>(materialName); if (!Object.op_Implicit((Object)(object)val2)) { Debug.LogError((object)("Failed to load material: " + materialName + " - Check to see that the name in your Unity project matches the one in this code")); return commandoMat; } ((Object)val).name = materialName; val.SetColor("_Color", val2.GetColor("_Color")); val.SetTexture("_MainTex", val2.GetTexture("_MainTex")); val.SetColor("_EmColor", emissionColor); val.SetFloat("_EmPower", emission); val.SetTexture("_EmTex", val2.GetTexture("_EmissionMap")); val.SetFloat("_NormalStrength", normalStrength); return val2; } 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"); mainAssetBundle = AssetBundle.LoadFromStream(stream); } assetNames = mainAssetBundle.GetAllAssetNames(); } internal static Texture LoadCharacterIcon(string characterName) { return mainAssetBundle.LoadAsset<Texture>("katarina_square"); } internal static GameObject LoadCrosshair(string crosshairName) { if ((Object)(object)Resources.Load<GameObject>("Prefabs/Crosshair/" + crosshairName + "Crosshair") == (Object)null) { return Resources.Load<GameObject>("Prefabs/Crosshair/StandardCrosshair"); } return Resources.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); } 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; } private 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)Resources.Load<GameObject>("Prefabs/Effects/Tracers/" + originalTracerName) == (Object)null) { return null; } GameObject val = PrefabAPI.InstantiateClone(Resources.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", Resources.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> 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 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", "Max Bounce Count"), 4, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); bouncingBlades_bounceRange = ((BaseUnityPlugin)KatarinaPlugin.instance).Config.Bind<float>(new ConfigDefinition("04 - Bouncing Blades", "Bounce Range"), 20f, new ConfigDescription("", (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>())); 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_collectContentPackProviders); } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; contentPack.bodyPrefabs.Add(Prefabs.bodyPrefabs.ToArray()); contentPack.buffDefs.Add(Buffs.buffDefs.ToArray()); contentPack.effectDefs.Add(Assets.effectDefs.ToArray()); contentPack.entityStateTypes.Add(States.entityStates.ToArray()); contentPack.masterPrefabs.Add(Prefabs.masterPrefabs.ToArray()); contentPack.networkSoundEventDefs.Add(Assets.networkSoundEventDefs.ToArray()); contentPack.projectilePrefabs.Add(Prefabs.projectilePrefabs.ToArray()); contentPack.skillDefs.Add(Skills.skillDefs.ToArray()); contentPack.skillFamilies.Add(Skills.skillFamilies.ToArray()); contentPack.survivorDefs.Add(Prefabs.survivorDefinitions.ToArray()); contentPack.networkedObjectPrefabs.Add(Assets.networkedObjectPrefabs.ToArray()); contentPack.unlockableDefs.Add(Unlockables.unlockableDefs.ToArray()); args.ReportProgress(1f); yield break; } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } } internal static class ArrayHelper { public static T[] Append<T>(ref T[] array, List<T> list) { int num = array.Length; int count = list.Count; Array.Resize(ref array, num + count); list.CopyTo(array, num); return array; } public static Func<T[], T[]> AppendDel<T>(List<T> list) { return (T[] r) => Append(ref r, list); } } internal static class Helpers { public static T[] Append<T>(ref T[] array, List<T> list) { int num = array.Length; int count = list.Count; Array.Resize(ref array, num + count); list.CopyTo(array, num); return array; } public static Func<T[], T[]> AppendDel<T>(List<T> list) { return (T[] r) => Append(ref r, list); } internal static string ScepterDescription(string desc) { return "\n<color=#d299ff>SCEPTER: " + desc + "</color>"; } } internal static class ItemDisplays { private static Dictionary<string, GameObject> itemDisplayPrefabs = new Dictionary<string, GameObject>(); internal static GameObject LoadDisplay(string name) { if (itemDisplayPrefabs.ContainsKey(name.ToLower()) && Object.op_Implicit((Object)(object)itemDisplayPrefabs[name.ToLower()])) { return itemDisplayPrefabs[name.ToLower()]; } return null; } internal static void PopulateDisplays() { PopulateFromBody("Commando"); PopulateFromBody("Croco"); PopulateFromBody("Mage"); } private static void PopulateFromBody(string bodyName) { KeyAssetRuleGroup[] keyAssetRuleGroups = ((Component)Resources.Load<GameObject>("Prefabs/CharacterBodies/" + bodyName + "Body").GetComponent<ModelLocator>().modelTransform).GetComponent<CharacterModel>().itemDisplayRuleSet.keyAssetRuleGroups; for (int i = 0; i < keyAssetRuleGroups.Length; i++) { ItemDisplayRule[] rules = keyAssetRuleGroups[i].displayRuleGroup.rules; for (int j = 0; j < rules.Length; j++) { GameObject followerPrefab = rules[j].followerPrefab; if (Object.op_Implicit((Object)(object)followerPrefab)) { string key = ((Object)followerPrefab).name?.ToLower(); if (!itemDisplayPrefabs.ContainsKey(key)) { itemDisplayPrefabs[key] = followerPrefab; } } } } } } internal static class Prefabs { internal static List<GameObject> bodyPrefabs = new List<GameObject>(); internal static List<GameObject> masterPrefabs = new List<GameObject>(); internal static List<GameObject> projectilePrefabs = new List<GameObject>(); internal static List<SurvivorDef> survivorDefinitions = new List<SurvivorDef>(); private static PhysicMaterial ragdollMaterial; internal static GameObject CreateDisplayPrefab(string modelName, GameObject prefab, BodyInfo bodyInfo) { if (!Object.op_Implicit((Object)(object)Resources.Load<GameObject>("Prefabs/CharacterBodies/" + bodyInfo.bodyNameToClone + "Body"))) { Debug.LogError((object)(bodyInfo.bodyNameToClone + "Body is not a valid body, character creation failed")); return null; } GameObject obj = PrefabAPI.InstantiateClone(Resources.Load<GameObject>("Prefabs/CharacterBodies/" + bodyInfo.bodyNameToClone + "Body"), modelName + "Prefab"); GameObject val = CreateModel(obj, modelName); SetupModel(obj, val.transform, bodyInfo); val.AddComponent<CharacterModel>().baseRendererInfos = prefab.GetComponentInChildren<CharacterModel>().baseRendererInfos; Assets.ConvertAllRenderersToHopooShader(val); return val.gameObject; } internal static void CreateGenericDoppelganger(GameObject bodyPrefab, string masterName, string masterToCopy) { GameObject val = PrefabAPI.InstantiateClone(Resources.Load<GameObject>("Prefabs/CharacterMasters/" + masterToCopy + "MonsterMaster"), masterName, true); val.GetComponent<CharacterMaster>().bodyPrefab = bodyPrefab; masterPrefabs.Add(val); } internal static GameObject CreatePrefab(string bodyName, string modelName, BodyInfo bodyInfo) { //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)Resources.Load<GameObject>("Prefabs/CharacterBodies/" + bodyInfo.bodyNameToClone + "Body"))) { Debug.LogError((object)(bodyInfo.bodyNameToClone + "Body is not a valid body, character creation failed")); return null; } GameObject val = PrefabAPI.InstantiateClone(Resources.Load<GameObject>("Prefabs/CharacterBodies/" + bodyInfo.bodyNameToClone + "Body"), bodyName); Transform val2 = null; GameObject val3 = null; if (modelName != "mdl") { val3 = CreateModel(val, modelName); if ((Object)(object)val3 == (Object)null) { val3 = ((Component)val.GetComponentInChildren<CharacterModel>()).gameObject; } val2 = Setup