mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/LFG: Readd players to queue when proposal fails because someone else declined it (#16279)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user