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

Public Member Functions

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

Private Attributes

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

Constructor & Destructor Documentation

PlayerTextBuilder::PlayerTextBuilder ( WorldObject const obj,
WorldObject const speaker,
uint8  gender,
ChatMsg  msgtype,
uint8  textGroup,
uint32  id,
uint32  language,
WorldObject const target 
)
inline
58  : _source(obj), _talker(speaker), _gender(gender), _msgType(msgtype), _textGroup(textGroup), _textId(id), _language(language), _target(target) { }
ChatMsg _msgType
Definition: CreatureTextMgr.cpp:72
WorldObject const * _target
Definition: CreatureTextMgr.cpp:76
uint8 _gender
Definition: CreatureTextMgr.cpp:71
uint8 _textGroup
Definition: CreatureTextMgr.cpp:73
uint32 _language
Definition: CreatureTextMgr.cpp:75
WorldObject const * _talker
Definition: CreatureTextMgr.cpp:70
WorldObject const * _source
Definition: CreatureTextMgr.cpp:69
uint32 _textId
Definition: CreatureTextMgr.cpp:74

Member Function Documentation

WorldPackets::Chat::Chat* PlayerTextBuilder::operator() ( LocaleConstant  locale) const
inline
61  {
62  std::string const& text = sCreatureTextMgr->GetLocalizedChatString(_source->GetEntry(), _gender, _textGroup, _textId, locale);
64  chat->Initialize(_msgType, Language(_language), _talker, _target, text, 0, "", locale);
65  return chat;
66  }
ChatMsg _msgType
Definition: CreatureTextMgr.cpp:72
Definition: ChatPackets.h:150
WorldObject const * _target
Definition: CreatureTextMgr.cpp:76
uint8 _gender
Definition: CreatureTextMgr.cpp:71
Language
Definition: SharedDefines.h:959
uint8 _textGroup
Definition: CreatureTextMgr.cpp:73
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
uint32 _language
Definition: CreatureTextMgr.cpp:75
WorldObject const * _talker
Definition: CreatureTextMgr.cpp:70
WorldObject const * _source
Definition: CreatureTextMgr.cpp:69
uint32 _textId
Definition: CreatureTextMgr.cpp:74
uint32 GetEntry() const
Definition: Object.h:107

+ Here is the call graph for this function:

Member Data Documentation

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

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