![]() |
AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "LFGMgr.h"
Public Member Functions | |
| void | Update (uint32 diff, uint8 task) |
| void | FinishDungeon (ObjectGuid gguid, uint32 dungeonId, const Map *currMap) |
| Finish the dungeon for the given group. All check are performed using internal lfg data. | |
| void | LoadRewards () |
| Loads rewards for random dungeons. | |
| void | LoadLFGDungeons (bool reload=false) |
| Loads dungeons from dbc and adds teleport coords. | |
| bool | selectedRandomLfgDungeon (ObjectGuid guid) |
| Check if given guid applied for random dungeon. | |
| bool | inLfgDungeonMap (ObjectGuid guid, uint32 map, Difficulty difficulty) |
| Check if given guid applied for given map and difficulty. Used to know. | |
| LfgDungeonSet const & | GetSelectedDungeons (ObjectGuid guid) |
| Get selected dungeons. | |
| LfgState | GetState (ObjectGuid guid) |
| Get current lfg state. | |
| uint32 | GetDungeon (ObjectGuid guid, bool asId=true) |
| Get current dungeon. | |
| uint32 | GetDungeonMapId (ObjectGuid guid) |
| Get the map id of the current dungeon. | |
| uint8 | GetKicksLeft (ObjectGuid gguid) |
| Get kicks left in current group. | |
| void | _LoadFromDB (Field *fields, ObjectGuid guid) |
| Load Lfg group info from DB. | |
| void | SetupGroupMember (ObjectGuid guid, ObjectGuid gguid) |
| Initializes player data after loading group data from DB. | |
| uint32 | GetLFGDungeonEntry (uint32 id) |
| Return Lfg dungeon entry for given dungeon id. | |
| uint8 | GetRoles (ObjectGuid guid) |
| Get current player roles. | |
| std::string const & | GetComment (ObjectGuid gguid) |
| Get current player comment (used for LFR) | |
| uint32 | GetOptions () |
| Gets current lfg options. | |
| void | SetOptions (uint32 options) |
| Sets new lfg options. | |
| bool | isOptionEnabled (uint32 option) |
| Checks if given lfg option is enabled. | |
| void | Clean () |
| Clears queue - Only for internal testing. | |
| ObjectGuid | GetLeader (ObjectGuid guid) |
| Get leader of the group (using internal data) | |
| void | InitializeLockedDungeons (Player *player, Group const *group=nullptr) |
| Initializes locked dungeons for given player (called at login or level change) | |
| void | SetTeam (ObjectGuid guid, TeamId teamId) |
| Sets player team. | |
| void | SetGroup (ObjectGuid guid, ObjectGuid group) |
| Sets player group. | |
| ObjectGuid | GetGroup (ObjectGuid guid) |
| Gets player group. | |
| void | SetLeader (ObjectGuid gguid, ObjectGuid leader) |
| Sets the leader of the group. | |
| void | RemoveGroupData (ObjectGuid guid) |
| Removes saved group data. | |
| uint8 | RemovePlayerFromGroup (ObjectGuid gguid, ObjectGuid guid) |
| Removes a player from a group. | |
| void | AddPlayerToGroup (ObjectGuid gguid, ObjectGuid guid) |
| Adds player to group. | |
| void | SetRandomPlayersCount (ObjectGuid guid, uint8 count) |
| Xinef: Set Random Players Count. | |
| uint8 | GetRandomPlayersCount (ObjectGuid guid) |
| Xinef: Get Random Players Count. | |
| LfgLockMap const & | GetLockedDungeons (ObjectGuid guid) |
| Get locked dungeons. | |
| LfgUpdateData | GetLfgStatus (ObjectGuid guid) |
| Returns current lfg status. | |
| bool | IsSeasonActive (uint32 dungeonId) |
| Checks if Seasonal dungeon is active. | |
| LfgReward const * | GetRandomDungeonReward (uint32 dungeon, uint8 level) |
| Gets the random dungeon reward corresponding to given dungeon and player level. | |
| LfgDungeonSet | GetRandomAndSeasonalDungeons (uint8 level, uint8 expansion) |
| Returns all random and seasonal dungeons for given level and expansion. | |
| void | TeleportPlayer (Player *player, bool out, WorldLocation const *teleportLocation=nullptr) |
| Teleport a player to/from selected dungeon. | |
| void | InitBoot (ObjectGuid gguid, ObjectGuid kicker, ObjectGuid victim, std::string const &reason) |
| Inits new proposal to boot a player. | |
| void | UpdateBoot (ObjectGuid guid, bool accept) |
| Updates player boot proposal with new player answer. | |
| void | UpdateProposal (uint32 proposalId, ObjectGuid guid, bool accept) |
| Updates proposal to join dungeon with player answer. | |
| void | UpdateRoleCheck (ObjectGuid gguid, ObjectGuid guid=ObjectGuid::Empty, uint8 roles=PLAYER_ROLE_NONE) |
| Updates the role check with player answer. | |
| void | SetRoles (ObjectGuid guid, uint8 roles) |
| Sets player lfg roles. | |
| void | SetComment (ObjectGuid guid, std::string const &comment) |
| Sets player lfr comment. | |
| void | JoinLfg (Player *player, uint8 roles, LfgDungeonSet &dungeons, std::string const &comment) |
| Join Lfg with selected roles, dungeons and comment. | |
| void | LeaveLfg (ObjectGuid guid) |
| Leaves lfg. | |
| void | LeaveAllLfgQueues (ObjectGuid guid, bool allowgroup, ObjectGuid groupguid=ObjectGuid::Empty) |
| pussywizard: cleans all queues' data | |
| void | JoinRaidBrowser (Player *player, uint8 roles, LfgDungeonSet &dungeons, std::string comment) |
| pussywizard: Raid Browser | |
| void | LeaveRaidBrowser (ObjectGuid guid) |
| void | LfrSearchAdd (Player *p, uint32 dungeonId) |
| void | LfrSearchRemove (Player *p) |
| void | SendRaidBrowserCachedList (Player *player, uint32 dungeonId) |
| void | UpdateRaidBrowser (uint32 diff) |
| void | LfrSetComment (Player *p, std::string comment) |
| void | SendRaidBrowserJoinedPacket (Player *p, LfgDungeonSet &dungeons, std::string comment) |
| void | RBPacketAppendGroup (const RBInternalInfo &info, ByteBuffer &buffer) |
| void | RBPacketAppendPlayer (const RBInternalInfo &info, ByteBuffer &buffer) |
| void | RBPacketBuildDifference (WorldPacket &differencePacket, uint32 dungeonId, uint32 deletedCounter, ByteBuffer &buffer_deleted, uint32 groupCounter, ByteBuffer &buffer_groups, uint32 playerCounter, ByteBuffer &buffer_players) |
| void | RBPacketBuildFull (WorldPacket &fullPacket, uint32 dungeonId, RBInternalInfoMap &infoMap) |
| LfgState | GetOldState (ObjectGuid guid) |
| Get last lfg state (NONE, DUNGEON or FINISHED_DUNGEON) | |
| bool | IsLfgGroup (ObjectGuid guid) |
| Check if given group guid is lfg. | |
| uint8 | GetPlayerCount (ObjectGuid guid) |
| Gets the player count of given group. | |
| uint32 | AddProposal (LfgProposal &proposal) |
| Add a new Proposal. | |
| bool | AllQueued (Lfg5Guids const &check) |
| Checks if all players are queued. | |
| void | ToggleTesting () |
| bool | IsTesting () const |
| For 1 player queue testing. | |
| void | SetDungeon (ObjectGuid guid, uint32 dungeon) |
Static Public Member Functions | |
| static LFGMgr * | instance () |
| static uint8 | CheckGroupRoles (LfgRolesMap &groles) |
| Checks if given roles match, modifies given roles map with new roles. | |
| static bool | HasIgnore (ObjectGuid guid1, ObjectGuid guid2) |
| Checks if given players are ignoring each other. | |
| static void | SendLfgQueueStatus (ObjectGuid guid, LfgQueueStatusData const &data) |
| Sends queue status to player. | |
Private Types | |
| typedef std::unordered_map< ObjectGuid, RBEntryInfo > | RBEntryInfoMap |
| typedef std::unordered_map< uint32, RBEntryInfoMap > | RBStoreMap |
| typedef std::unordered_map< ObjectGuid, uint32 > | RBSearchersMap |
| typedef std::unordered_map< uint32, WorldPacket > | RBCacheMap |
| typedef std::unordered_map< ObjectGuid, RBInternalInfo > | RBInternalInfoMap |
| typedef std::unordered_map< uint32, RBInternalInfoMap > | RBInternalInfoMapMap |
| typedef std::set< uint32 > | RBUsedDungeonsSet |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
References m_raidBrowserLastUpdatedDungeonId, and m_raidBrowserUpdateTimer.
|
private |
References RewardMapStore.
| void lfg::LFGMgr::_LoadFromDB | ( | Field * | fields, |
| ObjectGuid | guid | ||
| ) |
Load Lfg group info from DB.
References Field::Get(), ObjectGuid::IsGroup(), lfg::LFG_STATE_DUNGEON, lfg::LFG_STATE_FINISHED_DUNGEON, SetDungeon(), SetLeader(), and SetState().
|
private |
References CHAR_REP_LFG_DATA, CharacterDatabase, ObjectGuid::GetCounter(), GetDungeon(), GetState(), ObjectGuid::IsGroup(), and PreparedStatementBase::SetData().
Referenced by FinishDungeon(), and MakeNewGroup().
| void lfg::LFGMgr::AddPlayerToGroup | ( | ObjectGuid | gguid, |
| ObjectGuid | guid | ||
| ) |
Adds player to group.
References GroupsStore.
Referenced by SetupGroupMember().
| uint32 lfg::LFGMgr::AddProposal | ( | LfgProposal & | proposal | ) |
Add a new Proposal.
References lfg::LfgProposal::id, m_lfgProposalId, and ProposalsStore.
| bool lfg::LFGMgr::AllQueued | ( | Lfg5Guids const & | check | ) |
Checks if all players are queued.
References lfg::Lfg5Guids::empty(), GetQueue(), GetState(), lfg::Lfg5Guids::guids, lfg::LFG_STATE_QUEUED, and lfg::LFGQueue::RemoveFromQueue().
|
static |
Checks if given roles match, modifies given roles map with new roles.
References CheckGroupRoles(), lfg::LFG_DPS_NEEDED, lfg::LFG_HEALERS_NEEDED, lfg::LFG_TANKS_NEEDED, lfg::PLAYER_ROLE_DAMAGE, lfg::PLAYER_ROLE_HEALER, lfg::PLAYER_ROLE_NONE, and lfg::PLAYER_ROLE_TANK.
Referenced by lfg::LFGQueue::CheckCompatibility(), CheckGroupRoles(), and UpdateRoleCheck().
| void lfg::LFGMgr::Clean | ( | ) |
Clears queue - Only for internal testing.
References QueuesStore.
|
private |
|
private |
References GroupsStore, LOG_DEBUG, and ObjectGuid::ToString().
Referenced by UpdateBoot().
| void lfg::LFGMgr::FinishDungeon | ( | ObjectGuid | gguid, |
| uint32 | dungeonId, | ||
| const Map * | currMap | ||
| ) |
Finish the dungeon for the given group. All check are performed using internal lfg data.
Finish a dungeon and give reward, if any.
| [in] | guid | Group guid |
| [in] | dungeonId | Dungeonid |
References _SaveToDB(), ACHIEVEMENT_CRITERIA_TYPE_USE_LFD_TO_GROUP_WITH_PLAYERS, Player::CanRewardQuest(), lfg::LFGDungeonData::difficulty, DUNGEON_DIFFICULTY_HEROIC, lfg::LFGDungeonData::Entry(), WorldObject::FindMap(), ObjectAccessor::FindPlayer(), lfg::LfgReward::firstQuest, GetDungeon(), Object::GetGUID(), Unit::GetLevel(), GetLFGDungeon(), WorldLocation::GetMapId(), GetPlayers(), GetRandomDungeonReward(), GetRandomPlayersCount(), GetSelectedDungeons(), Player::GetSession(), GetState(), Unit::HasAura(), lfg::LFG_SPELL_DUNGEON_COOLDOWN, lfg::LFG_STATE_FINISHED_DUNGEON, lfg::LFG_TYPE_RANDOM, LOG_DEBUG, lfg::LFGDungeonData::map, lfg::LfgReward::otherQuest, Unit::RemoveAurasDueToSpell(), Player::RewardQuest(), lfg::LFGDungeonData::seasonal, WorldSession::SendLfgPlayerReward(), SetState(), sObjectMgr, ObjectGuid::ToString(), lfg::LFGDungeonData::type, and Player::UpdateAchievementCriteria().
| const std::string & lfg::LFGMgr::GetComment | ( | ObjectGuid | gguid | ) |
Get current player comment (used for LFR)
References LOG_DEBUG, PlayersStore, and ObjectGuid::ToString().
Referenced by RemoveProposal(), Update(), and UpdateRoleCheck().
|
private |
Given a list of dungeons remove the dungeons players have restrictions.
| [in,out] | dungeons | Dungeons to check restrictions |
| [in] | players | Set of players to check their dungeon restrictions |
| [out] | lockMap | Map of players Lock status info of given dungeons (Empty if dungeons is not empty) |
References GetLockedDungeons().
Referenced by JoinLfg().
| uint32 lfg::LFGMgr::GetDungeon | ( | ObjectGuid | guid, |
| bool | asId = true |
||
| ) |
Get current dungeon.
References GroupsStore, LOG_DEBUG, and ObjectGuid::ToString().
Referenced by _SaveToDB(), FinishDungeon(), inLfgDungeonMap(), JoinLfg(), LeaveLfg(), SetupGroupMember(), and TeleportPlayer().
| uint32 lfg::LFGMgr::GetDungeonMapId | ( | ObjectGuid | guid | ) |
Get the map id of the current dungeon.
References GetLFGDungeon(), GroupsStore, LOG_DEBUG, and ObjectGuid::ToString().
|
private |
Get the dungeon list that can be done given a random dungeon entry.
| [in] | randomdungeon | Random dungeon id (if value = 0 will return all dungeons) |
References CachedDungeonMapStore, GetLFGDungeon(), and lfg::LFGDungeonData::group.
Referenced by InitializeLockedDungeons(), and JoinLfg().
Given a Dungeon id returns the dungeon Type
| [in] | dungeon | dungeon id |
References GetLFGDungeon(), lfg::LFG_TYPE_NONE, and lfg::LFGDungeonData::type.
Referenced by JoinLfg().
| ObjectGuid lfg::LFGMgr::GetGroup | ( | ObjectGuid | guid | ) |
Gets player group.
References PlayersStore.
Referenced by inLfgDungeonMap(), LeaveAllLfgQueues(), LeaveLfg(), MakeNewGroup(), Update(), and UpdateBoot().
| uint8 lfg::LFGMgr::GetKicksLeft | ( | ObjectGuid | gguid | ) |
Get kicks left in current group.
References GroupsStore, LOG_DEBUG, and ObjectGuid::ToString().
| ObjectGuid lfg::LFGMgr::GetLeader | ( | ObjectGuid | guid | ) |
Get leader of the group (using internal data)
References GroupsStore.
Referenced by GetQueue(), and LeaveLfg().
|
private |
References LfgDungeonStore.
Referenced by FinishDungeon(), GetDungeonMapId(), GetDungeonsByRandom(), GetDungeonType(), GetLFGDungeonEntry(), InitializeLockedDungeons(), inLfgDungeonMap(), JoinRaidBrowser(), MakeNewGroup(), selectedRandomLfgDungeon(), TeleportPlayer(), and UpdateRaidBrowser().
Return Lfg dungeon entry for given dungeon id.
References GetLFGDungeon().
Referenced by LoadRewards().
| LfgUpdateData lfg::LFGMgr::GetLfgStatus | ( | ObjectGuid | guid | ) |
Returns current lfg status.
References lfg::LfgPlayerData::GetSelectedDungeons(), lfg::LfgPlayerData::GetState(), lfg::LFG_UPDATETYPE_UPDATE_STATUS, and PlayersStore.
| LfgLockMap const & lfg::LFGMgr::GetLockedDungeons | ( | ObjectGuid | guid | ) |
Get locked dungeons.
References LOG_DEBUG, PlayersStore, and ObjectGuid::ToString().
Referenced by GetCompatibleDungeons().
| LfgState lfg::LFGMgr::GetOldState | ( | ObjectGuid | guid | ) |
Get last lfg state (NONE, DUNGEON or FINISHED_DUNGEON)
References GroupsStore, ObjectGuid::IsGroup(), LOG_DEBUG, PlayersStore, and ObjectGuid::ToString().
| uint32 lfg::LFGMgr::GetOptions | ( | ) |
| uint8 lfg::LFGMgr::GetPlayerCount | ( | ObjectGuid | guid | ) |
Gets the player count of given group.
References GroupsStore.
|
private |
References GroupsStore.
Referenced by FinishDungeon(), GetQueue(), InitBoot(), LeaveAllLfgQueues(), and LeaveLfg().
|
private |
References ObjectGuid::Empty, GetLeader(), GetPlayers(), GetTeam(), ObjectGuid::IsGroup(), and QueuesStore.
Referenced by AllQueued(), JoinLfg(), LeaveLfg(), RemoveProposal(), UpdateProposal(), and UpdateRoleCheck().
| LfgDungeonSet lfg::LFGMgr::GetRandomAndSeasonalDungeons | ( | uint8 | level, |
| uint8 | expansion | ||
| ) |
Returns all random and seasonal dungeons for given level and expansion.
References lfg::LFGDungeonData::Entry(), lfg::LFGDungeonData::expansion, lfg::LFGDungeonData::id, lfg::LFG_TYPE_RANDOM, LfgDungeonStore, lfg::LFGDungeonData::maxlevel, lfg::LFGDungeonData::minlevel, lfg::LFGDungeonData::seasonal, sLFGMgr, and lfg::LFGDungeonData::type.
Gets the random dungeon reward corresponding to given dungeon and player level.
Get the reward of a given random dungeon at a certain level
| [in] | dungeon | dungeon id |
| [in] | level | Player level |
References RewardMapStore.
Referenced by FinishDungeon().
| uint8 lfg::LFGMgr::GetRandomPlayersCount | ( | ObjectGuid | guid | ) |
| uint8 lfg::LFGMgr::GetRoles | ( | ObjectGuid | guid | ) |
Get current player roles.
References LOG_DEBUG, PlayersStore, and ObjectGuid::ToString().
Referenced by UpdateProposal().
| LfgDungeonSet const & lfg::LFGMgr::GetSelectedDungeons | ( | ObjectGuid | guid | ) |
Get selected dungeons.
References LOG_DEBUG, PlayersStore, and ObjectGuid::ToString().
Referenced by FinishDungeon(), RemoveProposal(), selectedRandomLfgDungeon(), Update(), and UpdateProposal().
| LfgState lfg::LFGMgr::GetState | ( | ObjectGuid | guid | ) |
Get current lfg state.
References GroupsStore, ObjectGuid::IsGroup(), LOG_DEBUG, PlayersStore, and ObjectGuid::ToString().
Referenced by _SaveToDB(), AllQueued(), FinishDungeon(), JoinLfg(), LeaveAllLfgQueues(), LeaveLfg(), RemoveGroupData(), selectedRandomLfgDungeon(), and SetupGroupMember().
|
private |
References PlayersStore.
Referenced by GetQueue().
|
static |
Checks if given players are ignoring each other.
References ObjectAccessor::FindConnectedPlayer(), Player::GetSocial(), and PlayerSocial::HasIgnore().
| void lfg::LFGMgr::InitBoot | ( | ObjectGuid | gguid, |
| ObjectGuid | kicker, | ||
| ObjectGuid | victim, | ||
| std::string const & | reason | ||
| ) |
Inits new proposal to boot a player.
Initialize a boot kick vote
| [in] | gguid | Group the vote kicks belongs to |
| [in] | kicker | Kicker guid |
| [in] | victim | Victim guid |
| [in] | reason | Kick reason |
References BootsStore, lfg::LfgPlayerBoot::cancelTime, GameTime::GetGameTime(), GetPlayers(), 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(), lfg::LfgPlayerBoot::victim, and lfg::LfgPlayerBoot::votes.
Initializes locked dungeons for given player (called at login or level change)
Generate the dungeon lock map for a given player
| [in] | player | Player we need to initialize the lock status map |
References DungeonProgressionRequirements::achievements, CLASS_DEATH_KNIGHT, CONFIG_DUNGEON_ACCESS_REQUIREMENTS_LFG_DBC_LEVEL_OVERRIDE, lfg::LFGDungeonData::difficulty, DISABLE_TYPE_LFG_MAP, DISABLE_TYPE_MAP, DUNGEON_DIFFICULTY_NORMAL, lfg::LFGDungeonData::Entry(), lfg::LFGDungeonData::expansion, WorldSession::Expansion(), Player::GetAverageItemLevelForDF(), GetDungeonsByRandom(), Object::GetGUID(), Group::GetLeaderGUID(), Unit::GetLevel(), GetLFGDungeon(), Player::GetQuestRewardStatus(), Player::GetSession(), Player::GetTeamId(), Player::HasAchieved(), Player::HasItemCount(), lfg::LFGDungeonData::id, Player::IsClass(), Player::IsGameMaster(), Player::IsQuestRewarded(), MapEntry::IsRaid(), IsSeasonActive(), DungeonProgressionRequirements::items, DungeonProgressionRequirements::levelMax, DungeonProgressionRequirements::levelMin, lfg::LFG_LOCKSTATUS_INSUFFICIENT_EXPANSION, lfg::LFG_LOCKSTATUS_MISSING_ACHIEVEMENT, lfg::LFG_LOCKSTATUS_MISSING_ITEM, lfg::LFG_LOCKSTATUS_NOT_IN_SEASON, lfg::LFG_LOCKSTATUS_QUEST_NOT_COMPLETED, lfg::LFG_LOCKSTATUS_RAID_LOCKED, lfg::LFG_LOCKSTATUS_TOO_HIGH_LEVEL, lfg::LFG_LOCKSTATUS_TOO_LOW_GEAR_SCORE, lfg::LFG_LOCKSTATUS_TOO_LOW_LEVEL, lfg::LFG_OPTION_ENABLE_SEASONAL_BOSSES, m_options, lfg::LFGDungeonData::map, lfg::LFGDungeonData::maxlevel, lfg::LFGDungeonData::minlevel, DungeonProgressionRequirements::quests, DungeonProgressionRequirements::reqItemLevel, sDisableMgr, lfg::LFGDungeonData::seasonal, SetLockedDungeons(), sInstanceSaveMgr, sMapStore, sObjectMgr, sScriptMgr, sWorld, and TEAM_NEUTRAL.
Referenced by LoadLFGDungeons().
| bool lfg::LFGMgr::inLfgDungeonMap | ( | ObjectGuid | guid, |
| uint32 | map, | ||
| Difficulty | difficulty | ||
| ) |
Check if given guid applied for given map and difficulty. Used to know.
References GetDungeon(), GetGroup(), GetLFGDungeon(), and ObjectGuid::IsGroup().
|
static |
| bool lfg::LFGMgr::IsLfgGroup | ( | ObjectGuid | guid | ) |
Check if given group guid is lfg.
References GroupsStore, and ObjectGuid::IsGroup().
| bool lfg::LFGMgr::isOptionEnabled | ( | uint32 | option | ) |
| bool lfg::LFGMgr::IsSeasonActive | ( | uint32 | dungeonId | ) |
Checks if Seasonal dungeon is active.
References HOLIDAY_BREWFEST, HOLIDAY_FIRE_FESTIVAL, HOLIDAY_HALLOWS_END, HOLIDAY_LOVE_IS_IN_THE_AIR, IsHolidayActive(), lfg::LFG_DUNGEON_COREN_DIREBREW, lfg::LFG_DUNGEON_CROWN_CHEMICAL_CO, lfg::LFG_DUNGEON_FROST_LORD_AHUNE, and lfg::LFG_DUNGEON_HEADLESS_HORSEMAN.
Referenced by InitializeLockedDungeons().
|
inline |
| 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.
| [in] | player | Player trying to join (or leader of group trying to join) |
| [in] | roles | Player selected roles |
| [in] | dungeons | Dungeons the player/group is applying for |
| [in] | comment | Player selected comment |
References lfg::LFGQueue::AddQueueData(), lfg::LfgRoleCheck::cancelTime, CONFIG_ALLOW_JOIN_BG_AND_LFG, lfg::LfgRoleCheck::dungeons, GetCompatibleDungeons(), GetDungeon(), GetDungeonsByRandom(), GetDungeonType(), Group::GetFirstMember(), GameTime::GetGameTime(), Player::GetGroup(), Group::GetGUID(), Object::GetGUID(), Group::GetLeaderGUID(), Group::GetMembersCount(), WorldObject::GetName(), GetQueue(), Player::GetSession(), GetState(), Unit::HasAura(), Player::InBattleground(), Player::InBattlegroundQueue(), Group::isBFGroup(), Group::isBGGroup(), ObjectGuid::IsGroup(), Group::isLFGGroup(), JoinRaidBrowser(), 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_NOT_MEET_REQS, lfg::LFG_JOIN_PARTY_RANDOM_COOLDOWN, lfg::LFG_JOIN_RANDOM_COOLDOWN, lfg::LFG_JOIN_TOO_MUCH_MEMBERS, lfg::LFG_JOIN_USING_BG_SYSTEM, lfg::LFG_ROLECHECK_INITIALITING, lfg::LFG_SPELL_DUNGEON_COOLDOWN, lfg::LFG_SPELL_DUNGEON_DESERTER, lfg::LFG_STATE_FINISHED_DUNGEON, lfg::LFG_STATE_PROPOSAL, lfg::LFG_STATE_QUEUED, lfg::LFG_STATE_RAIDBROWSER, lfg::LFG_STATE_ROLECHECK, lfg::LFG_TIME_ROLECHECK, lfg::LFG_TYPE_DUNGEON, lfg::LFG_TYPE_HEROIC, lfg::LFG_TYPE_RAID, lfg::LFG_TYPE_RANDOM, lfg::LFG_UPDATETYPE_JOIN_QUEUE, lfg::LfgJoinResultData::lockmap, LOG_DEBUG, LOG_ERROR, MAXGROUPSIZE, lfg::PLAYER_ROLE_DAMAGE, lfg::PLAYER_ROLE_HEALER, lfg::PLAYER_ROLE_LEADER, lfg::PLAYER_ROLE_TANK, lfg::LfgRoleCheck::rDungeonId, lfg::LFGQueue::RemoveFromQueue(), lfg::LfgJoinResultData::result, RoleChecksStore, lfg::LfgRoleCheck::roles, WorldSession::SendLfgJoinResult(), WorldSession::SendLfgUpdatePlayer(), SendRaidBrowserJoinedPacket(), SetComment(), SetRoles(), SetSelectedDungeons(), SetState(), sScriptMgr, lfg::LfgRoleCheck::state, sWorld, ObjectGuid::ToString(), and UpdateRoleCheck().
| void lfg::LFGMgr::JoinRaidBrowser | ( | Player * | player, |
| uint8 | roles, | ||
| LfgDungeonSet & | dungeons, | ||
| std::string | comment | ||
| ) |
pussywizard: Raid Browser
References Object::GetGUID(), GetLFGDungeon(), Player::GetTeamId(), RaidBrowserStore, and RBUsedDungeonsStore.
Referenced by JoinLfg().
| void lfg::LFGMgr::LeaveAllLfgQueues | ( | ObjectGuid | guid, |
| bool | allowgroup, | ||
| ObjectGuid | groupguid = ObjectGuid::Empty |
||
| ) |
pussywizard: cleans all queues' data
References ObjectGuid::Clear(), GetGroup(), GetPlayers(), GetState(), ObjectGuid::IsGroup(), lfg::LFG_STATE_NONE, lfg::LFG_STATE_QUEUED, lfg::LFG_UPDATETYPE_REMOVED_FROM_QUEUE, QueuesStore, SendLfgUpdateParty(), SendLfgUpdatePlayer(), and SetState().
| void lfg::LFGMgr::LeaveLfg | ( | ObjectGuid | guid | ) |
Leaves lfg.
Leaves Dungeon System. Player/Group is removed from queue, rolechecks, proposals or votekicks. Player or group needs to be not nullptr and using Dungeon System
| [in] | guid | Player or group guid |
References ObjectGuid::GetCounter(), GetDungeon(), GetGroup(), GetLeader(), GetPlayers(), GetQueue(), GetState(), ObjectGuid::IsGroup(), LeaveRaidBrowser(), lfg::LFG_ANSWER_DENY, lfg::LFG_STATE_BOOT, lfg::LFG_STATE_DUNGEON, lfg::LFG_STATE_FINISHED_DUNGEON, lfg::LFG_STATE_NONE, lfg::LFG_STATE_PROPOSAL, lfg::LFG_STATE_QUEUED, lfg::LFG_STATE_RAIDBROWSER, lfg::LFG_STATE_ROLECHECK, lfg::LFG_UPDATETYPE_LEAVE_RAIDBROWSER, lfg::LFG_UPDATETYPE_PROPOSAL_DECLINED, lfg::LFG_UPDATETYPE_REMOVED_FROM_QUEUE, LOG_DEBUG, ProposalsStore, lfg::LFGQueue::RemoveFromQueue(), RemoveProposal(), SendLfgUpdateParty(), SendLfgUpdatePlayer(), SetCanOverrideRBState(), SetDungeon(), SetState(), sGroupMgr, ObjectGuid::ToString(), and UpdateRoleCheck().
| void lfg::LFGMgr::LeaveRaidBrowser | ( | ObjectGuid | guid | ) |
References RaidBrowserStore.
Referenced by LeaveLfg().
References Object::GetGUID(), Player::GetTeamId(), and RBSearchersStore.
| void lfg::LFGMgr::LfrSearchRemove | ( | Player * | p | ) |
References Object::GetGUID(), Player::GetTeamId(), and RBSearchersStore.
| void lfg::LFGMgr::LfrSetComment | ( | Player * | p, |
| std::string | comment | ||
| ) |
References Object::GetGUID(), Player::GetTeamId(), and RaidBrowserStore.
| void lfg::LFGMgr::LoadLFGDungeons | ( | bool | reload = false | ) |
Loads dungeons from dbc and adds teleport coords.
References CachedDungeonMapStore, ObjectAccessor::FindConnectedPlayer(), Field::Get(), getMSTime(), GetMSTimeDiffToNow(), lfg::LFGDungeonData::group, lfg::LFGDungeonData::id, LFGDungeonEntry::ID, InitializeLockedDungeons(), lfg::LFG_TYPE_DUNGEON, lfg::LFG_TYPE_HEROIC, lfg::LFG_TYPE_RAID, lfg::LFG_TYPE_RANDOM, LfgDungeonStore, LOG_ERROR, LOG_INFO, lfg::LFGDungeonData::map, lfg::LFGDungeonData::name, lfg::LFGDungeonData::o, PlayersStore, sLFGDungeonStore, sObjectMgr, AreaTriggerTeleport::target_mapId, AreaTriggerTeleport::target_Orientation, AreaTriggerTeleport::target_X, AreaTriggerTeleport::target_Y, AreaTriggerTeleport::target_Z, lfg::LFGDungeonData::type, LFGDungeonEntry::TypeID, WorldDatabase, lfg::LFGDungeonData::x, lfg::LFGDungeonData::y, and lfg::LFGDungeonData::z.
| void lfg::LFGMgr::LoadRewards | ( | ) |
Loads rewards for random dungeons.
Load rewards for completing dungeons.
References CONFIG_MAX_PLAYER_LEVEL, Field::Get(), GetLFGDungeonEntry(), getMSTime(), GetMSTimeDiffToNow(), LOG_ERROR, LOG_INFO, RewardMapStore, sObjectMgr, sWorld, and WorldDatabase.
|
private |
Makes a new group given a proposal
| [in] | proposal | Proposal to get info from |
References _SaveToDB(), Group::AddLfgBuffFlag(), Group::AddLfgHeroicFlag(), Group::AddLfgRandomInstanceFlag(), Group::AddMember(), ASSERT, BATTLEGROUND_QUEUE_NONE, Group::ConvertToLFG(), Group::Create(), lfg::LFGDungeonData::difficulty, DUNGEON_DIFFICULTY_HEROIC, lfg::LfgProposal::dungeonId, lfg::LFGDungeonData::Entry(), ObjectAccessor::FindConnectedPlayer(), ObjectAccessor::FindPlayer(), ObjectGuid::GetCounter(), Group::GetFirstMember(), Player::GetGroup(), GetGroup(), Group::GetGUID(), Object::GetGUID(), Group::GetLeaderGUID(), GetLFGDungeon(), Group::GetMembersCount(), lfg::LfgProposal::group, Group::IsFull(), Group::IsLeader(), Group::IsLfgWithBuff(), lfg::LfgProposal::isNew, lfg::LfgProposal::leader, lfg::LFG_SPELL_DUNGEON_COOLDOWN, lfg::LFG_STATE_DUNGEON, lfg::LFG_STATE_PROPOSAL, m_Testing, lfg::LFGDungeonData::map, MAXGROUPSIZE, PLAYER_MAX_BATTLEGROUND_QUEUES, lfg::LfgProposal::players, Group::RemoveMember(), sBattlegroundMgr, selectedRandomLfgDungeon(), Group::SendUpdate(), SetDungeon(), Group::SetDungeonDifficulty(), Group::SetLfgRoles(), SetRandomPlayersCount(), SetState(), sGroupMgr, sInstanceSaveMgr, and TeleportPlayer().
Referenced by UpdateProposal().
| void lfg::LFGMgr::RBPacketAppendGroup | ( | const RBInternalInfo & | info, |
| ByteBuffer & | buffer | ||
| ) |
References lfg::RBInternalInfo::comment, lfg::RBInternalInfo::encounterMask, lfg::RBInternalInfo::groupGuid, lfg::RBInternalInfo::instanceGuid, lfg::LFG_UPDATE_FLAG_BINDED, lfg::LFG_UPDATE_FLAG_COMMENT, and lfg::LFG_UPDATE_FLAG_ROLES.
Referenced by RBPacketBuildFull(), and UpdateRaidBrowser().
| void lfg::LFGMgr::RBPacketAppendPlayer | ( | const RBInternalInfo & | info, |
| ByteBuffer & | buffer | ||
| ) |
References lfg::RBInternalInfo::_agility, lfg::RBInternalInfo::_area, lfg::RBInternalInfo::_armor, lfg::RBInternalInfo::_attackPower, lfg::RBInternalInfo::_avgItemLevel, lfg::RBInternalInfo::_blockRating, lfg::RBInternalInfo::_class, lfg::RBInternalInfo::_critRatingMelee, lfg::RBInternalInfo::_critRatingRanged, lfg::RBInternalInfo::_critRatingSpell, lfg::RBInternalInfo::_defenseSkill, lfg::RBInternalInfo::_dodgeRating, lfg::RBInternalInfo::_expertiseRating, lfg::RBInternalInfo::_hasteRating, lfg::RBInternalInfo::_health, lfg::RBInternalInfo::_level, lfg::RBInternalInfo::_mana, lfg::RBInternalInfo::_mp5, lfg::RBInternalInfo::_mp5combat, lfg::RBInternalInfo::_online, lfg::RBInternalInfo::_parryRating, lfg::RBInternalInfo::_race, lfg::RBInternalInfo::_spellDamage, lfg::RBInternalInfo::_spellHeal, lfg::RBInternalInfo::_talents0, lfg::RBInternalInfo::_talents1, lfg::RBInternalInfo::_talents2, lfg::RBInternalInfo::comment, lfg::RBInternalInfo::encounterMask, lfg::RBInternalInfo::groupGuid, lfg::RBInternalInfo::guid, lfg::RBInternalInfo::instanceGuid, lfg::RBInternalInfo::isGroupLeader, lfg::LFG_UPDATE_FLAG_AREA, lfg::LFG_UPDATE_FLAG_BINDED, lfg::LFG_UPDATE_FLAG_CHARACTERINFO, lfg::LFG_UPDATE_FLAG_COMMENT, lfg::LFG_UPDATE_FLAG_GROUPGUID, lfg::LFG_UPDATE_FLAG_GROUPLEADER, lfg::LFG_UPDATE_FLAG_ROLES, lfg::LFG_UPDATE_FLAG_STATUS, lfg::PLAYER_ROLE_LEADER, and lfg::RBInternalInfo::roles.
Referenced by RBPacketBuildFull(), and UpdateRaidBrowser().
| void lfg::LFGMgr::RBPacketBuildDifference | ( | WorldPacket & | differencePacket, |
| uint32 | dungeonId, | ||
| uint32 | deletedCounter, | ||
| ByteBuffer & | buffer_deleted, | ||
| uint32 | groupCounter, | ||
| ByteBuffer & | buffer_groups, | ||
| uint32 | playerCounter, | ||
| ByteBuffer & | buffer_players | ||
| ) |
References ByteBuffer::append(), and lfg::LFG_TYPE_RAID.
Referenced by UpdateRaidBrowser().
| void lfg::LFGMgr::RBPacketBuildFull | ( | WorldPacket & | fullPacket, |
| uint32 | dungeonId, | ||
| RBInternalInfoMap & | infoMap | ||
| ) |
References ByteBuffer::append(), lfg::LFG_TYPE_RAID, RBPacketAppendGroup(), and RBPacketAppendPlayer().
Referenced by UpdateRaidBrowser().
| void lfg::LFGMgr::RemoveGroupData | ( | ObjectGuid | guid | ) |
Removes saved group data.
References ObjectGuid::Empty, GetState(), GroupsStore, lfg::LFG_STATE_NONE, lfg::LFG_STATE_PROPOSAL, lfg::LFG_UPDATETYPE_REMOVED_FROM_QUEUE, LOG_DEBUG, SendLfgUpdateParty(), SetGroup(), SetState(), and ObjectGuid::ToString().
| uint8 lfg::LFGMgr::RemovePlayerFromGroup | ( | ObjectGuid | gguid, |
| ObjectGuid | guid | ||
| ) |
Removes a player from a group.
References GroupsStore.
|
private |
Remove a proposal from the pool, remove the group that didn't accept (if needed) and readd the other members to the queue
| [in] | itProposal | Iterator to the proposal to remove |
| [in] | type | Type of removal (LFG_UPDATETYPE_PROPOSAL_FAILED, LFG_UPDATETYPE_PROPOSAL_DECLINED) |
References lfg::LFGQueue::AddToQueue(), ObjectAccessor::FindPlayer(), GetComment(), GetQueue(), GetSelectedDungeons(), lfg::Lfg5Guids::guids, IN_MILLISECONDS, lfg::LFG_ANSWER_AGREE, lfg::LFG_ANSWER_DENY, lfg::LFG_ANSWER_PENDING, lfg::LFG_PROPOSAL_FAILED, lfg::LFG_SPELL_DUNGEON_COOLDOWN, lfg::LFG_STATE_QUEUED, lfg::LFG_UPDATETYPE_ADDED_TO_QUEUE, lfg::LFG_UPDATETYPE_PROPOSAL_FAILED, lfg::LFG_UPDATETYPE_REMOVED_FROM_QUEUE, LOG_DEBUG, lfg::LfgProposal::players, ProposalsStore, lfg::LfgProposal::queues, lfg::Lfg5Guids::remove(), lfg::LFGQueue::RemoveFromQueue(), RestoreState(), SendLfgUpdateParty(), SendLfgUpdatePlayer(), SendLfgUpdateProposal(), SetState(), lfg::LfgProposal::state, ObjectGuid::ToString(), and lfg::LfgUpdateData::updateType.
Referenced by LeaveLfg(), Update(), and UpdateProposal().
|
private |
References GroupsStore, ObjectGuid::IsGroup(), PlayersStore, lfg::LfgGroupData::RestoreState(), and lfg::LfgPlayerData::RestoreState().
Referenced by RemoveProposal(), Update(), and UpdateRoleCheck().
| bool lfg::LFGMgr::selectedRandomLfgDungeon | ( | ObjectGuid | guid | ) |
Check if given guid applied for random dungeon.
References GetLFGDungeon(), GetSelectedDungeons(), GetState(), lfg::LFG_STATE_NONE, lfg::LFG_TYPE_RANDOM, lfg::LFGDungeonData::seasonal, and lfg::LFGDungeonData::type.
Referenced by MakeNewGroup().
|
private |
References ObjectAccessor::FindConnectedPlayer().
Referenced by InitBoot(), Update(), and UpdateBoot().
|
private |
References ObjectAccessor::FindConnectedPlayer().
Referenced by Update(), and UpdateRoleCheck().
|
static |
Sends queue status to player.
References ObjectAccessor::FindConnectedPlayer().
Referenced by lfg::LFGQueue::UpdateQueueTimers().
|
private |
References ObjectAccessor::FindConnectedPlayer().
Referenced by Update(), and UpdateRoleCheck().
|
private |
References ObjectAccessor::FindConnectedPlayer(), Player::GetSession(), and WorldSession::SendLfgRoleChosen().
Referenced by UpdateRoleCheck().
|
private |
References ObjectAccessor::FindConnectedPlayer().
Referenced by LeaveAllLfgQueues(), LeaveLfg(), RemoveGroupData(), RemoveProposal(), Update(), UpdateProposal(), and UpdateRoleCheck().
|
private |
References ObjectAccessor::FindConnectedPlayer().
Referenced by LeaveAllLfgQueues(), LeaveLfg(), RemoveProposal(), Update(), and UpdateProposal().
|
private |
References ObjectAccessor::FindConnectedPlayer().
Referenced by RemoveProposal(), Update(), and UpdateProposal().
References Player::GetTeamId(), lfg::LFG_TYPE_RAID, RBCacheStore, Player::SendDirectMessage(), and SMSG_UPDATE_LFG_LIST.
| void lfg::LFGMgr::SendRaidBrowserJoinedPacket | ( | Player * | p, |
| LfgDungeonSet & | dungeons, | ||
| std::string | comment | ||
| ) |
References Player::GetGroup(), Object::GetGUID(), Player::GetSession(), Player::GetTeamId(), lfg::LFG_UPDATETYPE_JOIN_RAIDBROWSER, RaidBrowserStore, WorldSession::SendLfgJoinResult(), WorldSession::SendLfgUpdateParty(), and WorldSession::SendLfgUpdatePlayer().
Referenced by JoinLfg().
|
private |
References PlayersStore.
Referenced by LeaveLfg().
| void lfg::LFGMgr::SetComment | ( | ObjectGuid | guid, |
| std::string const & | comment | ||
| ) |
Sets player lfr comment.
References LOG_DEBUG, PlayersStore, and ObjectGuid::ToString().
Referenced by JoinLfg().
| void lfg::LFGMgr::SetDungeon | ( | ObjectGuid | guid, |
| uint32 | dungeon | ||
| ) |
References GroupsStore, LOG_DEBUG, and ObjectGuid::ToString().
Referenced by _LoadFromDB(), LeaveLfg(), and MakeNewGroup().
| void lfg::LFGMgr::SetGroup | ( | ObjectGuid | guid, |
| ObjectGuid | group | ||
| ) |
Sets player group.
References PlayersStore.
Referenced by RemoveGroupData(), and SetupGroupMember().
| void lfg::LFGMgr::SetLeader | ( | ObjectGuid | gguid, |
| ObjectGuid | leader | ||
| ) |
|
private |
References LOG_DEBUG, PlayersStore, and ObjectGuid::ToString().
Referenced by InitializeLockedDungeons().
| void lfg::LFGMgr::SetOptions | ( | uint32 | options | ) |
| void lfg::LFGMgr::SetRandomPlayersCount | ( | ObjectGuid | guid, |
| uint8 | count | ||
| ) |
| void lfg::LFGMgr::SetRoles | ( | ObjectGuid | guid, |
| uint8 | roles | ||
| ) |
Sets player lfg roles.
References LOG_DEBUG, PlayersStore, and ObjectGuid::ToString().
Referenced by JoinLfg(), and UpdateRoleCheck().
|
private |
References LOG_DEBUG, PlayersStore, and ObjectGuid::ToString().
Referenced by JoinLfg(), and SetupGroupMember().
|
private |
References lfg::LfgGroupData::GetOldState(), lfg::LfgPlayerData::GetOldState(), lfg::LfgGroupData::GetState(), lfg::LfgPlayerData::GetState(), lfg::GetStateString(), GroupsStore, ObjectGuid::IsGroup(), LOG_DEBUG, PlayersStore, lfg::LfgGroupData::SetState(), lfg::LfgPlayerData::SetState(), and ObjectGuid::ToString().
Referenced by _LoadFromDB(), FinishDungeon(), InitBoot(), JoinLfg(), LeaveAllLfgQueues(), LeaveLfg(), MakeNewGroup(), RemoveGroupData(), RemoveProposal(), SetupGroupMember(), Update(), UpdateBoot(), UpdateProposal(), and UpdateRoleCheck().
| void lfg::LFGMgr::SetTeam | ( | ObjectGuid | guid, |
| TeamId | teamId | ||
| ) |
Sets player team.
References CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP, PlayersStore, sWorld, and TEAM_ALLIANCE.
| void lfg::LFGMgr::SetupGroupMember | ( | ObjectGuid | guid, |
| ObjectGuid | gguid | ||
| ) |
Initializes player data after loading group data from DB.
References AddPlayerToGroup(), GetDungeon(), GetState(), SetGroup(), SetSelectedDungeons(), and SetState().
| void lfg::LFGMgr::TeleportPlayer | ( | Player * | player, |
| bool | out, | ||
| WorldLocation const * | teleportLocation = nullptr |
||
| ) |
Teleport a player to/from selected dungeon.
Teleports the player in or out the dungeon
| [in] | player | Player to teleport |
| [in] | out | Teleport out (true) or in (false) |
| [in] | fromOpcode | Function called from opcode handlers? (Default false) |
References FATIGUE_TIMER, Unit::GetCharmGUID(), GetDungeon(), Player::GetEntryPoint(), Player::GetGroup(), Group::GetGUID(), GetLFGDungeon(), WorldObject::GetMap(), WorldLocation::GetMapId(), WorldObject::GetName(), Player::GetSession(), Unit::GetVehicle(), WorldLocation::GetWorldLocation(), Unit::HasUnitState(), Unit::IsAlive(), Map::IsDungeon(), Player::IsFalling(), Unit::IsInCombat(), Group::isLFGGroup(), Player::IsMirrorTimerActive(), lfg::LFG_TELEPORTERROR_COMBAT, lfg::LFG_TELEPORTERROR_FALLING, lfg::LFG_TELEPORTERROR_FATIGUE, lfg::LFG_TELEPORTERROR_IN_VEHICLE, lfg::LFG_TELEPORTERROR_INVALID_LOCATION, lfg::LFG_TELEPORTERROR_OK, lfg::LFG_TELEPORTERROR_PLAYER_DEAD, LOG_DEBUG, lfg::LFGDungeonData::map, MAPID_INVALID, lfg::LFGDungeonData::o, WorldSession::SendLfgTeleportError(), Player::SetEntryPoint(), Player::TeleportTo(), Player::TeleportToEntryPoint(), UNIT_STATE_JUMPING, lfg::LFGDungeonData::x, lfg::LFGDungeonData::y, and lfg::LFGDungeonData::z.
Referenced by MakeNewGroup().
| void lfg::LFGMgr::ToggleTesting | ( | ) |
References LANG_DEBUG_LFG_OFF, LANG_DEBUG_LFG_ON, m_Testing, and ChatHandler::SendWorldText().
References BootsStore, lfg::LfgRoleCheck::cancelTime, lfg::LfgPlayerBoot::cancelTime, GetComment(), GameTime::GetGameTime(), GetGroup(), GetSelectedDungeons(), lfg::LfgPlayerBoot::inProgress, isOptionEnabled(), lastProposalId, lfg::LfgRoleCheck::leader, lfg::LFG_JOIN_FAILED, lfg::LFG_OPTION_ENABLE_DUNGEON_FINDER, lfg::LFG_OPTION_ENABLE_RAID_BROWSER, lfg::LFG_OPTION_ENABLE_SEASONAL_BOSSES, lfg::LFG_PROPOSAL_SUCCESS, lfg::LFG_ROLECHECK_MISSING_ROLE, lfg::LFG_STATE_DUNGEON, lfg::LFG_STATE_PROPOSAL, lfg::LFG_UPDATETYPE_PROPOSAL_BEGIN, lfg::LFG_UPDATETYPE_PROPOSAL_FAILED, m_lfgProposalId, lfg::LfgProposal::players, ProposalsStore, QueuesStore, RemoveProposal(), RestoreState(), RoleChecksStore, lfg::LfgRoleCheck::roles, SendLfgBootProposalUpdate(), SendLfgJoinResult(), SendLfgRoleCheckUpdate(), SendLfgUpdateParty(), SendLfgUpdatePlayer(), SendLfgUpdateProposal(), SetState(), lfg::LfgProposal::state, lfg::LfgRoleCheck::state, UpdateProposal(), UpdateRaidBrowser(), lfg::LfgPlayerBoot::victim, and lfg::LfgPlayerBoot::votes.
| void lfg::LFGMgr::UpdateBoot | ( | ObjectGuid | guid, |
| bool | accept | ||
| ) |
Updates player boot proposal with new player answer.
Update Boot info with player answer
| [in] | guid | Player who has answered |
| [in] | player | answer |
References BootsStore, DecreaseKicksLeft(), ObjectGuid::GetCounter(), GetGroup(), GROUP_REMOVEMETHOD_KICK_LFG, lfg::LfgPlayerBoot::inProgress, lfg::LFG_ANSWER_AGREE, lfg::LFG_ANSWER_PENDING, lfg::LFG_GROUP_KICK_VOTES_NEEDED, lfg::LFG_STATE_DUNGEON, Player::RemoveFromGroup(), SendLfgBootProposalUpdate(), SetState(), sGroupMgr, lfg::LfgPlayerBoot::victim, and lfg::LfgPlayerBoot::votes.
| void lfg::LFGMgr::UpdateProposal | ( | uint32 | proposalId, |
| ObjectGuid | guid, | ||
| bool | accept | ||
| ) |
Updates proposal to join dungeon with player answer.
Update Proposal info with player answer
| [in] | proposalId | Proposal id to be updated |
| [in] | guid | Player guid to update answer |
| [in] | accept | Player answer |
References lfg::LfgProposalPlayer::accept, GameTime::GetGameTime(), lfg::LFGQueue::GetJoinTime(), GetQueue(), GetRoles(), GetSelectedDungeons(), lfg::Lfg5Guids::guids, IN_MILLISECONDS, lfg::LFG_ANSWER_AGREE, lfg::LFG_PROPOSAL_SUCCESS, lfg::LFG_STATE_DUNGEON, lfg::LFG_UPDATETYPE_GROUP_FOUND, lfg::LFG_UPDATETYPE_PROPOSAL_DECLINED, lfg::LFG_UPDATETYPE_REMOVED_FROM_QUEUE, LOG_DEBUG, m_Testing, MakeNewGroup(), lfg::PLAYER_ROLE_DAMAGE, lfg::PLAYER_ROLE_HEALER, lfg::PLAYER_ROLE_TANK, lfg::LfgProposal::players, ProposalsStore, lfg::LfgProposal::queues, RemoveProposal(), lfg::LFGQueue::RemoveQueueData(), SendLfgUpdateParty(), SendLfgUpdatePlayer(), SendLfgUpdateProposal(), SetState(), lfg::LfgProposal::state, ObjectGuid::ToString(), lfg::LfgUpdateData::updateType, lfg::LFGQueue::UpdateWaitTimeAvg(), lfg::LFGQueue::UpdateWaitTimeDps(), lfg::LFGQueue::UpdateWaitTimeHealer(), and lfg::LFGQueue::UpdateWaitTimeTank().
Referenced by Update().
| void lfg::LFGMgr::UpdateRaidBrowser | ( | uint32 | diff | ) |
References ASSERT, BASE_ATTACK, Class, CLASS_DRUID, ObjectGuid::Clear(), ByteBuffer::clear(), CR_BLOCK, CR_CRIT_MELEE, CR_CRIT_RANGED, CR_CRIT_SPELL, CR_DODGE, CR_EXPERTISE, CR_HASTE_SPELL, CR_PARRY, lfg::LFGDungeonData::difficulty, ObjectGuid::Empty, ObjectAccessor::FindConnectedPlayer(), WorldObject::GetAreaId(), Unit::GetArmor(), Player::GetAverageItemLevel(), Unit::getClass(), Unit::GetDefenseSkillValue(), Object::GetFloatValue(), GameTime::GetGameTimeMS(), Player::GetGroup(), Group::GetGUID(), Unit::GetLevel(), GetLFGDungeon(), Unit::GetMaxHealth(), Unit::GetMaxPower(), Group::GetMemberSlots(), GetMSTimeDiff(), Unit::getPowerType(), Unit::getRace(), Unit::GetStat(), Player::GetTalentTreePoints(), GetTimeMS(), Unit::GetTotalAttackPowerValue(), Object::GetUInt32Value(), Player::IsClass(), ObjectGuid::IsEmpty(), m_raidBrowserLastUpdatedDungeonId, m_raidBrowserUpdateTimer, lfg::LFGDungeonData::map, PLAYER_FIELD_COMBAT_RATING_1, lfg::PLAYER_ROLE_LEADER, POWER_MANA, POWER_RAGE, POWER_RUNIC_POWER, RaidBrowserStore, RANGED_ATTACK, RBCacheStore, RBInternalInfoStoreCurr, RBInternalInfoStorePrev, RBPacketAppendGroup(), RBPacketAppendPlayer(), RBPacketBuildDifference(), RBPacketBuildFull(), RBSearchersStore, RBUsedDungeonsStore, sCharacterCache, sInstanceSaveMgr, SMSG_UPDATE_LFG_LIST, SPELL_SCHOOL_MASK_ALL, Unit::SpellBaseDamageBonusDone(), Unit::SpellBaseHealingBonusDone(), STAT_AGILITY, UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER, and UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER.
Referenced by Update().
| void lfg::LFGMgr::UpdateRoleCheck | ( | ObjectGuid | gguid, |
| ObjectGuid | guid = ObjectGuid::Empty, |
||
| uint8 | roles = PLAYER_ROLE_NONE |
||
| ) |
Updates the role check with player answer.
Update the Role check info with the player selected role.
| [in] | grp | Group guid to update rolecheck |
| [in] | guid | Player guid (0 = rolecheck failed) |
| [in] | roles | Player selected roles |
References lfg::LFGQueue::AddQueueData(), CheckGroupRoles(), lfg::LfgRoleCheck::dungeons, GetComment(), GameTime::GetGameTime(), GetQueue(), lfg::LfgRoleCheck::leader, lfg::LFG_JOIN_FAILED, lfg::LFG_ROLECHECK_ABORTED, lfg::LFG_ROLECHECK_DEFAULT, lfg::LFG_ROLECHECK_FINISHED, lfg::LFG_ROLECHECK_INITIALITING, lfg::LFG_ROLECHECK_NO_ROLE, lfg::LFG_ROLECHECK_WRONG_ROLES, lfg::LFG_STATE_QUEUED, lfg::LFG_UPDATETYPE_ADDED_TO_QUEUE, lfg::LFG_UPDATETYPE_ROLECHECK_FAILED, lfg::PLAYER_ROLE_NONE, lfg::PLAYER_ROLE_TANK, lfg::LfgRoleCheck::rDungeonId, RestoreState(), RoleChecksStore, lfg::LfgRoleCheck::roles, SendLfgJoinResult(), SendLfgRoleCheckUpdate(), SendLfgRoleChosen(), SendLfgUpdateParty(), SetRoles(), SetState(), and lfg::LfgRoleCheck::state.
Referenced by JoinLfg(), and LeaveLfg().
|
private |
Current player kicks.
Referenced by InitBoot(), Update(), and UpdateBoot().
|
private |
Stores all dungeons by groupType.
Referenced by GetDungeonsByRandom(), and LoadLFGDungeons().
|
private |
Group data.
Referenced by AddPlayerToGroup(), DecreaseKicksLeft(), GetDungeon(), GetDungeonMapId(), GetKicksLeft(), GetLeader(), GetOldState(), GetPlayerCount(), GetPlayers(), GetState(), IsLfgGroup(), RemoveGroupData(), RemovePlayerFromGroup(), RestoreState(), SetDungeon(), SetLeader(), and SetState().
|
private |
|
private |
Referenced by GetLFGDungeon(), GetRandomAndSeasonalDungeons(), and LoadLFGDungeons().
|
private |
used as internal counter for proposals
Referenced by AddProposal(), and Update().
|
private |
Stores config options.
Referenced by GetOptions(), InitializeLockedDungeons(), isOptionEnabled(), and SetOptions().
|
private |
pussywizard: for 2 factions
Referenced by LFGMgr(), and UpdateRaidBrowser().
|
private |
pussywizard
Referenced by LFGMgr(), and UpdateRaidBrowser().
|
private |
Referenced by IsTesting(), MakeNewGroup(), ToggleTesting(), and UpdateProposal().
|
private |
Player data.
Referenced by GetComment(), GetGroup(), GetLfgStatus(), GetLockedDungeons(), GetOldState(), GetRandomPlayersCount(), GetRoles(), GetSelectedDungeons(), GetState(), GetTeam(), LoadLFGDungeons(), RestoreState(), SetCanOverrideRBState(), SetComment(), SetGroup(), SetLockedDungeons(), SetRandomPlayersCount(), SetRoles(), SetSelectedDungeons(), SetState(), and SetTeam().
|
private |
Current Proposals.
Referenced by AddProposal(), LeaveLfg(), RemoveProposal(), Update(), and UpdateProposal().
|
private |
Queues.
Referenced by Clean(), GetQueue(), LeaveAllLfgQueues(), and Update().
|
private |
Referenced by JoinRaidBrowser(), LeaveRaidBrowser(), LfrSetComment(), SendRaidBrowserJoinedPacket(), and UpdateRaidBrowser().
|
private |
Referenced by SendRaidBrowserCachedList(), and UpdateRaidBrowser().
|
private |
Referenced by UpdateRaidBrowser().
|
private |
Referenced by UpdateRaidBrowser().
|
private |
Referenced by LfrSearchAdd(), LfrSearchRemove(), and UpdateRaidBrowser().
|
private |
Referenced by JoinRaidBrowser(), and UpdateRaidBrowser().
|
private |
Stores rewards for random dungeons.
Referenced by GetRandomDungeonReward(), LoadRewards(), and ~LFGMgr().
|
private |
Current Role checks.
Referenced by JoinLfg(), Update(), and UpdateRoleCheck().