From 622c9bc0dd1a8701a68ab80aa3b2e0c208dc7976 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Thu, 12 Aug 2021 19:10:03 +0200 Subject: [PATCH] fix(Core/Visibility): notify AI of nearby creatures immediately if forced update object visibility is called (#7274) - Closes #7126 --- src/server/game/Entities/Unit/Unit.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 0c288efdd..14173d317 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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); } }