Core/Spells: Always remove spell target from transport on teleport spells if spell destination does not target a position on the transport

This commit is contained in:
Shauren authored and Ovahlord committed 2023-06-29 20:31:45 +02:00
1 parent 82e27f72af
commit 07376de9fc
8 files changed
+47 -24

No files matched your search

+1 -1
View File
@@ -12969,7 +12969,7 @@ void Unit::NearTeleportTo(Position const& pos, bool casting /*= false*/)
if (GetTypeId() == TYPEID_PLAYER)
{
WorldLocation target(GetMapId(), pos);
ToPlayer()->TeleportTo(target, TELE_TO_NOT_LEAVE_TRANSPORT | TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (casting ? TELE_TO_SPELL : 0));
ToPlayer()->TeleportTo(target, TELE_TO_NOT_LEAVE_TRANSPORT | TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (casting ? TELE_TO_SPELL : TELE_TO_NONE));
}
else
{