mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 21:56:22 +00:00
fix(Core/Creature): prevent useless grid searches (#9307)
This commit is contained in:
@@ -2249,6 +2249,11 @@ void Creature::CallForHelp(float radius, Unit* target /*= nullptr*/)
|
||||
target = GetVictim();
|
||||
}
|
||||
|
||||
if (!target)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Acore::CallOfHelpCreatureInRangeDo u_do(this, target, radius);
|
||||
Acore::CreatureWorker<Acore::CallOfHelpCreatureInRangeDo> worker(this, u_do);
|
||||
Cell::VisitGridObjects(this, worker, radius);
|
||||
|
||||
Reference in New Issue
Block a user