AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
cs_lfg.cpp File Reference
#include "Chat.h"
#include "CommandScript.h"
#include "DatabaseEnv.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 ( )
133{
134 new lfg_commandscript();
135}
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));
35 handler->PSendSysMessage(LANG_LFG_PLAYER_INFO, player->GetName().c_str(),
36 state.c_str(), uint8(dungeons.size()), lfg::ConcatenateDungeons(dungeons).c_str(),
37 lfg::GetRolesString(sLFGMgr->GetRoles(guid)).c_str(), sLFGMgr->GetComment(guid).c_str());
38}
std::uint8_t uint8
Definition: Define.h:110
#define sLFGMgr
Definition: LFGMgr.h:641
@ LANG_LFG_PLAYER_INFO
Definition: Language.h:1188
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(char const *fmt, Args &&... args)
Definition: Chat.h:60
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
std::string const & GetName() const
Definition: Object.h:446
Definition: ObjectGuid.h:120

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