|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <LFGQueue.h>
Public Member Functions | |
| void | AddQueueData (uint64 guid, time_t joinTime, LfgDungeonSet const &dungeons, LfgRolesMap const &rolesMap) |
| void | AddToQueue (uint64 guid, bool reQueue=false) |
| std::string | DumpCompatibleInfo (bool full=false) const |
| std::string | DumpQueueInfo (bool full=false) const |
| uint8 | FindGroups () |
| time_t | GetJoinTime (uint64 guid) const |
| bool | HasQueueData (uint64 guid) const |
| void | RemoveFromQueue (uint64 guid) |
| void | RemoveQueueData (uint64 guid) |
| void | UpdateQueueTimers (uint8 queueId, time_t currTime) |
| void | UpdateWaitTimeAvg (int32 waitTime, uint32 dungeonId) |
| void | UpdateWaitTimeDps (int32 waitTime, uint32 dungeonId) |
| void | UpdateWaitTimeHealer (int32 waitTime, uint32 dungeonId) |
| void | UpdateWaitTimeTank (int32 waitTime, uint32 dungeonId) |
Private Member Functions | |
| void | AddToCurrentQueue (uint64 guid) |
| void | AddToNewQueue (uint64 guid) |
| LfgCompatibility | CheckCompatibility (LfgGuidList check) |
| void | FindBestCompatibleInQueue (LfgQueueDataContainer::iterator itrQueue) |
| LfgCompatibility | FindNewGroups (LfgGuidList &check, LfgGuidList &all) |
| LfgCompatibilityData * | GetCompatibilityData (std::string const &key) |
| LfgCompatibility | GetCompatibles (std::string const &key) |
| void | RemoveFromCompatibles (uint64 guid) |
| void | RemoveFromCurrentQueue (uint64 guid) |
| void | RemoveFromNewQueue (uint64 guid) |
| LfgRolesMap const & | RemoveFromQueueUpdateData (uint64 guid) |
| void | SetCompatibilityData (std::string const &key, LfgCompatibilityData const &compatibles) |
| void | SetCompatibles (std::string const &key, LfgCompatibility compatibles) |
| void | SetQueueUpdateData (std::string const &strGuids, LfgRolesMap const &proposalRoles) |
| void | UpdateBestCompatibleInQueue (LfgQueueDataContainer::iterator itrQueue, std::string const &key, LfgRolesMap const &roles) |
Private Attributes | |
| LfgCompatibleContainer | CompatibleMapStore |
| Compatible dungeons. | |
| LfgGuidList | currentQueueStore |
| Ordered list. Used to find groups. | |
| LfgGuidList | newToQueueStore |
| New groups to add to queue. | |
| LfgQueueDataContainer | QueueDataStore |
| Queued groups. | |
| LfgWaitTimesContainer | waitTimesAvgStore |
| Average wait time to find a group queuing as multiple roles. | |
| LfgWaitTimesContainer | waitTimesDpsStore |
| Average wait time to find a group queuing as dps. | |
| LfgWaitTimesContainer | waitTimesHealerStore |
| Average wait time to find a group queuing as healer. | |
| LfgWaitTimesContainer | waitTimesTankStore |
| Average wait time to find a group queuing as tank. | |
Stores all data related to queue
Definition at line 74 of file LFGQueue.h.
| void lfg::LFGQueue::AddQueueData | ( | uint64 | guid, |
| time_t | joinTime, | ||
| LfgDungeonSet const & | dungeons, | ||
| LfgRolesMap const & | rolesMap ) |
Definition at line 353 of file LFGQueue.cpp.
References AddToQueue(), and QueueDataStore.
Referenced by lfg::LFGMgr::JoinLfg(), and lfg::LFGMgr::UpdateRoleCheck().
|
private |
Definition at line 342 of file LFGQueue.cpp.
References currentQueueStore.
Referenced by AddToQueue(), and FindGroups().
|
private |
Definition at line 331 of file LFGQueue.cpp.
References newToQueueStore.
Referenced by AddToQueue().
| void lfg::LFGQueue::AddToQueue | ( | uint64 | guid, |
| bool | reQueue = false ) |
Definition at line 293 of file LFGQueue.cpp.
References AddToCurrentQueue(), AddToNewQueue(), GUID_LOPART(), QueueDataStore, and SF_LOG_ERROR.
Referenced by AddQueueData(), and lfg::LFGMgr::RemoveProposal().
|
private |
Check compatibilities between groups. If group is Matched proposal will be created
| [in] | check | List of guids to check compatibilities |
Definition at line 524 of file LFGQueue.cpp.
References lfg::LfgProposalPlayer::accept, lfg::LfgProposal::cancelTime, CheckCompatibility(), lfg::ConcatenateDungeons(), lfg::ConcatenateGuids(), lfg::LfgProposal::dungeonId, lfg::LfgQueueData::dungeons, lfg::GetRolesString(), lfg::LfgProposal::group, lfg::LfgProposalPlayer::group, GUID_LOPART(), IS_GROUP_GUID(), lfg::LfgProposal::isNew, lfg::LfgProposal::leader, lfg::LFG_ANSWER_AGREE, lfg::LFG_COMPATIBILITY_PENDING, lfg::LFG_COMPATIBLES_BAD_STATES, lfg::LFG_COMPATIBLES_MATCH, lfg::LFG_COMPATIBLES_WITH_LESS_PLAYERS, lfg::LFG_INCOMPATIBLES_HAS_IGNORES, lfg::LFG_INCOMPATIBLES_MULTIPLE_LFG_GROUPS, lfg::LFG_INCOMPATIBLES_NO_DUNGEONS, lfg::LFG_INCOMPATIBLES_NO_ROLES, lfg::LFG_INCOMPATIBLES_TOO_MUCH_PLAYERS, lfg::LFG_INCOMPATIBLES_WRONG_GROUP_SIZE, lfg::LFG_PROPOSAL_INITIATING, lfg::LFG_STATE_DUNGEON, lfg::LFG_TIME_PROPOSAL, MAXGROUPSIZE, MAXRAIDSIZE, lfg::PLAYER_ROLE_LEADER, lfg::LfgProposal::players, QueueDataStore, lfg::LfgProposal::queues, RemoveFromCurrentQueue(), RemoveFromNewQueue(), RemoveFromQueue(), lfg::LfgProposalPlayer::role, lfg::LfgCompatibilityData::roles, lfg::LfgQueueData::roles, Skyfire::Containers::SelectRandomContainerElement(), SetCompatibilityData(), SetCompatibles(), SF_LOG_DEBUG, SF_LOG_ERROR, sLFGMgr, lfg::LfgProposal::state, and UpdateBestCompatibleInQueue().
Referenced by CheckCompatibility(), and FindNewGroups().
| std::string lfg::LFGQueue::DumpCompatibleInfo | ( | bool | full = false | ) | const |
Definition at line 942 of file LFGQueue.cpp.
References CompatibleMapStore, and lfg::GetCompatibleString().
| std::string lfg::LFGQueue::DumpQueueInfo | ( | bool | full = false | ) | const |
Definition at line 845 of file LFGQueue.cpp.
References lfg::LfgQueueData::bestCompatible, lfg::ConcatenateDungeons(), lfg::ConcatenateGuids(), currentQueueStore, lfg::LfgQueueData::dps, lfg::LfgQueueData::dungeons, lfg::GetRolesString(), lfg::LfgQueueData::healers, IS_GROUP_GUID(), lfg::LfgQueueData::joinTime, newToQueueStore, lfg::PLAYER_ROLE_DAMAGE, lfg::PLAYER_ROLE_HEALER, lfg::PLAYER_ROLE_LEADER, lfg::PLAYER_ROLE_TANK, QueueDataStore, lfg::LfgQueueData::roles, sLFGMgr, and lfg::LfgQueueData::tanks.
|
private |
Definition at line 953 of file LFGQueue.cpp.
References CompatibleMapStore, lfg::LFG_COMPATIBLES_WITH_LESS_PLAYERS, SF_LOG_DEBUG, UI64FMTD, and UpdateBestCompatibleInQueue().
Referenced by RemoveFromQueue(), and UpdateQueueTimers().
| uint8 lfg::LFGQueue::FindGroups | ( | ) |
Definition at line 456 of file LFGQueue.cpp.
References AddToCurrentQueue(), currentQueueStore, FindNewGroups(), GUID_LOPART(), lfg::LFG_COMPATIBLES_MATCH, newToQueueStore, RemoveFromNewQueue(), and SF_LOG_DEBUG.
|
private |
Checks que main queue to try to form a Lfg group. Returns first match found (if any)
| [in] | check | List of guids trying to match with other groups |
| [in] | all | List of all other guids in main queue to match against |
Definition at line 486 of file LFGQueue.cpp.
References CheckCompatibility(), lfg::ConcatenateGuids(), FindNewGroups(), GetCompatibles(), lfg::GetCompatibleString(), lfg::LFG_COMPATIBILITY_PENDING, lfg::LFG_COMPATIBLES_BAD_STATES, lfg::LFG_COMPATIBLES_MATCH, lfg::LFG_COMPATIBLES_WITH_LESS_PLAYERS, SetCompatibles(), SF_LOG_DEBUG, and sLFGMgr.
Referenced by FindGroups(), and FindNewGroups().
|
private |
Definition at line 447 of file LFGQueue.cpp.
References CompatibleMapStore.
|
private |
Get the compatibility of a group of guids
| [in] | key | String concatenation of guids (| used as separator) |
Definition at line 438 of file LFGQueue.cpp.
References CompatibleMapStore, and lfg::LFG_COMPATIBILITY_PENDING.
Referenced by FindNewGroups().
| time_t lfg::LFGQueue::GetJoinTime | ( | uint64 | guid | ) | const |
Definition at line 836 of file LFGQueue.cpp.
References QueueDataStore.
Referenced by lfg::LFGMgr::UpdateProposal().
| bool lfg::LFGQueue::HasQueueData | ( | uint64 | guid | ) | const |
Definition at line 366 of file LFGQueue.cpp.
References QueueDataStore.
Referenced by lfg::LFGMgr::RemoveProposal(), and lfg::LFGMgr::UpdateProposal().
|
private |
Remove from cached compatible dungeons any entry that contains the given guid
| [in] | guid | Guid to remove from compatible cache |
Definition at line 404 of file LFGQueue.cpp.
References CompatibleMapStore, GUID_LOPART(), and SF_LOG_DEBUG.
Referenced by RemoveFromQueue().
|
private |
Definition at line 348 of file LFGQueue.cpp.
References currentQueueStore.
Referenced by CheckCompatibility(), and RemoveFromQueue().
|
private |
Definition at line 337 of file LFGQueue.cpp.
References newToQueueStore.
Referenced by CheckCompatibility(), FindGroups(), and RemoveFromQueue().
| void lfg::LFGQueue::RemoveFromQueue | ( | uint64 | guid | ) |
Definition at line 308 of file LFGQueue.cpp.
References FindBestCompatibleInQueue(), QueueDataStore, RemoveFromCompatibles(), RemoveFromCurrentQueue(), and RemoveFromNewQueue().
Referenced by CheckCompatibility(), lfg::LFGMgr::JoinLfg(), lfg::LFGMgr::LeaveLfg(), lfg::LFGMgr::LeaveSoloLfg(), lfg::LFGMgr::RemoveProposal(), and lfg::LFGMgr::UpdateProposal().
|
private |
| void lfg::LFGQueue::RemoveQueueData | ( | uint64 | guid | ) |
Definition at line 359 of file LFGQueue.cpp.
References QueueDataStore.
|
private |
Definition at line 427 of file LFGQueue.cpp.
References CompatibleMapStore.
Referenced by CheckCompatibility().
|
private |
Stores the compatibility of a list of guids
| [in] | key | String concatenation of guids (| used as separator) |
| [in] | compatibles | type of compatibility |
Definition at line 421 of file LFGQueue.cpp.
References lfg::LfgCompatibilityData::compatibility, and CompatibleMapStore.
Referenced by CheckCompatibility(), and FindNewGroups().
|
private |
|
private |
Definition at line 965 of file LFGQueue.cpp.
References lfg::LfgQueueData::bestCompatible, lfg::LfgQueueData::dps, lfg::LfgQueueData::dungeons, lfg::LfgQueueData::healers, SF_LOG_DEBUG, lfg::LfgQueueData::tanks, and UI64FMTD.
Referenced by CheckCompatibility(), and FindBestCompatibleInQueue().
| void lfg::LFGQueue::UpdateQueueTimers | ( | uint8 | queueId, |
| time_t | currTime ) |
Definition at line 790 of file LFGQueue.cpp.
References lfg::LfgQueueData::bestCompatible, currentQueueStore, lfg::LfgQueueData::dps, lfg::LfgQueueData::dungeons, FindBestCompatibleInQueue(), GUID_LOPART(), lfg::LfgQueueData::healers, lfg::LfgQueueData::joinTime, newToQueueStore, QueueDataStore, lfg::LfgQueueData::roles, lfg::LFGMgr::SendLfgQueueStatus(), SF_LOG_DEBUG, SF_LOG_TRACE, lfg::LfgQueueData::tanks, waitTimesAvgStore, waitTimesDpsStore, waitTimesHealerStore, and waitTimesTankStore.
Definition at line 371 of file LFGQueue.cpp.
References lfg::LfgWaitTime::number, lfg::LfgWaitTime::time, and waitTimesAvgStore.
Referenced by lfg::LFGMgr::UpdateProposal().
Definition at line 392 of file LFGQueue.cpp.
References lfg::LfgWaitTime::number, lfg::LfgWaitTime::time, and waitTimesDpsStore.
Referenced by lfg::LFGMgr::UpdateProposal().
Definition at line 385 of file LFGQueue.cpp.
References lfg::LfgWaitTime::number, lfg::LfgWaitTime::time, and waitTimesHealerStore.
Referenced by lfg::LFGMgr::UpdateProposal().
Definition at line 378 of file LFGQueue.cpp.
References lfg::LfgWaitTime::number, lfg::LfgWaitTime::time, and waitTimesTankStore.
Referenced by lfg::LFGMgr::UpdateProposal().
|
private |
Compatible dungeons.
Definition at line 124 of file LFGQueue.h.
Referenced by DumpCompatibleInfo(), FindBestCompatibleInQueue(), GetCompatibilityData(), GetCompatibles(), RemoveFromCompatibles(), SetCompatibilityData(), and SetCompatibles().
|
private |
Ordered list. Used to find groups.
Definition at line 130 of file LFGQueue.h.
Referenced by AddToCurrentQueue(), DumpQueueInfo(), FindGroups(), RemoveFromCurrentQueue(), and UpdateQueueTimers().
|
private |
New groups to add to queue.
Definition at line 131 of file LFGQueue.h.
Referenced by AddToNewQueue(), DumpQueueInfo(), FindGroups(), RemoveFromNewQueue(), and UpdateQueueTimers().
|
private |
Queued groups.
Definition at line 123 of file LFGQueue.h.
Referenced by AddQueueData(), AddToQueue(), CheckCompatibility(), DumpQueueInfo(), GetJoinTime(), HasQueueData(), RemoveFromQueue(), RemoveQueueData(), and UpdateQueueTimers().
|
private |
Average wait time to find a group queuing as multiple roles.
Definition at line 126 of file LFGQueue.h.
Referenced by UpdateQueueTimers(), and UpdateWaitTimeAvg().
|
private |
Average wait time to find a group queuing as dps.
Definition at line 129 of file LFGQueue.h.
Referenced by UpdateQueueTimers(), and UpdateWaitTimeDps().
|
private |
Average wait time to find a group queuing as healer.
Definition at line 128 of file LFGQueue.h.
Referenced by UpdateQueueTimers(), and UpdateWaitTimeHealer().
|
private |
Average wait time to find a group queuing as tank.
Definition at line 127 of file LFGQueue.h.
Referenced by UpdateQueueTimers(), and UpdateWaitTimeTank().