Core/AI: Added new method for search friendly targets with certain entry and hp pct below a value

This commit is contained in:
hondacrx
2018-03-11 14:47:19 -04:00
parent 0775ef9c97
commit 5e571794bf
3 changed files with 36 additions and 47 deletions
@@ -3768,6 +3768,15 @@ namespace Game.AI
return searcher.GetTarget();
}
Unit DoSelectBelowHpPctFriendlyWithEntry(uint entry, float range, byte minHPDiff = 1, bool excludeSelf = true)
{
FriendlyBelowHpPctEntryInRange u_check = new FriendlyBelowHpPctEntryInRange(me, entry, range, minHPDiff, excludeSelf);
UnitLastSearcher searcher = new UnitLastSearcher(me, u_check);
Cell.VisitAllObjects(me, searcher, range);
return searcher.GetTarget();
}
void DoFindFriendlyCC(List<Creature> _list, float range)
{
if (me == null)