diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2018-07-24 10:42:41 +0200 |
|---|---|---|
| committer | Treeston <treeston.mmoc@gmail.com> | 2018-07-24 10:42:41 +0200 |
| commit | fac470014b4b97060a22c346aadfaf9c03b99ff2 (patch) | |
| tree | 16996838eafddfbd301448517dcc52c4c1f58e8b | |
| parent | c031167e067dd0903c6fa4db4ea88cd5279039d2 (diff) | |
Core/Maps: Continue updating creatures that own auras applied to players. Closes #22110.
| -rw-r--r-- | src/server/game/Maps/Map.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 3aec174c854..ea8696d62a4 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -803,6 +803,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 |
