AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::Battleground2ChatBuilder Class Reference

Public Member Functions

 Battleground2ChatBuilder (ChatMsg msgtype, uint32 textId, Player const *source, int32 arg1, int32 arg2)
 
void operator() (WorldPacket &data, LocaleConstant loc_idx)
 

Private Attributes

ChatMsg _msgtype
 
uint32 _textId
 
Player const * _source
 
uint32 _arg1
 
uint32 _arg2
 

Detailed Description

Constructor & Destructor Documentation

◆ Battleground2ChatBuilder()

Acore::Battleground2ChatBuilder::Battleground2ChatBuilder ( ChatMsg  msgtype,
uint32  textId,
Player const *  source,
int32  arg1,
int32  arg2 
)
inline
95 : _msgtype(msgtype), _textId(textId), _source(source), _arg1(arg1), _arg2(arg2) {}
uint32 _textId
Definition Battleground.cpp:114
ChatMsg _msgtype
Definition Battleground.cpp:113
Player const * _source
Definition Battleground.cpp:115
uint32 _arg1
Definition Battleground.cpp:116
uint32 _arg2
Definition Battleground.cpp:117

Member Function Documentation

◆ operator()()

void Acore::Battleground2ChatBuilder::operator() ( WorldPacket data,
LocaleConstant  loc_idx 
)
inline
98 {
99 std::string strtext = sObjectMgr->GetAcoreString(_textId, loc_idx);
100 char const* text = strtext.c_str();
101 std::string stragr1str = sObjectMgr->GetAcoreString(_arg1, loc_idx);
102 char const* arg1str = _arg1 ? stragr1str.c_str() : "";
103 std::string strarg2str = sObjectMgr->GetAcoreString(_arg2, loc_idx);
104 char const* arg2str = _arg2 ? strarg2str.c_str() : "";
105
106 char str[2048];
107 snprintf(str, 2048, text, arg1str, arg2str);
108
110 }
#define sObjectMgr
Definition ObjectMgr.h:1636
@ LANG_UNIVERSAL
Definition SharedDefines.h:735
static std::size_t BuildChatPacket(WorldPacket &data, ChatMsg chatType, Language language, ObjectGuid senderGUID, ObjectGuid receiverGUID, std::string_view message, uint8 chatTag, std::string const &senderName="", std::string const &receiverName="", uint32 achievementId=0, bool gmMessage=false, std::string const &channelName="")
Definition Chat.cpp:265

References _arg1, _arg2, _msgtype, _source, _textId, ChatHandler::BuildChatPacket(), LANG_UNIVERSAL, and sObjectMgr.

Member Data Documentation

◆ _arg1

uint32 Acore::Battleground2ChatBuilder::_arg1
private

Referenced by operator()().

◆ _arg2

uint32 Acore::Battleground2ChatBuilder::_arg2
private

Referenced by operator()().

◆ _msgtype

ChatMsg Acore::Battleground2ChatBuilder::_msgtype
private

Referenced by operator()().

◆ _source

Player const* Acore::Battleground2ChatBuilder::_source
private

Referenced by operator()().

◆ _textId

uint32 Acore::Battleground2ChatBuilder::_textId
private

Referenced by operator()().


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