mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 17:09:08 +00:00
Reduce string overhead and totem check overhead
This commit is contained in:
@@ -50,4 +50,16 @@ void NearestTriggersValue::FindUnits(std::list<Unit*>& targets)
|
||||
bool NearestTriggersValue::AcceptUnit(Unit* unit)
|
||||
{
|
||||
return !unit->IsPlayer();
|
||||
}
|
||||
|
||||
void NearestTotemsValue::FindUnits(std::list<Unit*>& targets)
|
||||
{
|
||||
Acore::AnyUnitInObjectRangeCheck u_check(bot, range);
|
||||
Acore::UnitListSearcher<Acore::AnyUnitInObjectRangeCheck> searcher(bot, targets, u_check);
|
||||
Cell::VisitAllObjects(bot, searcher, range);
|
||||
}
|
||||
|
||||
bool NearestTotemsValue::AcceptUnit(Unit* unit)
|
||||
{
|
||||
return unit->IsTotem();
|
||||
}
|
||||
Reference in New Issue
Block a user