diff options
author | w1sht0l1v3 <w1sht0l1v3@gmail.com> | 2015-04-05 22:03:40 +0300 |
---|---|---|
committer | DDuarte <dnpd.dd@gmail.com> | 2015-04-14 01:02:00 +0100 |
commit | cec3f8f671ae8a2691b2c4dad77647bea279a462 (patch) | |
tree | 66499c570dfd3893b889674802bd226190a7f638 /src | |
parent | aa90b66abce54da896b84fed98426e4f77c3e4ba (diff) |
Core/LFGMgr: Fix the case where the last player left in a lfg group would be stuck in party when porting out of the instance.
If you find a better way or think this is wrong feel free to remove it or improve it.
(cherry picked from commit e743f4a479ce7ddd3f13d51ca1c19a591c803fc0)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/DungeonFinding/LFGMgr.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index db711bd9a47..098b2d2995b 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -1270,6 +1270,14 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false* if (player->GetMapId() == uint32(dungeon->map)) player->TeleportToBGEntryPoint(); + // in the case were we are the last in lfggroup then we must disband when porting out of the instance + if (group->GetMembersCount() == 1) + { + group->Disband(); + TC_LOG_DEBUG("lfg.teleport", "Player %s is last in lfggroup so we disband the group.", + player->GetName().c_str()); + } + return; } |