Core/LFG: Readd players to queue when proposal fails because someone else declined it (#16279)

This commit is contained in:
Dustin Paul
2016-04-11 12:33:25 -04:00
committed by Shauren
parent 97b053d203
commit bdeeab13bd
3 changed files with 13 additions and 4 deletions

View File

@@ -1148,7 +1148,7 @@ void LFGMgr::RemoveProposal(LfgProposalContainer::iterator itProposal, LfgUpdate
for (GuidList::const_iterator it = proposal.queues.begin(); it != proposal.queues.end(); ++it)
{
ObjectGuid guid = *it;
queue.AddToQueue(guid);
queue.AddToQueue(guid, true);
}
ProposalsStore.erase(itProposal);

View File

@@ -117,7 +117,7 @@ std::string LFGQueue::GetDetailedMatchRoles(GuidList const& check) const
return o.str();
}
void LFGQueue::AddToQueue(ObjectGuid guid)
void LFGQueue::AddToQueue(ObjectGuid guid, bool reAdd)
{
LfgQueueDataContainer::iterator itQueue = QueueDataStore.find(guid);
if (itQueue == QueueDataStore.end())
@@ -126,7 +126,10 @@ void LFGQueue::AddToQueue(ObjectGuid guid)
return;
}
AddToNewQueue(guid);
if (reAdd)
AddToFrontCurrentQueue(guid);
else
AddToNewQueue(guid);
}
void LFGQueue::RemoveFromQueue(ObjectGuid guid)
@@ -171,6 +174,11 @@ void LFGQueue::AddToCurrentQueue(ObjectGuid guid)
currentQueueStore.push_back(guid);
}
void LFGQueue::AddToFrontCurrentQueue(ObjectGuid guid)
{
currentQueueStore.push_front(guid);
}
void LFGQueue::RemoveFromCurrentQueue(ObjectGuid guid)
{
currentQueueStore.remove(guid);

View File

@@ -89,7 +89,7 @@ class TC_GAME_API LFGQueue
// Add/Remove from queue
std::string GetDetailedMatchRoles(GuidList const& check) const;
void AddToQueue(ObjectGuid guid);
void AddToQueue(ObjectGuid guid, bool reAdd = false);
void RemoveFromQueue(ObjectGuid guid);
void AddQueueData(ObjectGuid guid, time_t joinTime, LfgDungeonSet const& dungeons, LfgRolesMap const& rolesMap);
void RemoveQueueData(ObjectGuid guid);
@@ -116,6 +116,7 @@ class TC_GAME_API LFGQueue
void AddToNewQueue(ObjectGuid guid);
void AddToCurrentQueue(ObjectGuid guid);
void AddToFrontCurrentQueue(ObjectGuid guid);
void RemoveFromNewQueue(ObjectGuid guid);
void RemoveFromCurrentQueue(ObjectGuid guid);