28#include <unordered_map>
157struct LFGDungeonData;
162struct LfgProposalPlayer;
330 static LFGMgr* instance();
337 void OnDungeonEncounterDone(
ObjectGuid gguid, std::span<uint32 const> dungeonEncounters,
Map const* currMap);
343 void LoadLFGDungeons();
347 bool selectedRandomLfgDungeon(
ObjectGuid guid);
377 void SetOptions(
uint32 options);
379 bool isOptionEnabled(
uint32 option);
383 std::string DumpQueueInfo(
bool full =
false);
409 bool IsSeasonActive(
uint32 dungeonId);
413 LfgDungeonSet GetRandomAndSeasonalDungeons(
uint8 level,
uint8 expansion, std::span<uint32 const> contentTuningReplacementConditionMask);
415 void TeleportPlayer(
Player* player,
bool out,
bool fromOpcode =
false);
419 void UpdateBoot(
ObjectGuid guid,
bool accept);
429 void LeaveLfg(
ObjectGuid guid,
bool disconnected =
false);
445 bool AllQueued(
GuidList const& check);
458 void RestoreState(
ObjectGuid guid,
char const* debugMsg);
465 void SetVoteKick(
ObjectGuid gguid,
bool active);
467 void GetCompatibleDungeons(
LfgDungeonSet* dungeons,
GuidSet const& players,
LfgLockPartyMap* lockMap, std::vector<std::string_view>* playersMissingRequirement,
bool isContinue);
472 void RemoveProposal(LfgProposalContainer::iterator itProposal,
LfgUpdateType type);
515#define sLFGMgr lfg::LFGMgr::instance()
std::list< ObjectGuid > GuidList
std::set< ObjectGuid > GuidSet
Class used to access individual fields of database query result.
static ObjectGuid const Empty
LFGMgr & operator=(LFGMgr &&right)=delete
LfgProposalContainer ProposalsStore
Current Role checks.
LFGDungeonContainer LfgDungeonStore
Stores rewards for random dungeons.
LfgPlayerBootContainer BootsStore
Current Proposals.
LFGMgr & operator=(LFGMgr const &right)=delete
LfgCachedDungeonContainer CachedDungeonMapStore
Queues.
LfgRoleCheckContainer RoleChecksStore
uint32 m_lfgProposalId
used to check interval of update
void ClearState(ObjectGuid guid, char const *debugMsg)
LfgRewardContainer RewardMapStore
Stores all dungeons by groupType.
LfgGroupDataContainer GroupsStore
Player data.
uint32 m_options
used as internal counter for proposals
LFGMgr(LFGMgr &&right)=delete
LfgPlayerDataContainer PlayersStore
Current player kicks.
LfgQueueContainer QueuesStore
Stores config options.
LFGMgr(LFGMgr const &right)=delete
@ LFG_OPTION_ENABLE_DUNGEON_FINDER
@ LFG_OPTION_ENABLE_RAID_BROWSER
std::map< ObjectGuid, LfgGroupData > LfgGroupDataContainer
std::map< ObjectGuid, uint8 > LfgRolesMap
std::unordered_map< uint32, LFGDungeonData > LFGDungeonContainer
std::map< ObjectGuid, LfgAnswer > LfgAnswerContainer
@ LFG_SPELL_DUNGEON_COOLDOWN
@ LFG_GROUP_KICK_VOTES_NEEDED
@ LFG_SPELL_LUCK_OF_THE_DRAW
@ LFG_QUEUEUPDATE_INTERVAL
@ LFG_SPELL_DUNGEON_DESERTER
LfgType
Determines the type of instance.
LfgAnswer
Answer state (Also used to check compatibilites)
std::map< ObjectGuid, LfgPlayerData > LfgPlayerDataContainer
std::map< uint8, LfgDungeonSet > LfgCachedDungeonContainer
std::map< uint8, LFGQueue > LfgQueueContainer
LfgTeleportResult
Teleport errors.
@ LFG_TELEPORT_RESULT_EXHAUSTION
@ LFG_TELEPORT_RESULT_FALLING
@ LFG_TELEPORT_RESULT_NO_RETURN_LOCATION
@ LFG_TELEPORT_RESULT_ON_TRANSPORT
@ LFG_TELEPORT_RESULT_IMMUNE_TO_SUMMONS
@ LFG_TELEPORT_RESULT_NONE
@ LFG_TELEPORT_RESULT_DEAD
std::set< uint32 > LfgDungeonSet
std::map< ObjectGuid, LfgPlayerBoot > LfgPlayerBootContainer
LfgRoleCheckState
Role check states.
@ LFG_ROLECHECK_WRONG_ROLES
@ LFG_ROLECHECK_MISSING_ROLE
@ LFG_ROLECHECK_INITIALITING
std::pair< LfgRewardContainer::const_iterator, LfgRewardContainer::const_iterator > LfgRewardContainerBounds
int32 format_as(LfgUpdateType e)
std::map< uint32, LfgProposal > LfgProposalContainer
std::map< ObjectGuid, LfgRoleCheck > LfgRoleCheckContainer
std::map< ObjectGuid, LfgLockMap > LfgLockPartyMap
std::multimap< uint32, LfgReward const * > LfgRewardContainer
std::map< uint32, LfgLockInfoData > LfgLockMap
LfgProposalState
Proposal states.
@ LFG_PROPOSAL_INITIATING
LfgJoinResult
Queue join results.
@ LFG_JOIN_RANDOM_COOLDOWN_PLAYER
@ LFG_JOIN_GET_INFO_TIMEOUT
@ LFG_JOIN_MEMBERS_NOT_PRESENT
@ LFG_JOIN_ROLE_CHECK_FAILED
@ LFG_JOIN_ALREADY_USING_LFG_LIST
@ LFG_JOIN_REASON_TOO_MANY_LFG
@ LFG_JOIN_TOO_FEW_MEMBERS
@ LFG_JOIN_PARTY_NOT_MEET_REQS
@ LFG_JOIN_RANDOM_COOLDOWN_PARTY
@ LFG_JOIN_TOO_MANY_MEMBERS
@ LFG_JOIN_CANT_USE_DUNGEONS
@ LFG_NO_CROSS_FACTION_PARTIES
@ LFG_JOIN_MISMATCHED_SLOTS
@ LFG_JOIN_DESERTER_PLAYER
@ LFG_JOIN_PARTY_PLAYERS_FROM_DIFFERENT_REALMS
@ LFG_JOIN_DESERTER_PARTY
@ LFG_JOIN_MISMATCHED_SLOTS_LOCAL_XREALM
std::map< ObjectGuid, LfgProposalPlayer > LfgProposalPlayerContainer
uint32 finalDungeonEncounterId
std::vector< std::string_view > playersMissingRequirement
LfgJoinResultData(LfgJoinResult _result=LFG_JOIN_OK, LfgRoleCheckState _state=LFG_ROLECHECK_DEFAULT)
Stores information of a current vote to kick someone from a group.
std::string reason
Player guid to be kicked (can't vote)
LfgAnswerContainer votes
Vote in progress.
bool inProgress
Time left to vote.
ObjectGuid victim
Player votes (-1 not answer | 0 Not agree | 1 agree)
LfgPlayerRewardData(uint32 random, uint32 current, bool _done, Quest const *_quest)
Stores player data related to proposal to join.
ObjectGuid group
Accept status (-1 not answer | 0 Not agree | 1 agree)
LfgAnswer accept
Proposed role.
Stores group data related to proposal to join.
ObjectGuid leader
Proposal group (0 if new)
uint32 dungeonId
Proposal Id.
GuidList showorder
Queue Ids to remove/readd.
uint32 encounters
Time when we will cancel this proposal.
GuidList queues
Determines if it's new group or not.
LfgProposalPlayerContainer players
Show order in update window.
bool isNew
Dungeon Encounters.
LfgProposalState state
Dungeon to join.
ObjectGuid group
State of the proposal.
LfgProposal(uint32 dungeon=0)
time_t cancelTime
Leader guid.
LfgQueueStatusData(uint8 _queueId=0, uint32 _dungeonId=0, int32 _waitTime=-1, int32 _waitTimeAvg=-1, int32 _waitTimeTank=-1, int32 _waitTimeHealer=-1, int32 _waitTimeDps=-1, uint32 _queuedTime=0, uint8 _tanks=0, uint8 _healers=0, uint8 _dps=0)
LfgReward(uint32 _maxLevel=0, uint32 _firstQuest=0, uint32 _otherQuest=0)
Stores all rolecheck info of a group that wants to join.
LfgDungeonSet dungeons
State of the rolecheck.
LfgRolesMap roles
Time when the rolecheck will fail.
LfgRoleCheckState state
Player selected roles.
ObjectGuid leader
Random Dungeon Id.
uint32 rDungeonId
Dungeons group is applying for (expanded random dungeons)
LfgUpdateData(LfgUpdateType _type=LFG_UPDATETYPE_DEFAULT)
LfgUpdateData(LfgUpdateType _type, LfgDungeonSet const &_dungeons)
LfgUpdateData(LfgUpdateType _type, LfgState _state, LfgDungeonSet const &_dungeons)