Core/Dungeon finder: Fix teleport out after dungeon is finished

Closes 8914
This commit is contained in:
Spp committed 2013-01-13 16:22:41 +01:00
1 parent 8be3d4cc80
commit 4c247f5d2d
3 files changed
+14 -2

No files matched your search

+12 -1
View File
@@ -1563,7 +1563,6 @@ void LFGMgr::FinishDungeon(uint64 gguid, const uint32 dungeonId)
LfgPlayerRewardData data = LfgPlayerRewardData(dungeon->Entry(), GetDungeon(gguid, false), done, quest);
player->GetSession()->SendLfgPlayerReward(data);
}
SetDungeon(gguid, 0);
}
// --------------------------------------------------------------------------//
@@ -1632,6 +1631,18 @@ LfgState LFGMgr::GetState(uint64 guid)
return state;
}
LfgState LFGMgr::GetOldState(uint64 guid)
{
LfgState state;
if (IS_GROUP_GUID(guid))
state = GroupsStore[guid].GetOldState();
else
state = PlayersStore[guid].GetOldState();
sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetOldState: [" UI64FMTD "] = %u", guid, state);
return state;
}
uint32 LFGMgr::GetDungeon(uint64 guid, bool asId /*= true */)
{
uint32 dungeon = GroupsStore[guid].GetDungeon(asId);
+1
View File
@@ -347,6 +347,7 @@ class LFGMgr
uint32 GetDungeon(uint64 guid, bool asId = true);
uint32 GetDungeonMapId(uint64 guid);
LfgState GetState(uint64 guid);
LfgState GetOldState(uint64 guid);
uint8 GetKicksLeft(uint64 gguid);
uint64 GetLeader(uint64 guid);
bool IsLfgGroup(uint64 guid);
+1 -1
View File
@@ -483,7 +483,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
uint64 gguid = *check.begin();
proposal.queues = check;
proposal.isNew = numLfgGroups != 1 || !sLFGMgr->GetDungeon(gguid);
proposal.isNew = numLfgGroups != 1 || sLFGMgr->GetOldState(gguid) != LFG_STATE_DUNGEON;
if (!sLFGMgr->AllQueued(check))
{