aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2018-07-24 10:42:41 +0200
committerShauren <shauren.trinity@gmail.com>2021-10-17 01:11:51 +0200
commitf7e5931b4947d2b0590b073381a4acb10056366c (patch)
tree4791db68a15b5e72ebcdf8196e193f96cb89861f /src
parent6d2423b7334915c60225103863c3ffae3831719b (diff)
Core/Maps: Continue updating creatures that own auras applied to players. Closes #22110.
(cherry picked from commit fac470014b4b97060a22c346aadfaf9c03b99ff2)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Maps/Map.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index b9449317587..27ee16d533f 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -878,6 +878,18 @@ void Map::Update(uint32 t_diff)
for (Unit* unit : toVisit)
VisitNearbyCellsOf(unit, grid_object_update, world_object_update);
}
+
+ { // Update any creatures that own auras the player has applications of
+ std::unordered_set<Unit*> toVisit;
+ for (std::pair<uint32, AuraApplication*> pair : player->GetAppliedAuras())
+ {
+ if (Unit* caster = pair.second->GetBase()->GetCaster())
+ if (caster->GetTypeId() != TYPEID_PLAYER)
+ toVisit.insert(caster);
+ }
+ for (Unit* unit : toVisit)
+ VisitNearbyCellsOf(unit, grid_object_update, world_object_update);
+ }
}
// non-player active objects, increasing iterator in the loop in case of object removal