diff options
| author | Shauren <shauren.trinity@gmail.com> | 2023-02-09 19:04:23 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2023-02-09 19:06:36 +0100 |
| commit | b842f2be5509d804363183e0445ed71cb5eb221b (patch) | |
| tree | bbb26da9c457e5dc8f3f7cb16aae1abf682538b2 /src | |
| parent | f79cd0f526af552d0df06b80dca951d6f1f8ae55 (diff) | |
Core/Auras: Remove channeled auras when caster and target are not on the same map
Closes #28777
Closes #28792
(cherry picked from commit d23c839998263330aa475125e0bca16dd8fe51bb)
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 2 |
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 46568161698..35c7da03d82 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -2756,6 +2756,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; } |
