private static bool HasTarget([NotNull] GenericSkill skillSlot) { //Grab the tracker MercSlashportTracker mercTracker = ((MercSlashportDef.InstanceData)skillSlot.skillInstanceData).mercTracker; //Return true of there is a target return(mercTracker?.GetTrackingTarget()); }
public override void OnEnter() { base.OnEnter(); { //This keeps the duration being too low and messing shit up this.findMax = new float[] { 0.4f / base.attackSpeedStat, 0.1f }; //Grab the tracker this.mercTracker = base.GetComponent <MercSlashportTracker>(); //Get the target hitbox this.targetBox = this.mercTracker.trackingTarget; //If the target still exists if (this.targetBox.healthComponent.alive && targetBox) { //Handle overlay shit HandleOverlay(); //Setup fx data EffectData effectData = new EffectData { rotation = Util.QuaternionSafeLookRotation(this.inputBank.aimDirection), origin = base.characterBody.corePosition }; //Play the blink fx EffectManager.SpawnEffect(EvisDash.blinkPrefab, effectData, false); //Play the sound Util.PlaySound(EvisDash.beginSoundString, base.gameObject); //Stop the movement during the cast base.characterMotor.walkSpeedPenaltyCoefficient = 0f; base.characterMotor.velocity = Vector3.zero; //Pop the player in the air base.SmallHop(base.characterMotor, 5f); //Handle the calculations HandleTeleport(); //Check network if (base.isAuthority) { //Fire off first micro attack, no damage but applies expose and stuns them for the damage new BlastAttack { position = this.targetBox.transform.position, baseDamage = 0f, baseForce = 0f, radius = 0.5f, attacker = base.gameObject, inflictor = base.gameObject, teamIndex = base.teamComponent.teamIndex, crit = false, procChainMask = default,