fix(Core/Creature): prevent useless grid searches (#9307)
This commit is contained in:
parent
11373cd78a
commit
bf666becd9
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue