diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index ae21b5c76..e2f0726ce 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -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); + } + } /**