fix(Core/LFG): Correct checks for teleport in/out (#17780)
This commit is contained in:
parent
9ecb85acb5
commit
4bf20ffde4
1 changed files with 17 additions and 11 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue