mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 23:26:23 +00:00
fix(Core/LFG): Properly teleport players to new instance if queued within the same dungeon. (#8174)
- Closes #8121
This commit is contained in:
@@ -1651,8 +1651,10 @@ namespace lfg
|
||||
}
|
||||
|
||||
bool randomDungeon = false;
|
||||
std::vector<Player*> playersTeleported;
|
||||
// Teleport Player
|
||||
for (GuidUnorderedSet::const_iterator it = playersToTeleport.begin(); it != playersToTeleport.end(); ++it)
|
||||
{
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*it))
|
||||
{
|
||||
if (player->GetGroup() != grp) // pussywizard: could not add because group was full (some shitness happened)
|
||||
@@ -1689,8 +1691,14 @@ namespace lfg
|
||||
sInstanceSaveMgr->PlayerUnbindInstance(player->GetGUID(), dungeon->map, player->GetDungeonDifficulty(), true);
|
||||
}
|
||||
|
||||
TeleportPlayer(player, false, teleportLocation);
|
||||
playersTeleported.push_back(player);
|
||||
}
|
||||
}
|
||||
|
||||
for (Player* player : playersTeleported)
|
||||
{
|
||||
TeleportPlayer(player, false, teleportLocation);
|
||||
}
|
||||
|
||||
if (randomDungeon)
|
||||
grp->AddLfgRandomInstanceFlag();
|
||||
|
||||
Reference in New Issue
Block a user