From d23c839998263330aa475125e0bca16dd8fe51bb Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 9 Feb 2023 19:04:23 +0100 Subject: Core/Auras: Remove channeled auras when caster and target are not on the same map Closes #28777 Closes #28792 --- src/server/game/Entities/Unit/Unit.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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; } -- cgit v1.2.3