aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-02-09 19:04:23 +0100
committerShauren <shauren.trinity@gmail.com>2023-02-09 19:04:23 +0100
commitd23c839998263330aa475125e0bca16dd8fe51bb (patch)
tree6d97ffdaf152879fb2480364be722b1406ade00f /src
parent70e985c7f715951035b0e168c0222405d62758b3 (diff)
Core/Auras: Remove channeled auras when caster and target are not on the same map
Closes #28777 Closes #28792
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index a272a405c2a..0279678d6cc 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -2863,6 +2863,8 @@ void Unit::_UpdateSpells(uint32 time)
{
if (i->second->IsExpired())
RemoveOwnedAura(i, AURA_REMOVE_BY_EXPIRE);
+ else if (i->second->GetSpellInfo()->IsChanneled() && i->second->GetCasterGUID() != GetGUID() && !ObjectAccessor::GetWorldObject(*this, i->second->GetCasterGUID()))
+ RemoveOwnedAura(i, AURA_REMOVE_BY_CANCEL); // remove channeled auras when caster is not on the same map
else
++i;
}