mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Dungeon finder: Fix teleport out after dungeon is finished
Closes 8914
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user