TrinityCore
CreatureTextMgr Class Reference

#include <CreatureTextMgr.h>

Public Member Functions

 CreatureTextMgr (CreatureTextMgr const &)=delete
 
 CreatureTextMgr (CreatureTextMgr &&)=delete
 
CreatureTextMgroperator= (CreatureTextMgr const &)=delete
 
CreatureTextMgroperator= (CreatureTextMgr &&)=delete
 
void LoadCreatureTexts ()
 
void LoadCreatureTextLocales ()
 
CreatureTextMap const & GetTextMap () const
 
uint32 SendChat (Creature *source, uint8 textGroup, WorldObject const *whisperTarget=nullptr, ChatMsg msgType=CHAT_MSG_ADDON, Language language=LANG_ADDON, CreatureTextRange range=TEXT_RANGE_NORMAL, uint32 sound=0, SoundKitPlayType playType=SoundKitPlayType::Normal, Team team=TEAM_OTHER, bool gmOnly=false, Player *srcPlr=nullptr)
 
bool TextExist (uint32 sourceEntry, uint8 textGroup) const
 
std::string GetLocalizedChatString (uint32 entry, uint8 gender, uint8 textGroup, uint32 id, LocaleConstant locale) const
 

Static Public Member Functions

static CreatureTextMgrinstance ()
 
static void SendSound (Creature *source, uint32 sound, ChatMsg msgType, WorldObject const *whisperTarget=nullptr, CreatureTextRange range=TEXT_RANGE_NORMAL, Team team=TEAM_OTHER, bool gmOnly=false, uint32 keyBroadcastTextId=0, SoundKitPlayType playType=SoundKitPlayType::Normal)
 
static void SendEmote (Unit *source, Emote emote)
 
template<class Builder >
static void SendChatPacket (WorldObject *source, Builder const &builder, ChatMsg msgType, WorldObject const *whisperTarget=nullptr, CreatureTextRange range=TEXT_RANGE_NORMAL, Team team=TEAM_OTHER, bool gmOnly=false)
 
static float GetRangeForChatType (ChatMsg msgType)
 

Private Member Functions

 CreatureTextMgr ()
 
 ~CreatureTextMgr ()
 

Static Private Member Functions

static void SendNonChatPacket (WorldObject *source, WorldPacket const *data, ChatMsg msgType, WorldObject const *whisperTarget, CreatureTextRange range, Team team, bool gmOnly)
 

Private Attributes

CreatureTextMap mTextMap
 
LocaleCreatureTextMap mLocaleTextMap
 

Detailed Description

Definition at line 89 of file CreatureTextMgr.h.

Constructor & Destructor Documentation

◆ CreatureTextMgr() [1/3]

CreatureTextMgr::CreatureTextMgr ( )
privatedefault

◆ ~CreatureTextMgr()

CreatureTextMgr::~CreatureTextMgr ( )
privatedefault

◆ CreatureTextMgr() [2/3]

CreatureTextMgr::CreatureTextMgr ( CreatureTextMgr const &  )
delete

◆ CreatureTextMgr() [3/3]

CreatureTextMgr::CreatureTextMgr ( CreatureTextMgr &&  )
delete

Member Function Documentation

◆ GetLocalizedChatString()

std::string CreatureTextMgr::GetLocalizedChatString ( uint32  entry,
uint8  gender,
uint8  textGroup,
uint32  id,
LocaleConstant  locale 
) const

Definition at line 408 of file CreatureTextMgr.cpp.

+ Here is the call graph for this function:

◆ GetRangeForChatType()

float CreatureTextMgr::GetRangeForChatType ( ChatMsg  msgType)
static

Definition at line 253 of file CreatureTextMgr.cpp.

+ Here is the caller graph for this function:

◆ GetTextMap()

CreatureTextMap const & CreatureTextMgr::GetTextMap ( ) const
inline

Definition at line 106 of file CreatureTextMgr.h.

◆ instance()

CreatureTextMgr * CreatureTextMgr::instance ( )
static

Definition at line 37 of file CreatureTextMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadCreatureTextLocales()

void CreatureTextMgr::LoadCreatureTextLocales ( )

Definition at line 142 of file CreatureTextMgr.cpp.

+ Here is the call graph for this function:

◆ LoadCreatureTexts()

void CreatureTextMgr::LoadCreatureTexts ( )

Definition at line 43 of file CreatureTextMgr.cpp.

+ Here is the call graph for this function:

◆ operator=() [1/2]

CreatureTextMgr & CreatureTextMgr::operator= ( CreatureTextMgr &&  )
delete

◆ operator=() [2/2]

CreatureTextMgr & CreatureTextMgr::operator= ( CreatureTextMgr const &  )
delete

◆ SendChat()

uint32 CreatureTextMgr::SendChat ( Creature source,
uint8  textGroup,
WorldObject const *  whisperTarget = nullptr,
ChatMsg  msgType = CHAT_MSG_ADDON,
Language  language = LANG_ADDON,
CreatureTextRange  range = TEXT_RANGE_NORMAL,
uint32  sound = 0,
SoundKitPlayType  playType = SoundKitPlayType::Normal,
Team  team = TEAM_OTHER,
bool  gmOnly = false,
Player srcPlr = nullptr 
)

Definition at line 173 of file CreatureTextMgr.cpp.

+ Here is the call graph for this function:

◆ SendChatPacket()

template<class Builder >
void CreatureTextMgr::SendChatPacket ( WorldObject source,
Builder const &  builder,
ChatMsg  msgType,
WorldObject const *  whisperTarget = nullptr,
CreatureTextRange  range = TEXT_RANGE_NORMAL,
Team  team = TEAM_OTHER,
bool  gmOnly = false 
)
static

Definition at line 75 of file CreatureTextMgrImpl.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendEmote()

void CreatureTextMgr::SendEmote ( Unit source,
Emote  emote 
)
static

Definition at line 377 of file CreatureTextMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendNonChatPacket()

void CreatureTextMgr::SendNonChatPacket ( WorldObject source,
WorldPacket const *  data,
ChatMsg  msgType,
WorldObject const *  whisperTarget,
CreatureTextRange  range,
Team  team,
bool  gmOnly 
)
staticprivate

Definition at line 292 of file CreatureTextMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendSound()

void CreatureTextMgr::SendSound ( Creature source,
uint32  sound,
ChatMsg  msgType,
WorldObject const *  whisperTarget = nullptr,
CreatureTextRange  range = TEXT_RANGE_NORMAL,
Team  team = TEAM_OTHER,
bool  gmOnly = false,
uint32  keyBroadcastTextId = 0,
SoundKitPlayType  playType = SoundKitPlayType::Normal 
)
static

Definition at line 272 of file CreatureTextMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TextExist()

bool CreatureTextMgr::TextExist ( uint32  sourceEntry,
uint8  textGroup 
) const

Definition at line 385 of file CreatureTextMgr.cpp.

Member Data Documentation

◆ mLocaleTextMap

LocaleCreatureTextMap CreatureTextMgr::mLocaleTextMap
private

Definition at line 125 of file CreatureTextMgr.h.

◆ mTextMap

CreatureTextMap CreatureTextMgr::mTextMap
private

Definition at line 124 of file CreatureTextMgr.h.


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