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"

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 ( )
132{
133 new lfg_commandscript();
134}
Definition: cs_lfg.cpp:42

Referenced by AddCommandsScripts().

◆ GetPlayerInfo()

void GetPlayerInfo ( ChatHandler handler,
Player player 
)
26{
27 if (!player)
28 return;
29
30 ObjectGuid guid = player->GetGUID();
31 lfg::LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(guid);
32
33 std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
35 state, uint8(dungeons.size()), lfg::ConcatenateDungeons(dungeons),
36 lfg::GetRolesString(sLFGMgr->GetRoles(guid)), sLFGMgr->GetComment(guid));
37}
std::uint8_t uint8
Definition: Define.h:109
#define sLFGMgr
Definition: LFGMgr.h:641
@ LANG_LFG_PLAYER_INFO
Definition: Language.h:1174
std::set< uint32 > LfgDungeonSet
Definition: LFG.h:109
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
void PSendSysMessage(std::string_view str, bool escapeCharacters=false)
Definition: Chat.cpp:210
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
std::string const & GetName() const
Definition: Object.h:458
Definition: ObjectGuid.h:118

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().