mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-14 17:39:09 +00:00
Avoie aoe strategy
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Playerbots.h"
|
||||
#include "Unit.h"
|
||||
|
||||
void PossibleTargetsValue::FindUnits(std::list<Unit*>& targets)
|
||||
{
|
||||
@@ -20,3 +21,17 @@ bool PossibleTargetsValue::AcceptUnit(Unit* unit)
|
||||
{
|
||||
return AttackersValue::IsPossibleTarget(unit, bot, range);
|
||||
}
|
||||
|
||||
void PossibleTriggersValue::FindUnits(std::list<Unit*>& targets)
|
||||
{
|
||||
Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(bot, bot, range);
|
||||
Acore::UnitListSearcher<Acore::AnyUnfriendlyUnitInObjectRangeCheck> searcher(bot, targets, u_check);
|
||||
Cell::VisitAllObjects(bot, searcher, range);
|
||||
}
|
||||
|
||||
bool PossibleTriggersValue::AcceptUnit(Unit* unit)
|
||||
{
|
||||
return unit->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE) && unit->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
return true; // AttackersValue::IsPossibleTarget(unit, bot, range);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user