diff options
author | w1sht0l1v3 <w1sht0l1v3@gmail.com> | 2015-04-15 20:37:18 +0300 |
---|---|---|
committer | w1sht0l1v3 <w1sht0l1v3@gmail.com> | 2015-04-15 20:37:18 +0300 |
commit | 1019649f93ae8f45f0d15a9eeeb803901c3c15cf (patch) | |
tree | d590769281ad8c90c6f5462ae984c675487b0e47 /src | |
parent | 2dda2483a3fcf48b672e8838bc3602c5296b8500 (diff) |
Core/LFGMgr: One more addition to fix the crash on logout.
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/DungeonFinding/LFGMgr.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index e971b99034b..9d1eecabd66 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -1266,13 +1266,13 @@ 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 leave the queue and group when porting out of the instance - if (group && group->GetMembersCount() == 1) + // in the case were we are the last in the lfggroup then we must disband the lfggroup when porting out of the instance + // only when the player is not logging out.on logout, the core does it's own magic + if (!player->GetSession()->isLogingOut() && group->GetMembersCount() == 1) { - 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()); + group->Disband(); + TC_LOG_DEBUG("lfg.teleport", "Player %s(%s) is last in the lfggroup so we disband the group.", + player->GetName().c_str(), player->GetGUID().ToString().c_str()); } return; |