mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
fix(Core/LFG): Correct checks for teleport in/out (#17780)
This commit is contained in:
@@ -2128,14 +2128,6 @@ namespace lfg
|
||||
return;
|
||||
}
|
||||
|
||||
if (out)
|
||||
{
|
||||
if (player->GetMapId() == uint32(dungeon->map))
|
||||
player->TeleportToEntryPoint();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
LfgTeleportError error = LFG_TELEPORTERROR_OK;
|
||||
|
||||
if (!player->IsAlive())
|
||||
@@ -2158,6 +2150,13 @@ namespace lfg
|
||||
{
|
||||
error = LFG_TELEPORTERROR_COMBAT;
|
||||
}
|
||||
else if (out && error == LFG_TELEPORTERROR_OK)
|
||||
{
|
||||
if (player->GetMapId() == uint32(dungeon->map))
|
||||
player->TeleportToEntryPoint();
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 mapid = dungeon->map;
|
||||
@@ -2183,11 +2182,18 @@ namespace lfg
|
||||
}
|
||||
|
||||
if (error != LFG_TELEPORTERROR_OK)
|
||||
{
|
||||
player->GetSession()->SendLfgTeleportError(uint8(error));
|
||||
|
||||
//LOG_DEBUG("lfg", "TeleportPlayer: Player {} is being teleported in to map {} "
|
||||
// "(x: {}, y: {}, z: {}) Result: {}", player->GetName(), dungeon->map,
|
||||
// dungeon->x, dungeon->y, dungeon->z, error);
|
||||
LOG_DEBUG("lfg", "Player [{}] could NOT be teleported in to map [{}] (x: {}, y: {}, z: {}) Error: {}",
|
||||
player->GetName(), dungeon->map, dungeon->x, dungeon->y, dungeon->z, error);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG("lfg", "Player [{}] is being teleported in to map [{}] (x: {}, y: {}, z: {})",
|
||||
player->GetName(), dungeon->map, dungeon->x, dungeon->y, dungeon->z);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user