Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
lfg::LFGMgr Class Reference

#include <LFGMgr.h>

Public Member Functions

void _LoadFromDB (Field *fields, uint64 guid)
 Load Lfg group info from DB.
void AddPlayerToGroup (uint64 gguid, uint64 guid)
 Adds player to group.
uint32 AddProposal (LfgProposal &proposal)
 Add a new Proposal.
bool AllQueued (LfgGuidList const &check)
 Checks if all players are queued.
void Clean ()
 Clears queue - Only for internal testing.
void ClearDungeonGroupState (uint64 guid, uint32 dbGuid, char const *debugMsg, bool sendUpdate)
 Clears active dungeon finder state for an LFG dungeon group.
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.
std::string DumpQueueInfo (bool full=false)
 Dumps the state of the queue - Only for internal testing.
void FinishDungeon (uint64 gguid, uint32 dungeonId)
 Finish the dungeon for the given group. All check are performed using internal lfg data.
uint8 GetActiveQueueId (uint64 guid)
 Get active LFG queue id.
std::string const & GetComment (uint64 gguid)
 Get current player comment (used for LFR).
uint32 GetDungeon (uint64 guid, bool asId=true)
 Get current dungeon.
uint32 GetDungeonMapId (uint64 guid)
 Get the map id of the current dungeon.
uint64 GetGroup (uint64 guid)
 Gets player group.
uint8 GetKicksLeft (uint64 gguid)
 Get kicks left in current group.
uint64 GetLeader (uint64 guid)
 Get leader of the group (using internal data).
uint8 GetLFGDungeonCategory (uint32 id)
 Return Lfg dungeon category for given dungeon id.
uint32 GetLFGDungeonEntry (uint32 id)
 Return Lfg dungeon entry for given dungeon id.
LfgUpdateData GetLfgStatus (uint64 guid)
 Returns current lfg status.
LfgLockMap const GetLockedDungeons (uint64 guid)
 Get locked dungeons.
LfgState GetOldState (uint64 guid)
 Get last lfg state (NONE, DUNGEON or FINISHED_DUNGEON).
uint32 GetOptions ()
 Gets current lfg options.
uint8 GetPlayerCount (uint64 guid)
 Gets the player count of given group.
uint8 GetQueueId (uint64 guid)
 Returns queue id.
time_t GetQueueJoinTime (uint64 guid)
 Gets queue join time.
LfgDungeonSet GetRandomAndSeasonalDungeons (uint8 level, uint8 expansion)
 Returns all random and seasonal dungeons for given level and expansion.
LfgReward const * GetRandomDungeonReward (uint32 dungeon, uint8 level)
 Gets the random dungeon reward corresponding to given dungeon and player level.
uint8 GetRoles (uint64 guid)
 Get current player roles.
LfgDungeonSet const & GetSelectedDungeons (uint64 guid)
 Get selected dungeons.
LfgState GetState (uint64 guid)
 Get current lfg state.
void InitBoot (uint64 gguid, uint64 kguid, uint64 vguid, std::string const &reason)
 Inits new proposal to boot a player.
bool inLfgDungeonMap (uint64 guid, uint32 map, DifficultyID difficulty)
 Check if given guid applied for given map and difficulty. Used to know.
bool IsDebugFlexRaidMinimumOverrideEnabled () const
 Gets the server-wide debug override for flexible raid minimum group size.
bool IsDebugRequirementOverrideEnabled () const
 Gets the server-wide debug override for dungeon and raid finder requirements.
bool IsFlexibleRaidDungeon (uint32 dungeonId)
 Check whether the dungeon id belongs to a flexible raid queue entry.
bool IsLfgGroup (uint64 guid)
 Check if given group guid is lfg.
bool isOptionEnabled (uint32 option)
 Checks if given lfg option is enabled.
bool IsRaidFinderDungeon (uint32 dungeonId)
 Check whether the dungeon id belongs to a Raid Finder queue entry.
bool IsSeasonActive (uint32 dungeonId)
 Checks if Seasonal dungeon is active.
bool IsVoteKickActive (uint64 gguid)
 Get current vote kick state.
void JoinLfg (Player *player, uint8 roles, LfgDungeonSet &dungeons, std::string const &comment)
 Join Lfg with selected roles, dungeons and comment.
void LeaveLfg (uint64 guid, bool disconnected=false)
 Leaves lfg.
void LeaveSoloLfg (uint64 guid, uint32 queueID, bool disconnected=false)
 Leaves Solo lfg.
void LoadLFGDungeons (bool reload=false)
 Loads dungeons from dbc and adds teleport coords.
void LoadRewards ()
 Loads rewards for random dungeons.
void RemoveGroupData (uint64 guid)
 Removes saved group data.
uint8 RemovePlayerFromGroup (uint64 gguid, uint64 guid)
 Removes a player from a group.
bool RestoreActiveQueue (uint64 guid)
 Restores the active queue id from saved queue data.
bool selectedRandomLfgDungeon (uint64 guid)
 Check if given guid applied for random dungeon.
bool SendActiveProposal (uint64 guid)
 Resends an active dungeon proposal to a player if one exists.
void SetComment (uint64 guid, std::string const &comment)
 Sets player lfr comment.
void SetDebugFlexRaidMinimumOverride (bool enabled)
 Sets the server-wide debug override for flexible raid minimum group size.
void SetDebugRequirementOverride (bool enabled)
 Sets the server-wide debug override for dungeon and raid finder requirements.
void SetGroup (uint64 guid, uint64 group)
 Sets player group.
void SetLeader (uint64 gguid, uint64 leader)
 Sets the leader of the group.
void SetOptions (uint32 options)
 Sets new lfg options.
void SetRoles (uint64 guid, uint8 roles)
 Sets player lfg roles.
void SetTeam (uint64 guid, uint8 team)
 Sets player team.
void SetupGroupMember (uint64 guid, uint64 gguid)
 Initializes player data after loading group data from DB.
void TeleportDungeonGroupOut (Group *group)
 Teleport online members of an LFG dungeon group back to their saved entry points.
void TeleportPlayer (Player *player, bool out, bool fromOpcode=false, bool forceChangeInstance=false)
 Teleport a player to/from selected dungeon.
void Update (uint32 diff)
void UpdateBoot (uint64 guid, bool accept)
 Updates player boot proposal with new player answer.
void UpdateProposal (uint32 proposalId, uint64 guid, bool accept)
 Updates proposal to join dungeon with player answer.
void UpdateRoleCheck (uint64 gguid, uint64 guid=0, uint8 roles=PLAYER_ROLE_NONE)
 Updates the role check with player answer.

Static Public Member Functions

static bool CheckDpsOnlyRoles (LfgRolesMap &groles, uint8 neededDamage)
 Assigns queued players to damage roles for role-neutral scenario queues.
static bool CheckFlexibleRaidRoles (LfgRolesMap &groles, uint8 maxPlayers)
 Assigns queued players to their preferred combat role for flexible raid queues.
static bool CheckGroupRoles (LfgRolesMap &groles)
 Checks if given roles match, modifies given roles map with new roles.
static bool HasIgnore (uint64 guid1, uint64 guid2)
 Checks if given players are ignoring each other.
static void SendLfgQueueStatus (uint64 guid, LfgQueueStatusData const &data)
 Sends queue status to player.

Private Member Functions

void _SaveToDB (uint64 guid, uint32 db_guid)
void ClearGroupQueueState (uint64 guid, char const *debugMsg, bool sendUpdate)
void ClearQueueState (uint64 guid, char const *debugMsg)
void ClearState (uint64 guid, char const *debugMsg)
void DecreaseKicksLeft (uint64 guid)
void GetCompatibleDungeons (LfgDungeonSet &dungeons, LfgGuidSet const &players, LfgLockPartyMap &lockMap, bool isContinue)
LfgDungeonSet const & GetDungeonsByRandom (uint32 randomdungeon)
LfgType GetDungeonType (uint32 dungeon)
LFGDungeonData const * GetLFGDungeon (uint32 id)
LfgGuidSet const & GetPlayers (uint64 guid)
LFGQueueGetQueue (uint64 guid)
uint8 GetTeam (uint64 guid)
 LFGMgr ()
bool MakeNewGroup (LfgProposal const &proposal)
void RemovePlayerData (uint64 guid)
void RemoveProposal (LfgProposalContainer::iterator itProposal, LfgUpdateType type)
void RestoreOrClearState (uint64 guid, char const *debugMsg)
void RestoreState (uint64 guid, char const *debugMsg)
void SendLfgBootProposalUpdate (uint64 guid, LfgPlayerBoot const &boot)
void SendLfgJoinResult (uint64 guid, LfgJoinResultData const &data)
void SendLfgRoleCheckUpdate (uint64 guid, LfgRoleCheck const &roleCheck)
void SendLfgRoleChosen (uint64 guid, uint64 pguid, uint8 roles)
void SendLfgUpdateProposal (uint64 guid, LfgProposal const &proposal)
void SendLfgUpdateStatus (uint64 guid, LfgUpdateData const &data, bool party)
void SetActiveQueueId (uint64 guid, uint8 queueId)
void SetDungeon (uint64 guid, uint32 dungeon)
void SetSelectedDungeons (uint64 guid, LfgDungeonSet const &dungeons)
void SetState (uint64 guid, LfgState state)
void SetVoteKick (uint64 guid, bool active)
 ~LFGMgr ()

Private Attributes

LfgPlayerBootContainer BootsStore
 Current player kicks.
LfgCachedDungeonContainer CachedDungeonMapStore
 Stores all dungeons by groupType.
LfgGroupDataContainer GroupsStore
 Group data.
LFGDungeonContainer LfgDungeonStore
bool m_debugFlexRaidMinimumOverride
 allows flexible raid queues to form below normal minimum for debugging
bool m_debugRequirementOverride
 bypasses LFG entry requirements for server-wide debugging
uint32 m_lfgProposalId
 used as internal counter for proposals
uint32 m_options
 Stores config options.
uint32 m_QueueTimer
 used to check interval of update
LfgPlayerDataContainer PlayersStore
 Player data.
LfgProposalContainer ProposalsStore
 Current Proposals.
LfgQueueContainer QueuesStore
 Queues.
LfgRewardContainer RewardMapStore
 Stores rewards for random dungeons.
LfgRoleCheckContainer RoleChecksStore
 Current Role checks.

Friends

class Skyfire::Singleton< LFGMgr, Skyfire::NullMutex >

Detailed Description

Definition at line 295 of file LFGMgr.h.

Constructor & Destructor Documentation

◆ LFGMgr()

lfg::LFGMgr::LFGMgr ( )
private

◆ ~LFGMgr()

lfg::LFGMgr::~LFGMgr ( )
private

Definition at line 167 of file LFGMgr.cpp.

References RewardMapStore.

Member Function Documentation

◆ _LoadFromDB()

void lfg::LFGMgr::_LoadFromDB ( Field * fields,
uint64 guid )

◆ _SaveToDB()

void lfg::LFGMgr::_SaveToDB ( uint64 guid,
uint32 db_guid )
private

◆ AddPlayerToGroup()

void lfg::LFGMgr::AddPlayerToGroup ( uint64 gguid,
uint64 guid )

Adds player to group.

Definition at line 2485 of file LFGMgr.cpp.

References GroupsStore.

Referenced by SetupGroupMember().

◆ AddProposal()

uint32 lfg::LFGMgr::AddProposal ( LfgProposal & proposal)

Add a new Proposal.

Definition at line 1294 of file LFGMgr.cpp.

References lfg::LfgProposal::id, m_lfgProposalId, and ProposalsStore.

◆ AllQueued()

bool lfg::LFGMgr::AllQueued ( LfgGuidList const & check)

Checks if all players are queued.

Definition at line 2611 of file LFGMgr.cpp.

References GetState(), lfg::GetStateString(), GUID_LOPART(), lfg::LFG_STATE_PROPOSAL, lfg::LFG_STATE_QUEUED, and SF_LOG_DEBUG.

◆ CheckDpsOnlyRoles()

bool lfg::LFGMgr::CheckDpsOnlyRoles ( LfgRolesMap & groles,
uint8 neededDamage )
static

Assigns queued players to damage roles for role-neutral scenario queues.

Definition at line 1114 of file LFGMgr.cpp.

References lfg::PLAYER_ROLE_DAMAGE, and lfg::PLAYER_ROLE_LEADER.

Referenced by UpdateRoleCheck().

◆ CheckFlexibleRaidRoles()

bool lfg::LFGMgr::CheckFlexibleRaidRoles ( LfgRolesMap & groles,
uint8 maxPlayers )
static

Assigns queued players to their preferred combat role for flexible raid queues.

Definition at line 1125 of file LFGMgr.cpp.

References lfg::PLAYER_ROLE_DAMAGE, lfg::PLAYER_ROLE_HEALER, lfg::PLAYER_ROLE_LEADER, and lfg::PLAYER_ROLE_TANK.

Referenced by UpdateRoleCheck().

◆ CheckGroupRoles()

bool lfg::LFGMgr::CheckGroupRoles ( LfgRolesMap & groles)
static

Checks if given roles match, modifies given roles map with new roles.

Check if a group can be formed with the given group roles

Parameters
[in]grolesMap of roles to check
Returns
True if roles are compatible

Definition at line 1073 of file LFGMgr.cpp.

References MAXGROUPSIZE, lfg::PLAYER_ROLE_LEADER, and lfg::PLAYER_ROLE_NONE.

Referenced by UpdateRoleCheck().

◆ Clean()

void lfg::LFGMgr::Clean ( )

Clears queue - Only for internal testing.

Definition at line 2649 of file LFGMgr.cpp.

References BootsStore, GroupsStore, PlayersStore, ProposalsStore, QueuesStore, RoleChecksStore, and SF_LOG_INFO.

◆ ClearDungeonGroupState()

void lfg::LFGMgr::ClearDungeonGroupState ( uint64 guid,
uint32 dbGuid,
char const * debugMsg,
bool sendUpdate )

Clears active dungeon finder state for an LFG dungeon group.

Definition at line 2354 of file LFGMgr.cpp.

References CHAR_DEL_LFG_DATA, CharacterDatabase, ClearGroupQueueState(), and PreparedStatement::setUInt32().

◆ ClearGroupQueueState()

void lfg::LFGMgr::ClearGroupQueueState ( uint64 guid,
char const * debugMsg,
bool sendUpdate )
private

◆ ClearQueueState()

void lfg::LFGMgr::ClearQueueState ( uint64 guid,
char const * debugMsg )
private

◆ ClearState()

void lfg::LFGMgr::ClearState ( uint64 guid,
char const * debugMsg )
private

Definition at line 2300 of file LFGMgr.cpp.

References ClearQueueState().

◆ DecreaseKicksLeft()

void lfg::LFGMgr::DecreaseKicksLeft ( uint64 guid)
private

Definition at line 2404 of file LFGMgr.cpp.

References GetKicksLeft(), GroupsStore, GUID_LOPART(), and SF_LOG_TRACE.

Referenced by UpdateBoot().

◆ DumpGroupInfo()

◆ DumpPlayerInfo()

◆ DumpQueueInfo()

◆ FinishDungeon()

◆ GetActiveQueueId()

uint8 lfg::LFGMgr::GetActiveQueueId ( uint64 guid)

Get active LFG queue id.

Definition at line 2119 of file LFGMgr.cpp.

References GroupsStore, GUID_LOPART(), IS_GROUP_GUID(), PlayersStore, and SF_LOG_TRACE.

Referenced by MakeNewGroup(), and SetupGroupMember().

◆ GetComment()

const std::string & lfg::LFGMgr::GetComment ( uint64 gguid)

Get current player comment (used for LFR).

Definition at line 2150 of file LFGMgr.cpp.

References GetComment(), GUID_LOPART(), PlayersStore, and SF_LOG_TRACE.

Referenced by GetComment(), RemoveProposal(), Update(), and UpdateRoleCheck().

◆ GetCompatibleDungeons()

void lfg::LFGMgr::GetCompatibleDungeons ( LfgDungeonSet & dungeons,
LfgGuidSet const & players,
LfgLockPartyMap & lockMap,
bool isContinue )
private

Given a list of dungeons remove the dungeons players have restrictions.

Parameters
[in,out]dungeonsDungeons to check restrictions
[in]playersSet of players to check their dungeon restrictions
[out]lockMapMap of players Lock status info of given dungeons (Empty if dungeons is not empty)

Definition at line 1021 of file LFGMgr.cpp.

References ASSERT, lfg::LFGDungeonData::difficulty, ObjectAccessor::FindPlayer(), Player::GetBoundInstance(), GetLFGDungeon(), GetLockedDungeons(), lfg::LFG_LOCKSTATUS_RAID_LOCKED, and lfg::LFGDungeonData::map.

Referenced by JoinLfg().

◆ GetDungeon()

uint32 lfg::LFGMgr::GetDungeon ( uint64 guid,
bool asId = true )

◆ GetDungeonMapId()

uint32 lfg::LFGMgr::GetDungeonMapId ( uint64 guid)

Get the map id of the current dungeon.

Definition at line 2100 of file LFGMgr.cpp.

References GetLFGDungeon(), GroupsStore, GUID_LOPART(), and SF_LOG_TRACE.

◆ GetDungeonsByRandom()

LfgDungeonSet const & lfg::LFGMgr::GetDungeonsByRandom ( uint32 randomdungeon)
private

Get the dungeon list that can be done given a random dungeon entry.

Parameters
[in]randomdungeonRandom dungeon id (if value = 0 will return all dungeons)
Returns
Set of dungeons that can be done.

Definition at line 2005 of file LFGMgr.cpp.

References CachedDungeonMapStore, GetLFGDungeon(), and lfg::LFGDungeonData::group.

Referenced by GetLockedDungeons(), and JoinLfg().

◆ GetDungeonType()

LfgType lfg::LFGMgr::GetDungeonType ( uint32 dungeonId)
private

Given a Dungeon id returns the dungeon Type

Parameters
[in]dungeondungeon id
Returns
Dungeon type

Definition at line 2040 of file LFGMgr.cpp.

References GetLFGDungeon(), lfg::LFG_TYPE_NONE, and lfg::LFGDungeonData::type.

Referenced by JoinLfg().

◆ GetGroup()

uint64 lfg::LFGMgr::GetGroup ( uint64 guid)

Gets player group.

Definition at line 2503 of file LFGMgr.cpp.

References PlayersStore.

Referenced by GetLfgStatus(), GetQueueJoinTime(), inLfgDungeonMap(), LeaveLfg(), MakeNewGroup(), Update(), UpdateBoot(), and UpdateProposal().

◆ GetKicksLeft()

uint8 lfg::LFGMgr::GetKicksLeft ( uint64 gguid)

Get kicks left in current group.

Definition at line 2244 of file LFGMgr.cpp.

References GroupsStore, GUID_LOPART(), and SF_LOG_TRACE.

Referenced by DecreaseKicksLeft().

◆ GetLeader()

uint64 lfg::LFGMgr::GetLeader ( uint64 guid)

Get leader of the group (using internal data).

Definition at line 2523 of file LFGMgr.cpp.

References GroupsStore.

Referenced by LeaveLfg().

◆ GetLFGDungeon()

◆ GetLFGDungeonCategory()

uint8 lfg::LFGMgr::GetLFGDungeonCategory ( uint32 id)

Return Lfg dungeon category for given dungeon id.

Definition at line 3015 of file LFGMgr.cpp.

References GetLFGDungeon().

◆ GetLFGDungeonEntry()

uint32 lfg::LFGMgr::GetLFGDungeonEntry ( uint32 id)

Return Lfg dungeon entry for given dungeon id.

Definition at line 3006 of file LFGMgr.cpp.

References GetLFGDungeon().

Referenced by LoadRewards().

◆ GetLfgStatus()

◆ GetLockedDungeons()

◆ GetOldState()

LfgState lfg::LFGMgr::GetOldState ( uint64 guid)

Get last lfg state (NONE, DUNGEON or FINISHED_DUNGEON).

Definition at line 2077 of file LFGMgr.cpp.

References GroupsStore, GUID_LOPART(), IS_GROUP_GUID(), PlayersStore, and SF_LOG_TRACE.

Referenced by RestoreOrClearState().

◆ GetOptions()

uint32 lfg::LFGMgr::GetOptions ( )

Gets current lfg options.

Definition at line 2668 of file LFGMgr.cpp.

References m_options.

◆ GetPlayerCount()

uint8 lfg::LFGMgr::GetPlayerCount ( uint64 guid)

Gets the player count of given group.

Definition at line 2518 of file LFGMgr.cpp.

References GroupsStore.

◆ GetPlayers()

LfgGuidSet const & lfg::LFGMgr::GetPlayers ( uint64 guid)
private

Definition at line 2513 of file LFGMgr.cpp.

References GroupsStore.

Referenced by FinishDungeon(), and GetQueueId().

◆ GetQueue()

LFGQueue & lfg::LFGMgr::GetQueue ( uint64 guid)
private

Definition at line 2605 of file LFGMgr.cpp.

References GetQueueId(), and QueuesStore.

Referenced by JoinLfg(), LeaveLfg(), LeaveSoloLfg(), RemoveProposal(), UpdateProposal(), and UpdateRoleCheck().

◆ GetQueueId()

◆ GetQueueJoinTime()

time_t lfg::LFGMgr::GetQueueJoinTime ( uint64 guid)

Gets queue join time.

Definition at line 2629 of file LFGMgr.cpp.

References GetGroup(), GetQueueId(), GetState(), IS_GROUP_GUID(), lfg::LFG_STATE_PROPOSAL, lfg::LFG_STATE_QUEUED, and QueuesStore.

◆ GetRandomAndSeasonalDungeons()

LfgDungeonSet lfg::LFGMgr::GetRandomAndSeasonalDungeons ( uint8 level,
uint8 expansion )

◆ GetRandomDungeonReward()

LfgReward const * lfg::LFGMgr::GetRandomDungeonReward ( uint32 dungeon,
uint8 level )

Gets the random dungeon reward corresponding to given dungeon and player level.

Get the reward of a given random dungeon at a certain level

Parameters
[in]dungeondungeon id
[in]levelPlayer level
Returns
Reward

Definition at line 2019 of file LFGMgr.cpp.

References RewardMapStore.

Referenced by FinishDungeon().

◆ GetRoles()

uint8 lfg::LFGMgr::GetRoles ( uint64 guid)

Get current player roles.

Definition at line 2112 of file LFGMgr.cpp.

References GUID_LOPART(), PlayersStore, and SF_LOG_TRACE.

Referenced by UpdateProposal().

◆ GetSelectedDungeons()

LfgDungeonSet const & lfg::LFGMgr::GetSelectedDungeons ( uint64 guid)

◆ GetState()

◆ GetTeam()

uint8 lfg::LFGMgr::GetTeam ( uint64 guid)
private

Definition at line 2473 of file LFGMgr.cpp.

References GUID_LOPART(), PlayersStore, and SF_LOG_TRACE.

Referenced by GetQueueId(), and JoinLfg().

◆ HasIgnore()

bool lfg::LFGMgr::HasIgnore ( uint64 guid1,
uint64 guid2 )
static

Checks if given players are ignoring each other.

Definition at line 2528 of file LFGMgr.cpp.

References ObjectAccessor::FindPlayer(), Player::GetSocial(), GUID_LOPART(), HasIgnore(), and PlayerSocial::HasIgnore().

Referenced by HasIgnore().

◆ InitBoot()

void lfg::LFGMgr::InitBoot ( uint64 gguid,
uint64 kicker,
uint64 victim,
std::string const & reason )

Inits new proposal to boot a player.

Initialize a boot kick vote

Parameters
[in]gguidGroup the vote kicks belongs to
[in]kickerKicker guid
[in]victimVictim guid
[in]reasonKick reason

Definition at line 1615 of file LFGMgr.cpp.

References BootsStore, lfg::LfgPlayerBoot::cancelTime, GroupsStore, GUID_LOPART(), lfg::LfgPlayerBoot::inProgress, lfg::LFG_ANSWER_AGREE, lfg::LFG_ANSWER_DENY, lfg::LFG_ANSWER_PENDING, lfg::LFG_STATE_BOOT, lfg::LFG_TIME_BOOT, lfg::LfgPlayerBoot::reason, SendLfgBootProposalUpdate(), SetState(), SetVoteKick(), SF_LOG_DEBUG, lfg::LfgPlayerBoot::victim, and lfg::LfgPlayerBoot::votes.

◆ inLfgDungeonMap()

bool lfg::LFGMgr::inLfgDungeonMap ( uint64 guid,
uint32 map,
DifficultyID difficulty )

Check if given guid applied for given map and difficulty. Used to know.

Definition at line 2979 of file LFGMgr.cpp.

References GetDungeon(), GetGroup(), GetLFGDungeon(), GetSelectedDungeons(), and IS_GROUP_GUID().

◆ IsDebugFlexRaidMinimumOverrideEnabled()

bool lfg::LFGMgr::IsDebugFlexRaidMinimumOverrideEnabled ( ) const
inline

Gets the server-wide debug override for flexible raid minimum group size.

Definition at line 367 of file LFGMgr.h.

References m_debugFlexRaidMinimumOverride.

◆ IsDebugRequirementOverrideEnabled()

bool lfg::LFGMgr::IsDebugRequirementOverrideEnabled ( ) const
inline

Gets the server-wide debug override for dungeon and raid finder requirements.

Definition at line 363 of file LFGMgr.h.

References IsDebugRequirementOverrideEnabled(), and m_debugRequirementOverride.

Referenced by GetLockedDungeons(), and IsDebugRequirementOverrideEnabled().

◆ IsFlexibleRaidDungeon()

bool lfg::LFGMgr::IsFlexibleRaidDungeon ( uint32 dungeonId)

Check whether the dungeon id belongs to a flexible raid queue entry.

Definition at line 2055 of file LFGMgr.cpp.

References GetLFGDungeon().

Referenced by JoinLfg().

◆ IsLfgGroup()

bool lfg::LFGMgr::IsLfgGroup ( uint64 guid)

Check if given group guid is lfg.

Definition at line 2579 of file LFGMgr.cpp.

References GroupsStore, and IS_GROUP_GUID().

◆ isOptionEnabled()

bool lfg::LFGMgr::isOptionEnabled ( uint32 option)

Checks if given lfg option is enabled.

Definition at line 2663 of file LFGMgr.cpp.

References m_options.

Referenced by Update().

◆ IsRaidFinderDungeon()

bool lfg::LFGMgr::IsRaidFinderDungeon ( uint32 dungeonId)

Check whether the dungeon id belongs to a Raid Finder queue entry.

Definition at line 2049 of file LFGMgr.cpp.

References lfg::LFGDungeonData::difficulty, DIFFICULTY_25MAN_LFR, and GetLFGDungeon().

◆ IsSeasonActive()

bool lfg::LFGMgr::IsSeasonActive ( uint32 dungeonId)

Checks if Seasonal dungeon is active.

Definition at line 2773 of file LFGMgr.cpp.

References HOLIDAY_BREWFEST, HOLIDAY_FIRE_FESTIVAL, HOLIDAY_HALLOWS_END, HOLIDAY_LOVE_IS_IN_THE_AIR, and IsHolidayActive().

Referenced by GetLockedDungeons().

◆ IsVoteKickActive()

bool lfg::LFGMgr::IsVoteKickActive ( uint64 gguid)

Get current vote kick state.

Definition at line 2136 of file LFGMgr.cpp.

References GroupsStore, GUID_LOPART(), and SF_LOG_TRACE.

◆ JoinLfg()

void lfg::LFGMgr::JoinLfg ( Player * player,
uint8 roles,
LfgDungeonSet & dungeons,
std::string const & comment )

Join Lfg with selected roles, dungeons and comment.

Adds the player/group to lfg queue. If player is in a group then it is the leader of the group tying to join the group. Join conditions are checked before adding to the new queue.

Parameters
[in]playerPlayer trying to join (or leader of group trying to join)
[in]rolesPlayer selected roles
[in]dungeonsDungeons the player/group is applying for
[in]commentPlayer selected comment

Definition at line 538 of file LFGMgr.cpp.

References lfg::LFGQueue::AddQueueData(), lfg::LfgRoleCheck::cancelTime, lfg::ConcatenateDungeons(), lfg::LfgRoleCheck::dungeons, GetCompatibleDungeons(), GetDungeon(), GetDungeonsByRandom(), GetDungeonType(), Group::GetFirstMember(), Player::GetGroup(), Group::GetGUID(), Object::GetGUID(), Group::GetMemberRole(), Group::GetMembersCount(), WorldObject::GetName(), GetQueue(), Player::GetSession(), GetState(), GetTeam(), GUID_LOPART(), Unit::HasAura(), WorldSession::HasPermission(), Player::InArena(), Player::InBattleground(), Player::InBattlegroundQueue(), IsFlexibleRaidDungeon(), Group::IsLeader(), Group::isLFGGroup(), lfg::IsValidPlayerRoles(), lfg::LfgRoleCheck::leader, lfg::LFG_JOIN_DESERTER, lfg::LFG_JOIN_DISCONNECTED, lfg::LFG_JOIN_DUNGEON_INVALID, lfg::LFG_JOIN_INTERNAL_ERROR, lfg::LFG_JOIN_MIXED_RAID_DUNGEON, lfg::LFG_JOIN_NOT_MEET_REQS, lfg::LFG_JOIN_OK, lfg::LFG_JOIN_PARTY_DESERTER, lfg::LFG_JOIN_PARTY_RANDOM_COOLDOWN, lfg::LFG_JOIN_RANDOM_COOLDOWN, lfg::LFG_JOIN_ROLE_CHECK_FAILED, lfg::LFG_JOIN_TOO_MUCH_MEMBERS, lfg::LFG_JOIN_USING_BG_SYSTEM, lfg::LFG_ROLECHECK_FINISHED, lfg::LFG_ROLECHECK_INITIALITING, lfg::LFG_ROLECHECK_NO_ROLE, lfg::LFG_SPELL_DUNGEON_COOLDOWN, lfg::LFG_SPELL_DUNGEON_DESERTER, lfg::LFG_STATE_BOOT, lfg::LFG_STATE_DUNGEON, lfg::LFG_STATE_PROPOSAL, lfg::LFG_STATE_QUEUED, lfg::LFG_STATE_ROLECHECK, lfg::LFG_TIME_ROLECHECK, lfg::LFG_TYPE_DUNGEON, lfg::LFG_TYPE_RAID, lfg::LFG_TYPE_RANDOM, lfg::LFG_UPDATETYPE_JOIN_QUEUE, lfg::LfgJoinResultData::lockmap, MAXGROUPSIZE, MAXRAIDSIZE, GroupReference::next(), rbac::RBAC_PERM_JOIN_DUNGEON_FINDER, lfg::LfgRoleCheck::rDungeonId, lfg::LFGQueue::RemoveFromQueue(), lfg::LfgJoinResultData::result, Group::RoleCheckAllResponded(), RoleChecksStore, lfg::LfgRoleCheck::roles, WorldSession::SendLfgJoinResult(), WorldSession::SendLfgUpdateStatus(), SetActiveQueueId(), SetComment(), SetRoles(), SetSelectedDungeons(), SetState(), SF_LOG_DEBUG, lfg::LfgJoinResultData::state, lfg::LfgRoleCheck::state, and UpdateRoleCheck().

◆ LeaveLfg()

void lfg::LFGMgr::LeaveLfg ( uint64 guid,
bool disconnected = false )

◆ LeaveSoloLfg()

◆ LoadLFGDungeons()

◆ LoadRewards()

void lfg::LFGMgr::LoadRewards ( )

Loads rewards for random dungeons.

Load rewards for completing dungeons.

Definition at line 224 of file LFGMgr.cpp.

References CONFIG_MAX_PLAYER_LEVEL, GetLFGDungeonEntry(), getMSTime(), GetMSTimeDiffToNow(), Field::GetUInt32(), Field::GetUInt8(), RewardMapStore, SF_LOG_ERROR, SF_LOG_INFO, sObjectMgr, sWorld, and WorldDatabase.

◆ MakeNewGroup()

◆ RemoveGroupData()

◆ RemovePlayerData()

void lfg::LFGMgr::RemovePlayerData ( uint64 guid)
private

Definition at line 2410 of file LFGMgr.cpp.

References GUID_LOPART(), PlayersStore, and SF_LOG_TRACE.

◆ RemovePlayerFromGroup()

uint8 lfg::LFGMgr::RemovePlayerFromGroup ( uint64 gguid,
uint64 guid )

Removes a player from a group.

Definition at line 2480 of file LFGMgr.cpp.

References GroupsStore.

◆ RemoveProposal()

void lfg::LFGMgr::RemoveProposal ( LfgProposalContainer::iterator itProposal,
LfgUpdateType type )
private

◆ RestoreActiveQueue()

◆ RestoreOrClearState()

void lfg::LFGMgr::RestoreOrClearState ( uint64 guid,
char const * debugMsg )
private

◆ RestoreState()

◆ selectedRandomLfgDungeon()

bool lfg::LFGMgr::selectedRandomLfgDungeon ( uint64 guid)

Check if given guid applied for random dungeon.

Definition at line 2963 of file LFGMgr.cpp.

References GetLFGDungeon(), GetSelectedDungeons(), GetState(), lfg::LFG_STATE_NONE, lfg::LFG_TYPE_RANDOM, lfg::LFGDungeonData::seasonal, and lfg::LFGDungeonData::type.

◆ SendActiveProposal()

bool lfg::LFGMgr::SendActiveProposal ( uint64 guid)

Resends an active dungeon proposal to a player if one exists.

Definition at line 2710 of file LFGMgr.cpp.

References ProposalsStore, and SendLfgUpdateProposal().

◆ SendLfgBootProposalUpdate()

void lfg::LFGMgr::SendLfgBootProposalUpdate ( uint64 guid,
LfgPlayerBoot const & boot )
private

Definition at line 2561 of file LFGMgr.cpp.

References ObjectAccessor::FindPlayer().

Referenced by InitBoot(), Update(), and UpdateBoot().

◆ SendLfgJoinResult()

void lfg::LFGMgr::SendLfgJoinResult ( uint64 guid,
LfgJoinResultData const & data )
private

Definition at line 2555 of file LFGMgr.cpp.

References ObjectAccessor::FindPlayer().

Referenced by Update(), and UpdateRoleCheck().

◆ SendLfgQueueStatus()

void lfg::LFGMgr::SendLfgQueueStatus ( uint64 guid,
LfgQueueStatusData const & data )
static

Sends queue status to player.

Definition at line 2573 of file LFGMgr.cpp.

References ObjectAccessor::FindPlayer().

Referenced by lfg::LFGQueue::UpdateQueueTimers().

◆ SendLfgRoleCheckUpdate()

void lfg::LFGMgr::SendLfgRoleCheckUpdate ( uint64 guid,
LfgRoleCheck const & roleCheck )
private

Definition at line 2543 of file LFGMgr.cpp.

References ObjectAccessor::FindPlayer().

Referenced by Update(), and UpdateRoleCheck().

◆ SendLfgRoleChosen()

void lfg::LFGMgr::SendLfgRoleChosen ( uint64 guid,
uint64 pguid,
uint8 roles )
private

Definition at line 2537 of file LFGMgr.cpp.

References ObjectAccessor::FindPlayer().

Referenced by UpdateRoleCheck().

◆ SendLfgUpdateProposal()

void lfg::LFGMgr::SendLfgUpdateProposal ( uint64 guid,
LfgProposal const & proposal )
private

Definition at line 2567 of file LFGMgr.cpp.

References ObjectAccessor::FindPlayer().

Referenced by RemoveProposal(), SendActiveProposal(), Update(), and UpdateProposal().

◆ SendLfgUpdateStatus()

void lfg::LFGMgr::SendLfgUpdateStatus ( uint64 guid,
LfgUpdateData const & data,
bool party )
private

◆ SetActiveQueueId()

void lfg::LFGMgr::SetActiveQueueId ( uint64 guid,
uint8 queueId )
private

Definition at line 2366 of file LFGMgr.cpp.

References GroupsStore, GUID_LOPART(), IS_GROUP_GUID(), PlayersStore, and SF_LOG_TRACE.

Referenced by JoinLfg(), MakeNewGroup(), and SetupGroupMember().

◆ SetComment()

void lfg::LFGMgr::SetComment ( uint64 guid,
std::string const & comment )

Sets player lfr comment.

Definition at line 2392 of file LFGMgr.cpp.

References GUID_LOPART(), PlayersStore, and SF_LOG_TRACE.

Referenced by JoinLfg().

◆ SetDebugFlexRaidMinimumOverride()

void lfg::LFGMgr::SetDebugFlexRaidMinimumOverride ( bool enabled)
inline

Sets the server-wide debug override for flexible raid minimum group size.

Definition at line 369 of file LFGMgr.h.

References m_debugFlexRaidMinimumOverride.

◆ SetDebugRequirementOverride()

void lfg::LFGMgr::SetDebugRequirementOverride ( bool enabled)
inline

Sets the server-wide debug override for dungeon and raid finder requirements.

Definition at line 365 of file LFGMgr.h.

References m_debugRequirementOverride.

◆ SetDungeon()

void lfg::LFGMgr::SetDungeon ( uint64 guid,
uint32 dungeon )
private

Definition at line 2380 of file LFGMgr.cpp.

References GroupsStore, GUID_LOPART(), and SF_LOG_TRACE.

Referenced by _LoadFromDB(), and MakeNewGroup().

◆ SetGroup()

void lfg::LFGMgr::SetGroup ( uint64 guid,
uint64 group )

Sets player group.

Definition at line 2508 of file LFGMgr.cpp.

References PlayersStore.

Referenced by ClearGroupQueueState(), GetLfgStatus(), RemoveGroupData(), and SetupGroupMember().

◆ SetLeader()

void lfg::LFGMgr::SetLeader ( uint64 gguid,
uint64 leader )

Sets the leader of the group.

Definition at line 2490 of file LFGMgr.cpp.

References GroupsStore.

Referenced by _LoadFromDB(), and MakeNewGroup().

◆ SetOptions()

void lfg::LFGMgr::SetOptions ( uint32 options)

Sets new lfg options.

Definition at line 2673 of file LFGMgr.cpp.

References m_options.

◆ SetRoles()

void lfg::LFGMgr::SetRoles ( uint64 guid,
uint8 roles )

Sets player lfg roles.

Definition at line 2386 of file LFGMgr.cpp.

References GUID_LOPART(), PlayersStore, and SF_LOG_TRACE.

Referenced by JoinLfg(), and UpdateRoleCheck().

◆ SetSelectedDungeons()

void lfg::LFGMgr::SetSelectedDungeons ( uint64 guid,
LfgDungeonSet const & dungeons )
private

Definition at line 2398 of file LFGMgr.cpp.

References lfg::ConcatenateDungeons(), GUID_LOPART(), PlayersStore, and SF_LOG_TRACE.

Referenced by JoinLfg(), and SetupGroupMember().

◆ SetState()

◆ SetTeam()

void lfg::LFGMgr::SetTeam ( uint64 guid,
uint8 team )

Sets player team.

Definition at line 2495 of file LFGMgr.cpp.

References CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP, PlayersStore, and sWorld.

◆ SetupGroupMember()

void lfg::LFGMgr::SetupGroupMember ( uint64 guid,
uint64 gguid )

Initializes player data after loading group data from DB.

Definition at line 2952 of file LFGMgr.cpp.

References AddPlayerToGroup(), GetActiveQueueId(), GetDungeon(), GetState(), SetActiveQueueId(), SetGroup(), SetSelectedDungeons(), and SetState().

Referenced by MakeNewGroup().

◆ SetVoteKick()

void lfg::LFGMgr::SetVoteKick ( uint64 guid,
bool active )
private

◆ TeleportDungeonGroupOut()

void lfg::LFGMgr::TeleportDungeonGroupOut ( Group * group)

◆ TeleportPlayer()

void lfg::LFGMgr::TeleportPlayer ( Player * player,
bool out,
bool fromOpcode = false,
bool forceChangeInstance = false )

Teleport a player to/from selected dungeon.

Teleports the player in or out the dungeon

Parameters
[in]playerPlayer to teleport
[in]outTeleport out (true) or in (false)
[in]fromOpcodeFunction called from opcode handlers? (Default false)

Definition at line 1738 of file LFGMgr.cpp.

References Player::CleanupAfterTaxiFlight(), lfg::LfgPlayerData::ClearReturnLocation(), FATIGUE_TIMER, Unit::GetCharmGUID(), GetDungeon(), Group::GetFirstMember(), Player::GetGroup(), Group::GetGUID(), Object::GetGUID(), GetLFGDungeon(), WorldObject::GetMap(), WorldLocation::GetMapId(), Unit::GetMotionMaster(), WorldObject::GetName(), Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), lfg::LfgPlayerData::GetReturnLocation(), Player::GetSession(), Unit::GetVehicle(), Unit::HasUnitState(), lfg::LFGDungeonData::id, Unit::IsAlive(), Player::IsBeingTeleported(), Unit::IsFalling(), Unit::IsInCombat(), Unit::IsInFlight(), Map::IsInstance(), Group::isLFGGroup(), Player::IsMirrorTimerActive(), lfg::LfgReturnLocation::IsSet, MapManager::IsValidMapCoord(), lfg::LFG_TELEPORTERROR_CHARMING, lfg::LFG_TELEPORTERROR_FALLING, lfg::LFG_TELEPORTERROR_FATIGUE, lfg::LFG_TELEPORTERROR_IN_COMBAT, lfg::LFG_TELEPORTERROR_IN_VEHICLE, lfg::LFG_TELEPORTERROR_INVALID_LOCATION, lfg::LFG_TELEPORTERROR_OK, lfg::LFG_TELEPORTERROR_PLAYER_DEAD, lfg::LFGDungeonData::map, lfg::LfgReturnLocation::MapId, MotionMaster::MovementExpired(), lfg::LFGDungeonData::name, GroupReference::next(), lfg::LfgReturnLocation::O, lfg::LFGDungeonData::o, PlayersStore, WorldSession::SendLfgTeleportError(), Player::SetBattlegroundEntryPoint(), Player::SetForcedTeleportFar(), Player::SetSemaphoreTeleportForcedFar(), SF_LOG_DEBUG, SF_LOG_ERROR, Player::TeleportTo(), Player::TeleportToBGEntryPoint(), UNIT_STATE_JUMPING, lfg::LfgReturnLocation::X, lfg::LFGDungeonData::x, lfg::LfgReturnLocation::Y, lfg::LFGDungeonData::y, lfg::LfgReturnLocation::Z, and lfg::LFGDungeonData::z.

Referenced by MakeNewGroup(), and TeleportDungeonGroupOut().

◆ Update()

◆ UpdateBoot()

void lfg::LFGMgr::UpdateBoot ( uint64 guid,
bool accept )

◆ UpdateProposal()

◆ UpdateRoleCheck()

◆ Skyfire::Singleton< LFGMgr, Skyfire::NullMutex >

friend class Skyfire::Singleton< LFGMgr, Skyfire::NullMutex >
friend

Definition at line 292 of file LFGMgr.h.

Member Data Documentation

◆ BootsStore

LfgPlayerBootContainer lfg::LFGMgr::BootsStore
private

Current player kicks.

Definition at line 511 of file LFGMgr.h.

Referenced by Clean(), ClearGroupQueueState(), DumpQueueInfo(), InitBoot(), RemoveGroupData(), Update(), and UpdateBoot().

◆ CachedDungeonMapStore

LfgCachedDungeonContainer lfg::LFGMgr::CachedDungeonMapStore
private

Stores all dungeons by groupType.

Definition at line 504 of file LFGMgr.h.

Referenced by GetDungeonsByRandom(), and LoadLFGDungeons().

◆ GroupsStore

◆ LfgDungeonStore

LFGDungeonContainer lfg::LFGMgr::LfgDungeonStore
private

Definition at line 507 of file LFGMgr.h.

Referenced by GetLFGDungeon(), GetRandomAndSeasonalDungeons(), and LoadLFGDungeons().

◆ m_debugFlexRaidMinimumOverride

bool lfg::LFGMgr::m_debugFlexRaidMinimumOverride
private

allows flexible raid queues to form below normal minimum for debugging

Definition at line 501 of file LFGMgr.h.

Referenced by IsDebugFlexRaidMinimumOverrideEnabled(), LFGMgr(), and SetDebugFlexRaidMinimumOverride().

◆ m_debugRequirementOverride

bool lfg::LFGMgr::m_debugRequirementOverride
private

bypasses LFG entry requirements for server-wide debugging

Definition at line 500 of file LFGMgr.h.

Referenced by IsDebugRequirementOverrideEnabled(), LFGMgr(), and SetDebugRequirementOverride().

◆ m_lfgProposalId

uint32 lfg::LFGMgr::m_lfgProposalId
private

used as internal counter for proposals

Definition at line 498 of file LFGMgr.h.

Referenced by AddProposal(), LFGMgr(), and Update().

◆ m_options

uint32 lfg::LFGMgr::m_options
private

Stores config options.

Definition at line 499 of file LFGMgr.h.

Referenced by GetOptions(), isOptionEnabled(), LFGMgr(), and SetOptions().

◆ m_QueueTimer

uint32 lfg::LFGMgr::m_QueueTimer
private

used to check interval of update

Definition at line 497 of file LFGMgr.h.

Referenced by LFGMgr(), and Update().

◆ PlayersStore

◆ ProposalsStore

LfgProposalContainer lfg::LFGMgr::ProposalsStore
private

◆ QueuesStore

LfgQueueContainer lfg::LFGMgr::QueuesStore
private

◆ RewardMapStore

LfgRewardContainer lfg::LFGMgr::RewardMapStore
private

Stores rewards for random dungeons.

Definition at line 506 of file LFGMgr.h.

Referenced by GetRandomDungeonReward(), LoadRewards(), and ~LFGMgr().

◆ RoleChecksStore

LfgRoleCheckContainer lfg::LFGMgr::RoleChecksStore
private

Current Role checks.

Definition at line 509 of file LFGMgr.h.

Referenced by Clean(), ClearGroupQueueState(), DumpQueueInfo(), JoinLfg(), RemoveGroupData(), Update(), and UpdateRoleCheck().


The documentation for this class was generated from the following files: