127 struct LFGDungeonData;
132 struct LfgProposalPlayer;
133 struct LfgPlayerBoot;
319 bool
inLfgDungeonMap(uint64 guid, uint32 map, DifficultyID difficulty);
411 void TeleportPlayer(
Player* player,
bool out,
bool fromOpcode =
false,
bool forceChangeInstance =
false);
518#define sLFGMgr Skyfire::Singleton<lfg::LFGMgr, Skyfire::NullMutex>::instance()
void SetActiveQueueId(uint64 guid, uint8 queueId)
void SendLfgRoleCheckUpdate(uint64 guid, LfgRoleCheck const &roleCheck)
void SetSelectedDungeons(uint64 guid, LfgDungeonSet const &dungeons)
static bool CheckDpsOnlyRoles(LfgRolesMap &groles, uint8 neededDamage)
Assigns queued players to damage roles for role-neutral scenario queues.
void RemovePlayerData(uint64 guid)
bool inLfgDungeonMap(uint64 guid, uint32 map, DifficultyID difficulty)
Check if given guid applied for given map and difficulty. Used to know.
uint32 GetLFGDungeonEntry(uint32 id)
Return Lfg dungeon entry for given dungeon id.
void LoadLFGDungeons(bool reload=false)
Loads dungeons from dbc and adds teleport coords.
void SetupGroupMember(uint64 guid, uint64 gguid)
Initializes player data after loading group data from DB.
void LeaveSoloLfg(uint64 guid, uint32 queueID, bool disconnected=false)
Leaves Solo lfg.
uint32 GetDungeon(uint64 guid, bool asId=true)
Get current dungeon.
LfgProposalContainer ProposalsStore
Current Proposals.
uint64 GetGroup(uint64 guid)
Gets player group.
std::string const & GetComment(uint64 gguid)
Get current player comment (used for LFR).
void SetTeam(uint64 guid, uint8 team)
Sets player team.
void ClearQueueState(uint64 guid, char const *debugMsg)
bool RestoreActiveQueue(uint64 guid)
Restores the active queue id from saved queue data.
bool IsRaidFinderDungeon(uint32 dungeonId)
Check whether the dungeon id belongs to a Raid Finder queue entry.
void LeaveLfg(uint64 guid, bool disconnected=false)
Leaves lfg.
uint8 RemovePlayerFromGroup(uint64 gguid, uint64 guid)
Removes a player from a group.
LFGDungeonContainer LfgDungeonStore
LfgPlayerBootContainer BootsStore
Current player kicks.
LfgDungeonSet const & GetSelectedDungeons(uint64 guid)
Get selected dungeons.
uint8 GetTeam(uint64 guid)
void SetComment(uint64 guid, std::string const &comment)
Sets player lfr comment.
void ClearGroupQueueState(uint64 guid, char const *debugMsg, bool sendUpdate)
void UpdateBoot(uint64 guid, bool accept)
Updates player boot proposal with new player answer.
void SetGroup(uint64 guid, uint64 group)
Sets player group.
void SendLfgUpdateStatus(uint64 guid, LfgUpdateData const &data, bool party)
bool m_debugRequirementOverride
bypasses LFG entry requirements for server-wide debugging
std::string DumpQueueInfo(bool full=false)
Dumps the state of the queue - Only for internal testing.
bool selectedRandomLfgDungeon(uint64 guid)
Check if given guid applied for random dungeon.
void SetDebugRequirementOverride(bool enabled)
Sets the server-wide debug override for dungeon and raid finder requirements.
LfgGuidSet const & GetPlayers(uint64 guid)
void DecreaseKicksLeft(uint64 guid)
time_t GetQueueJoinTime(uint64 guid)
Gets queue join time.
LfgUpdateData GetLfgStatus(uint64 guid)
Returns current lfg status.
void RestoreOrClearState(uint64 guid, char const *debugMsg)
void UpdateRoleCheck(uint64 gguid, uint64 guid=0, uint8 roles=PLAYER_ROLE_NONE)
Updates the role check with player answer.
uint32 GetOptions()
Gets current lfg options.
LfgState GetState(uint64 guid)
Get current lfg state.
LfgLockMap const GetLockedDungeons(uint64 guid)
Get locked dungeons.
void GetCompatibleDungeons(LfgDungeonSet &dungeons, LfgGuidSet const &players, LfgLockPartyMap &lockMap, bool isContinue)
LfgDungeonSet const & GetDungeonsByRandom(uint32 randomdungeon)
void ClearDungeonGroupState(uint64 guid, uint32 dbGuid, char const *debugMsg, bool sendUpdate)
Clears active dungeon finder state for an LFG dungeon group.
bool MakeNewGroup(LfgProposal const &proposal)
void SetRoles(uint64 guid, uint8 roles)
Sets player lfg roles.
static void SendLfgQueueStatus(uint64 guid, LfgQueueStatusData const &data)
Sends queue status to player.
uint8 GetKicksLeft(uint64 gguid)
Get kicks left in current group.
void SetDungeon(uint64 guid, uint32 dungeon)
void SendLfgBootProposalUpdate(uint64 guid, LfgPlayerBoot const &boot)
bool IsVoteKickActive(uint64 gguid)
Get current vote kick state.
void LoadRewards()
Loads rewards for random dungeons.
void SendLfgUpdateProposal(uint64 guid, LfgProposal const &proposal)
LfgCachedDungeonContainer CachedDungeonMapStore
Stores all dungeons by groupType.
bool isOptionEnabled(uint32 option)
Checks if given lfg option is enabled.
void Clean()
Clears queue - Only for internal testing.
LfgRoleCheckContainer RoleChecksStore
Current Role checks.
void TeleportDungeonGroupOut(Group *group)
Teleport online members of an LFG dungeon group back to their saved entry points.
void SetOptions(uint32 options)
Sets new lfg options.
uint32 m_lfgProposalId
used as internal counter for proposals
void AddPlayerToGroup(uint64 gguid, uint64 guid)
Adds player to group.
LFGDungeonData const * GetLFGDungeon(uint32 id)
void RemoveProposal(LfgProposalContainer::iterator itProposal, LfgUpdateType type)
bool m_debugFlexRaidMinimumOverride
allows flexible raid queues to form below normal minimum for debugging
void SetVoteKick(uint64 guid, bool active)
void TeleportPlayer(Player *player, bool out, bool fromOpcode=false, bool forceChangeInstance=false)
Teleport a player to/from selected dungeon.
uint64 GetLeader(uint64 guid)
Get leader of the group (using internal data).
void JoinLfg(Player *player, uint8 roles, LfgDungeonSet &dungeons, std::string const &comment)
Join Lfg with selected roles, dungeons and comment.
uint8 GetActiveQueueId(uint64 guid)
Get active LFG queue id.
LfgRewardContainer RewardMapStore
Stores rewards for random dungeons.
void RestoreState(uint64 guid, char const *debugMsg)
uint8 GetQueueId(uint64 guid)
Returns queue id.
LFGQueue & GetQueue(uint64 guid)
uint8 GetPlayerCount(uint64 guid)
Gets the player count of given group.
void SendLfgJoinResult(uint64 guid, LfgJoinResultData const &data)
LfgGroupDataContainer GroupsStore
Group data.
static bool HasIgnore(uint64 guid1, uint64 guid2)
Checks if given players are ignoring each other.
bool IsDebugRequirementOverrideEnabled() const
Gets the server-wide debug override for dungeon and raid finder requirements.
void ClearState(uint64 guid, char const *debugMsg)
void UpdateProposal(uint32 proposalId, uint64 guid, bool accept)
Updates proposal to join dungeon with player answer.
uint32 m_options
Stores config options.
void _LoadFromDB(Field *fields, uint64 guid)
Load Lfg group info from DB.
static bool CheckGroupRoles(LfgRolesMap &groles)
Checks if given roles match, modifies given roles map with new roles.
void SetState(uint64 guid, LfgState state)
void SetLeader(uint64 gguid, uint64 leader)
Sets the leader of the group.
uint8 GetRoles(uint64 guid)
Get current player roles.
LfgPlayerDataContainer PlayersStore
Player data.
LfgQueueContainer QueuesStore
Queues.
uint32 AddProposal(LfgProposal &proposal)
Add a new Proposal.
void FinishDungeon(uint64 gguid, uint32 dungeonId)
Finish the dungeon for the given group. All check are performed using internal lfg data.
bool IsSeasonActive(uint32 dungeonId)
Checks if Seasonal dungeon is active.
bool AllQueued(LfgGuidList const &check)
Checks if all players are queued.
LfgType GetDungeonType(uint32 dungeon)
static bool CheckFlexibleRaidRoles(LfgRolesMap &groles, uint8 maxPlayers)
Assigns queued players to their preferred combat role for flexible raid queues.
void _SaveToDB(uint64 guid, uint32 db_guid)
void SetDebugFlexRaidMinimumOverride(bool enabled)
Sets the server-wide debug override for flexible raid minimum group size.
std::string DumpGroupInfo(uint64 guid)
Dumps queue-scoped group state - Only for internal testing.
std::string DumpPlayerInfo(uint64 guid)
Dumps queue-scoped player state - Only for internal testing.
LfgState GetOldState(uint64 guid)
Get last lfg state (NONE, DUNGEON or FINISHED_DUNGEON).
bool IsFlexibleRaidDungeon(uint32 dungeonId)
Check whether the dungeon id belongs to a flexible raid queue entry.
void SendLfgRoleChosen(uint64 guid, uint64 pguid, uint8 roles)
LfgReward const * GetRandomDungeonReward(uint32 dungeon, uint8 level)
Gets the random dungeon reward corresponding to given dungeon and player level.
bool IsLfgGroup(uint64 guid)
Check if given group guid is lfg.
bool IsDebugFlexRaidMinimumOverrideEnabled() const
Gets the server-wide debug override for flexible raid minimum group size.
bool SendActiveProposal(uint64 guid)
Resends an active dungeon proposal to a player if one exists.
void InitBoot(uint64 gguid, uint64 kguid, uint64 vguid, std::string const &reason)
Inits new proposal to boot a player.
uint32 m_QueueTimer
used to check interval of update
void RemoveGroupData(uint64 guid)
Removes saved group data.
uint32 GetDungeonMapId(uint64 guid)
Get the map id of the current dungeon.
LfgDungeonSet GetRandomAndSeasonalDungeons(uint8 level, uint8 expansion)
Returns all random and seasonal dungeons for given level and expansion.
uint8 GetLFGDungeonCategory(uint32 id)
Return Lfg dungeon category for given dungeon id.
UNORDERED_MAP< uint32, LFGDungeonData > LFGDungeonContainer
@ LFG_OPTION_ENABLE_DUNGEON_FINDER
@ LFG_OPTION_ENABLE_RAID_BROWSER
LfgTeleportError
Teleport errors.
@ LFG_TELEPORTERROR_INVALID_LOCATION
@ LFG_TELEPORTERROR_FATIGUE
@ LFG_TELEPORTERROR_PLAYER_DEAD
@ LFG_TELEPORTERROR_CHARMING
@ LFG_TELEPORTERROR_FALLING
@ LFG_TELEPORTERROR_IN_COMBAT
@ LFG_TELEPORTERROR_IN_VEHICLE
@ 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< uint64, LfgPlayerBoot > LfgPlayerBootContainer
std::map< uint32, LfgLockData > LfgLockMap
std::map< uint64, LfgProposalPlayer > LfgProposalPlayerContainer
std::map< uint8, LfgDungeonSet > LfgCachedDungeonContainer
std::map< uint8, LFGQueue > LfgQueueContainer
std::set< uint32 > LfgDungeonSet
std::map< uint64, LfgAnswer > LfgAnswerContainer
std::map< uint64, LfgGroupData > LfgGroupDataContainer
std::map< uint64, LfgRoleCheck > LfgRoleCheckContainer
std::list< uint64 > LfgGuidList
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< uint64, uint8 > LfgRolesMap
std::map< uint64, LfgPlayerData > LfgPlayerDataContainer
std::map< uint32, LfgProposal > LfgProposalContainer
std::multimap< uint32, LfgReward const * > LfgRewardContainer
std::set< uint64 > LfgGuidSet
std::map< uint64, LfgLockMap > LfgLockPartyMap
LfgProposalState
Proposal states.
@ LFG_PROPOSAL_INITIATING
LfgJoinResult
Queue join results.
@ LFG_JOIN_TOO_MUCH_MEMBERS
@ LFG_JOIN_DUNGEON_INVALID
@ LFG_JOIN_ROLE_CHECK_FAILED
@ LFG_JOIN_USING_BG_SYSTEM
@ LFG_JOIN_INTERNAL_ERROR
@ LFG_JOIN_MIXED_RAID_DUNGEON
@ LFG_JOIN_RANDOM_COOLDOWN
@ LFG_JOIN_PARTY_INFO_FAILED
@ LFG_JOIN_PARTY_RANDOM_COOLDOWN
@ LFG_JOIN_PARTY_DESERTER
LFGDungeonData(LFGDungeonEntry const *dbc)
LfgJoinResultData(LfgJoinResult _result=LFG_JOIN_OK, LfgRoleCheckState _state=LFG_ROLECHECK_DEFAULT)
Stores information of a current vote to kick someone from a group.
uint64 victim
Player guid to be kicked (can't vote).
std::string reason
kick reason
time_t cancelTime
Time left to vote.
LfgAnswerContainer votes
Player votes (-1 not answer | 0 Not agree | 1 agree).
bool inProgress
Vote in progress.
LfgPlayerRewardData(uint32 random, uint32 current, bool _done, Quest const *_quest)
Stores group data related to proposal to join.
LfgGuidList showorder
Show order in update window.
uint32 dungeonId
Dungeon to join.
uint64 group
Proposal group (0 if new).
LfgGuidList queues
Queue Ids to remove/readd.
uint32 encounters
Dungeon Encounters.
uint64 leader
Leader guid.
LfgProposalPlayerContainer players
Players data.
bool isNew
Determines if it's new group or not.
LfgProposalState state
State of the proposal.
LfgProposal(uint32 dungeon=0)
time_t cancelTime
Time when we will cancel this proposal.
LfgAnswer accept
Accept status (-1 not answer | 0 Not agree | 1 agree).
uint64 group
Original group guid. 0 if no original group.
LfgQueueStatusData(uint8 _queueId=0, uint32 _dungeonId=0, time_t _joinTime=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
Dungeons group is applying for (expanded random dungeons).
LfgRolesMap roles
Player selected roles.
uint64 leader
Leader of the group.
LfgRoleCheckState state
State of the rolecheck.
time_t cancelTime
Time when the rolecheck will fail.
uint32 rDungeonId
Random Dungeon Id.
LfgUpdateData(LfgUpdateType _type=LFG_UPDATETYPE_DEFAULT)
LfgUpdateData(LfgUpdateType _type, LfgState _state, LfgDungeonSet const &_dungeons, std::string const &_comment="")
LfgUpdateData(LfgUpdateType _type, LfgDungeonSet const &_dungeons, std::string const &_comment)