27#include <unordered_map>
154struct LFGDungeonData;
159struct LfgProposalPlayer;
327 static LFGMgr* instance();
334 void OnDungeonEncounterDone(
ObjectGuid gguid, std::array<uint32, 4>
const& dungeonEncounterId,
Map const* currMap);
340 void LoadLFGDungeons(
bool reload =
false);
344 bool selectedRandomLfgDungeon(
ObjectGuid guid);
374 void SetOptions(
uint32 options);
376 bool isOptionEnabled(
uint32 option);
380 std::string DumpQueueInfo(
bool full =
false);
406 bool IsSeasonActive(
uint32 dungeonId);
412 void TeleportPlayer(
Player* player,
bool out,
bool fromOpcode =
false);
416 void UpdateBoot(
ObjectGuid guid,
bool accept);
426 void LeaveLfg(
ObjectGuid guid,
bool disconnected =
false);
442 bool AllQueued(
GuidList const& check);
455 void RestoreState(
ObjectGuid guid,
char const* debugMsg);
462 void SetVoteKick(
ObjectGuid gguid,
bool active);
464 void GetCompatibleDungeons(
LfgDungeonSet* dungeons,
GuidSet const& players,
LfgLockPartyMap* lockMap, std::vector<std::string const*>* playersMissingRequirement,
bool isContinue);
469 void RemoveProposal(LfgProposalContainer::iterator itProposal,
LfgUpdateType type);
507#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
TC_GAME_API HashMapHolder< Player >::MapType const & GetPlayers()
void Update(VignetteData &vignette, WorldObject const *owner)
@ 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
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_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
LfgJoinResultData(LfgJoinResult _result=LFG_JOIN_OK, LfgRoleCheckState _state=LFG_ROLECHECK_DEFAULT)
std::vector< std::string const * > playersMissingRequirement
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)