From 5c8acadf14121b6cbcd89bb1abc7e2340f65e4a6 Mon Sep 17 00:00:00 2001 From: The Legendary Kingdom <93067263+TheLegendaryKingdom@users.noreply.github.com> Date: Wed, 15 Dec 2021 00:38:25 +0100 Subject: [PATCH] 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 --- src/server/game/Entities/Player/Player.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index f4c2cad39..9ac67ab1b 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -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)