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

View File

@@ -18330,14 +18330,9 @@ void Unit::UpdateObjectVisibility(bool forced, bool /*fromUpdate*/)
else
{
WorldObject::UpdateObjectVisibility(true);
// pussywizard: generally this is not needed here, delayed notifier will handle this, call only for pets
if ((IsGuardian() || IsPet()) && GetOwnerGUID().IsPlayer())
{
Acore::AIRelocationNotifier notifier(*this);
float radius = 60.0f;
Cell::VisitAllObjects(this, notifier, radius);
}
Acore::AIRelocationNotifier notifier(*this);
float radius = 60.0f;
Cell::VisitAllObjects(this, notifier, radius);
}
}