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

Public Member Functions

 CreatureTextBuilder (WorldObject const *obj, uint8 gender, ChatMsg msgtype, uint8 textGroup, uint32 id, uint32 language, WorldObject const *target)
 
WorldPackets::Chat::Chatoperator() (LocaleConstant locale) const
 

Private Attributes

WorldObject const_source
 
uint8 _gender
 
ChatMsg _msgType
 
uint8 _textGroup
 
uint32 _textId
 
uint32 _language
 
WorldObject const_target
 

Constructor & Destructor Documentation

CreatureTextBuilder::CreatureTextBuilder ( WorldObject const obj,
uint8  gender,
ChatMsg  msgtype,
uint8  textGroup,
uint32  id,
uint32  language,
WorldObject const target 
)
inline
34  : _source(obj), _gender(gender), _msgType(msgtype), _textGroup(textGroup), _textId(id), _language(language), _target(target) { }
uint32 _language
Definition: CreatureTextMgr.cpp:50
uint8 _textGroup
Definition: CreatureTextMgr.cpp:48
WorldObject const * _target
Definition: CreatureTextMgr.cpp:51
uint8 _gender
Definition: CreatureTextMgr.cpp:46
WorldObject const * _source
Definition: CreatureTextMgr.cpp:45
uint32 _textId
Definition: CreatureTextMgr.cpp:49
ChatMsg _msgType
Definition: CreatureTextMgr.cpp:47

Member Function Documentation

WorldPackets::Chat::Chat* CreatureTextBuilder::operator() ( LocaleConstant  locale) const
inline
37  {
38  std::string const& text = sCreatureTextMgr->GetLocalizedChatString(_source->GetEntry(), _gender, _textGroup, _textId, locale);
40  chat->Initialize(_msgType, Language(_language), _source, _target, text, 0, "", locale);
41  return chat;
42  }
uint32 _language
Definition: CreatureTextMgr.cpp:50
uint8 _textGroup
Definition: CreatureTextMgr.cpp:48
WorldObject const * _target
Definition: CreatureTextMgr.cpp:51
Definition: ChatPackets.h:150
uint8 _gender
Definition: CreatureTextMgr.cpp:46
Language
Definition: SharedDefines.h:959
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
#define sCreatureTextMgr
Definition: CreatureTextMgr.h:113
WorldObject const * _source
Definition: CreatureTextMgr.cpp:45
uint32 GetEntry() const
Definition: Object.h:107
uint32 _textId
Definition: CreatureTextMgr.cpp:49
ChatMsg _msgType
Definition: CreatureTextMgr.cpp:47

+ Here is the call graph for this function:

Member Data Documentation

uint8 CreatureTextBuilder::_gender
private
uint32 CreatureTextBuilder::_language
private
ChatMsg CreatureTextBuilder::_msgType
private
WorldObject const* CreatureTextBuilder::_source
private
WorldObject const* CreatureTextBuilder::_target
private
uint8 CreatureTextBuilder::_textGroup
private
uint32 CreatureTextBuilder::_textId
private

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