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
-5
View File
@@ -18330,16 +18330,11 @@ void Unit::UpdateObjectVisibility(bool forced, bool /*fromUpdate*/)
else else
{ {
WorldObject::UpdateObjectVisibility(true); 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); Acore::AIRelocationNotifier notifier(*this);
float radius = 60.0f; float radius = 60.0f;
Cell::VisitAllObjects(this, notifier, radius); Cell::VisitAllObjects(this, notifier, radius);
} }
} }
}
void Unit::KnockbackFrom(float x, float y, float speedXY, float speedZ) void Unit::KnockbackFrom(float x, float y, float speedXY, float speedZ)
{ {