TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Trinity::Battleground2ChatBuilder Class Reference

Public Member Functions

 Battleground2ChatBuilder (ChatMsg msgtype, uint32 textId, Player const *source, uint32 arg1, uint32 arg2)
 
WorldPackets::Packetoperator() (LocaleConstant loc_idx)
 

Private Attributes

ChatMsg _msgtype
 
uint32 _textId
 
Player const_source
 
uint32 _arg1
 
uint32 _arg2
 

Constructor & Destructor Documentation

Trinity::Battleground2ChatBuilder::Battleground2ChatBuilder ( ChatMsg  msgtype,
uint32  textId,
Player const source,
uint32  arg1,
uint32  arg2 
)
inline
85  : _msgtype(msgtype), _textId(textId), _source(source), _arg1(arg1), _arg2(arg2) { }
Player const * _source
Definition: Battleground.cpp:104
uint32 _textId
Definition: Battleground.cpp:103
uint32 _arg2
Definition: Battleground.cpp:106
uint32 _arg1
Definition: Battleground.cpp:105
ChatMsg _msgtype
Definition: Battleground.cpp:102

Member Function Documentation

WorldPackets::Packet* Trinity::Battleground2ChatBuilder::operator() ( LocaleConstant  loc_idx)
inline
88  {
89  char const* text = sObjectMgr->GetTrinityString(_textId, loc_idx);
90  char const* arg1str = _arg1 ? sObjectMgr->GetTrinityString(_arg1, loc_idx) : "";
91  char const* arg2str = _arg2 ? sObjectMgr->GetTrinityString(_arg2, loc_idx) : "";
92 
93  char str[2048];
94  snprintf(str, 2048, text, arg1str, arg2str);
95 
98  return packet;
99  }
Player const * _source
Definition: Battleground.cpp:104
Definition: SharedDefines.h:961
#define snprintf
Definition: Common.h:76
uint32 _textId
Definition: Battleground.cpp:103
Definition: ChatPackets.h:150
#define sObjectMgr
Definition: ObjectMgr.h:1567
uint32 _arg2
Definition: Battleground.cpp:106
uint32 _arg1
Definition: Battleground.cpp:105
void Initialize(ChatMsg chatType, Language language, WorldObject const *sender, WorldObject const *receiver, std::string message, uint32 achievementId=0, std::string channelName="", LocaleConstant locale=DEFAULT_LOCALE, std::string addonPrefix="")
Definition: ChatPackets.cpp:104
ChatMsg _msgtype
Definition: Battleground.cpp:102

+ Here is the call graph for this function:

Member Data Documentation

uint32 Trinity::Battleground2ChatBuilder::_arg1
private
uint32 Trinity::Battleground2ChatBuilder::_arg2
private
ChatMsg Trinity::Battleground2ChatBuilder::_msgtype
private
Player const* Trinity::Battleground2ChatBuilder::_source
private
uint32 Trinity::Battleground2ChatBuilder::_textId
private

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