Core/Players: Fixed crashes happening when player is teleported again while still being teleported to a different map

Signed-off-by: luis <[email protected]>
This commit is contained in:
Shauren
2026-03-05 19:46:28 -03:00
committed by luis
parent 732f728f8f
commit fa3a97199f
+4 -1
View File
@@ -1357,6 +1357,9 @@ bool Player::TeleportTo(TeleportLocation const& teleportLocation, TeleportToOpti
}
else
{
if (IsBeingTeleportedFar())
return false;
if (GetClass() == CLASS_DEATH_KNIGHT && GetMapId() == 609 && !IsGameMaster() && !HasSpell(50977))
{
SendTransferAborted(teleportLocation.Location.GetMapId(), TRANSFER_ABORT_UNIQUE_MESSAGE, 1);
@@ -1385,11 +1388,11 @@ bool Player::TeleportTo(TeleportLocation const& teleportLocation, TeleportToOpti
SetSemaphoreTeleportNear(false);
//setup delayed teleport flag
SetDelayedTeleportFlag(IsCanDelayTeleport());
SetSemaphoreTeleportFar(true);
//if teleport spell is cast in Unit::Update() func
//then we need to delay it until update process will be finished
if (IsHasDelayedTeleport())
{
SetSemaphoreTeleportFar(true);
//lets save teleport destination for player
m_teleport_dest = teleportLocation;
m_teleport_options = options;