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 <shauren.trinity@gmail.com>
This commit is contained in:
@@ -3822,6 +3822,8 @@ void Unit::_UpdateSpells(uint32 time)
|
|||||||
{
|
{
|
||||||
if (i->second->IsExpired())
|
if (i->second->IsExpired())
|
||||||
RemoveOwnedAura(i, AURA_REMOVE_BY_EXPIRE);
|
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
|
else
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user