fix(Core/Spell): Remove channeled auras when caster and target are no… (#15419)

fix(Core/Spell): Remove channeled auras when caster and target are not on the same map

* Chery-pick commit (https://github.com/TrinityCore/TrinityCore/commit/d23c839998263330aa475125e0bca16dd8fe51bb)

Co-authored-by: Shauren <[email protected]>
This commit is contained in:
Kitzunu
2023-04-02 15:36:13 -03:00
committed by GitHub
co-authored by Shauren
parent 817cb2d685
commit 5a55cb9522
+2
View File
@@ -3822,6 +3822,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;
}