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 (d23c839998)

Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
Kitzunu
2023-04-02 20:36:13 +02:00
committed by GitHub
parent 817cb2d685
commit 5a55cb9522

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;
}