public static CountHerosInRange ( AIHeroClient target, bool checkteam, float range = 1200f ) : int | ||
target | AIHeroClient | |
checkteam | bool | |
range | float | |
return | int |
public static int CountHerosInRange(AIHeroClient target, bool checkteam, float range = 1200f)
{
var objListTeam =
ObjectManager.Get<AIHeroClient>()
.Where(
x => x.IsValidTarget(range));
return objListTeam.Count(hero => checkteam ? hero.Team != target.Team : hero.Team == target.Team);
}