AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
cs_lfg.cpp File Reference
#include "Chat.h"
#include "CommandScript.h"
#include "Group.h"
#include "LFGMgr.h"
#include "Language.h"
#include "Player.h"
#include "RBAC.h"

Go to the source code of this file.

Classes

class  lfg_commandscript
 

Functions

void GetPlayerInfo (ChatHandler *handler, Player *player)
 
void AddSC_lfg_commandscript ()
 

Function Documentation

◆ AddSC_lfg_commandscript()

void AddSC_lfg_commandscript ( )
141{
142 new lfg_commandscript();
143}
Definition cs_lfg.cpp:43

Referenced by AddCommandsScripts().

◆ GetPlayerInfo()

void GetPlayerInfo ( ChatHandler handler,
Player player 
)
27{
28 if (!player)
29 return;
30
31 ObjectGuid guid = player->GetGUID();
32 lfg::LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(guid);
33
34 std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
36 state, uint8(dungeons.size()), lfg::ConcatenateDungeons(dungeons),
37 lfg::GetRolesString(sLFGMgr->GetRoles(guid)), sLFGMgr->GetComment(guid));
38}
std::uint8_t uint8
Definition Define.h:109
#define sLFGMgr
Definition LFGMgr.h:658
@ LANG_LFG_PLAYER_INFO
Definition Language.h:1259
void PSendSysMessage(std::string_view str, bool escapeCharacters=false)
Definition Chat.cpp:219
Definition ObjectGuid.h:118
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:114
std::string const & GetName() const
Definition Object.h:528
std::set< uint32 > LfgDungeonSet
Definition LFG.h:114
std::string GetStateString(LfgState state)
Definition LFG.cpp:73
std::string GetRolesString(uint8 roles)
Definition LFG.cpp:39
std::string ConcatenateDungeons(LfgDungeonSet const &dungeons)
Definition LFG.cpp:24

References lfg::ConcatenateDungeons(), Object::GetGUID(), WorldObject::GetName(), lfg::GetRolesString(), lfg::GetStateString(), LANG_LFG_PLAYER_INFO, ChatHandler::PSendSysMessage(), and sLFGMgr.

Referenced by lfg_commandscript::HandleLfgGroupInfoCommand(), and lfg_commandscript::HandleLfgPlayerInfoCommand().