Core/LFGMgr: Attempt to leave LFG the right way...i think...

This commit is contained in:
w1sht0l1v3 committed 2015-04-13 19:27:12 +03:00
1 parent c9e699961e
commit f56cdd4496
1 file changed
+4 -3
+4 -3
View File
@@ -1266,11 +1266,12 @@ 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
// in the case were we are the last in lfggroup then we must leave the queue and group when porting out of the instance
if (group && group->GetMembersCount() == 1)
{
group->Disband();
TC_LOG_DEBUG("lfg.teleport", "Player %s is last in lfggroup so we disband the group.",
sLFGMgr->LeaveLfg(player->GetGUID());
group->RemoveMember(player->GetGUID());
TC_LOG_DEBUG("lfg.teleport", "Player %s is last in lfggroup so we leave the queue and the group.",
player->GetName().c_str());
}