fix(Core/Visibility): notify AI of nearby creatures immediately if forced update object visibility is called (#7274)

- Closes #7126
This commit is contained in:
UltraNix
2021-08-12 19:10:03 +02:00
committed by GitHub
parent 6688bca836
commit 622c9bc0dd
+3 -8
View File
@@ -18330,14 +18330,9 @@ void Unit::UpdateObjectVisibility(bool forced, bool /*fromUpdate*/)
else else
{ {
WorldObject::UpdateObjectVisibility(true); WorldObject::UpdateObjectVisibility(true);
Acore::AIRelocationNotifier notifier(*this);
// pussywizard: generally this is not needed here, delayed notifier will handle this, call only for pets float radius = 60.0f;
if ((IsGuardian() || IsPet()) && GetOwnerGUID().IsPlayer()) Cell::VisitAllObjects(this, notifier, radius);
{
Acore::AIRelocationNotifier notifier(*this);
float radius = 60.0f;
Cell::VisitAllObjects(this, notifier, radius);
}
} }
} }