From dbbfee4ab043d6c0b928a003c9d678ad728bc649 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sun, 17 Oct 2021 09:27:41 -0400 Subject: [PATCH] Core/Maps: Continue updating creatures that own auras applied to players. Port From (https://github.com/TrinityCore/TrinityCore/commit/f7e5931b4947d2b0590b073381a4acb10056366c) --- Source/Game/Maps/Map.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Source/Game/Maps/Map.cs b/Source/Game/Maps/Map.cs index 6de34f91d..ab80e37e1 100644 --- a/Source/Game/Maps/Map.cs +++ b/Source/Game/Maps/Map.cs @@ -769,6 +769,19 @@ namespace Game.Maps foreach (Unit unit in toVisit) VisitNearbyCellsOf(unit, grid_object_update, world_object_update); } + + { // Update any creatures that own auras the player has applications of + List toVisit = new(); + foreach (var pair in player.GetAppliedAuras()) + { + Unit caster = pair.Value.GetBase().GetCaster(); + if (caster != null) + if (!caster.IsPlayer() && !caster.IsWithinDistInMap(player, GetVisibilityRange(), false)) + toVisit.Add(caster); + } + foreach (Unit unit in toVisit) + VisitNearbyCellsOf(unit, grid_object_update, world_object_update); + } } for (var i = 0; i < m_activeNonPlayers.Count; ++i)