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

#include <CreatureTextMgr.h>

Public Member Functions

 CreatureTextMgr (CreatureTextMgr const &)=delete
 
 CreatureTextMgr (CreatureTextMgr &&)=delete
 
CreatureTextMgr & operator= (CreatureTextMgr const &)=delete
 
CreatureTextMgr & operator= (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 CreatureTextMgr * instance ()
 
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 ()
 

Private Attributes

CreatureTextMap mTextMap
 
LocaleCreatureTextMap mLocaleTextMap
 

Detailed Description

Definition at line 82 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

◆ GetRangeForChatType()

◆ GetTextMap()

CreatureTextMap const & CreatureTextMgr::GetTextMap ( ) const
inline

Definition at line 99 of file CreatureTextMgr.h.

◆ instance()

CreatureTextMgr * CreatureTextMgr::instance ( )
static

Definition at line 37 of file CreatureTextMgr.cpp.

References instance().

Referenced by instance().

◆ LoadCreatureTextLocales()

◆ LoadCreatureTexts()

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ SendChat()

◆ SendChatPacket()

◆ TextExist()

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

Definition at line 267 of file CreatureTextMgr.cpp.

References mTextMap, and TC_LOG_DEBUG.

Member Data Documentation

◆ mLocaleTextMap

LocaleCreatureTextMap CreatureTextMgr::mLocaleTextMap
private

Definition at line 113 of file CreatureTextMgr.h.

Referenced by GetLocalizedChatString(), and LoadCreatureTextLocales().

◆ mTextMap

CreatureTextMap CreatureTextMgr::mTextMap
private

Definition at line 112 of file CreatureTextMgr.h.

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


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