public static AIHeroClient GetKillStealTarget(this Spell.SpellBase spell, float dmg = 0, DamageType damageType = DamageType.Mixed) { if (dmg > 0) { return(EntityManager.Heroes.Enemies.OrderBy(TargetSelector.GetPriority).FirstOrDefault(t => t.IsKillable(spell.Range) && Player.Instance.CalculateDamageOnUnit(t, damageType, dmg) > spell.GetHealthPrediction(t))); } return(spell.GetKillStealTargets().FirstOrDefault(o => o.IsKillable(spell.Range))); }
public static AIHeroClient GetKillStealTarget(this Spell.SpellBase spell) { return(spell.GetKillStealTargets().FirstOrDefault(o => o.IsKillable(spell.Range))); }