TrinityCore
Loading...
Searching...
No Matches
CreatureTextMgr Class Reference

#include <CreatureTextMgr.h>

Public Member Functions

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, 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 CreatureTextMgr * instance ()
 
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)
 
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)
 

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)
 
static float GetRangeForChatType (ChatMsg msgType)
 

Private Attributes

CreatureTextMap mTextMap
 
LocaleCreatureTextMap mLocaleTextMap
 

Detailed Description

Definition at line 80 of file CreatureTextMgr.h.

Constructor & Destructor Documentation

◆ CreatureTextMgr()

CreatureTextMgr::CreatureTextMgr ( )
inlineprivate

Definition at line 83 of file CreatureTextMgr.h.

◆ ~CreatureTextMgr()

CreatureTextMgr::~CreatureTextMgr ( )
inlineprivate

Definition at line 84 of file CreatureTextMgr.h.

Member Function Documentation

◆ GetLocalizedChatString()

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

◆ GetRangeForChatType()

float CreatureTextMgr::GetRangeForChatType ( ChatMsg  msgType)
staticprivate

◆ GetTextMap()

CreatureTextMap const & CreatureTextMgr::GetTextMap ( ) const
inline

Definition at line 91 of file CreatureTextMgr.h.

◆ instance()

CreatureTextMgr * CreatureTextMgr::instance ( )
static

Definition at line 91 of file CreatureTextMgr.cpp.

References instance().

Referenced by instance().

◆ LoadCreatureTextLocales()

◆ LoadCreatureTexts()

◆ SendChat()

◆ SendChatPacket()

◆ SendEmote()

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

Definition at line 398 of file CreatureTextMgr.cpp.

References Unit::HandleEmoteCommand().

Referenced by SendChat().

◆ SendNonChatPacket()

◆ 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 
)
static

◆ TextExist()

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

Definition at line 406 of file CreatureTextMgr.cpp.

References mTextMap, and TC_LOG_DEBUG.

Member Data Documentation

◆ mLocaleTextMap

LocaleCreatureTextMap CreatureTextMgr::mLocaleTextMap
private

Definition at line 109 of file CreatureTextMgr.h.

Referenced by GetLocalizedChatString(), and LoadCreatureTextLocales().

◆ mTextMap

CreatureTextMap CreatureTextMgr::mTextMap
private

Definition at line 108 of file CreatureTextMgr.h.

Referenced by GetLocalizedChatString(), LoadCreatureTexts(), SendChat(), and TextExist().


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