fix(Core/Spell): Core not handling AURA_INTERRUPT_FLAG_TELEPORTED (#9543)

* fix(Core/Spell): Core is not handling AURA_INTERRUPT_FLAG_TELEPORTED

Actually auras from spells with AURA_INTERRUPT_FLAG_TELEPORTED are not removed
on teleportation. This change makes it handled at teleportation on same map AND
if map changes, but it does not remove the aura when entering world to avoid
such auras being removed at character login.

Closes AzerothCore issue #9542

* delete invalid tabulations

* Move auras removing into the map/distance check above

* Do not remove unnecessary auras, and remove from other condition

* move it outside the 100 yards check, so it removes auras with this flag whenever teleporting

* remove whitespace at EOL

* Move the removal under the 100yards condition

This removes the specified auras
only if teleports more than 100 yards away
and avoids spells such as blink or shadowstep
removing such auras
This commit is contained in:
The Legendary Kingdom
2021-12-15 00:38:25 +01:00
committed by GitHub
parent 2384ed1254
commit 5c8acadf14

View File

@@ -1364,6 +1364,8 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
RemoveAurasByType(SPELL_AURA_MOD_FEAR);
RemoveAurasByType(SPELL_AURA_MOD_CONFUSE);
RemoveAurasByType(SPELL_AURA_MOD_ROOT);
// remove auras that should be removed when being teleported
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TELEPORTED);
}
if (m_transport)