|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <CreatureTextMgr.h>
Public Member Functions | |
| std::string | GetLocalizedChatString (uint32 entry, uint8 textGroup, uint32 id, LocaleConstant locale) const |
| CreatureTextMap const & | GetTextMap () const |
| void | LoadCreatureTextLocales () |
| void | LoadCreatureTexts () |
| uint32 | SendChat (Creature *source, uint8 textGroup, WorldObject const *whisperTarget=NULL, ChatMsg msgType=ChatMsg::CHAT_MSG_ADDON, Language language=Language::LANG_ADDON, CreatureTextRange range=TEXT_RANGE_NORMAL, uint32 sound=0, Team team=TEAM_OTHER, bool gmOnly=false, Player *srcPlr=NULL) |
| template<class Builder> | |
| void | SendChatPacket (WorldObject *source, Builder const &builder, ChatMsg msgType, WorldObject const *whisperTarget=NULL, CreatureTextRange range=TEXT_RANGE_NORMAL, Team team=TEAM_OTHER, bool gmOnly=false) const |
| void | SendEmote (Unit *source, uint32 emote) |
| void | SendSound (Creature *source, uint32 sound, ChatMsg msgType, WorldObject const *whisperTarget, CreatureTextRange range, Team team, bool gmOnly) |
| bool | TextExist (uint32 sourceEntry, uint8 textGroup) |
| ~CreatureTextMgr () | |
Private Member Functions | |
| CreatureTextMgr () | |
| float | GetRangeForChatType (ChatMsg msgType) const |
| CreatureTextRepeatIds | GetRepeatGroup (Creature *source, uint8 textGroup) |
| void | SendNonChatPacket (WorldObject *source, WorldPacket *data, ChatMsg msgType, WorldObject const *whisperTarget, CreatureTextRange range, Team team, bool gmOnly) const |
| void | SetRepeatId (Creature *source, uint8 textGroup, uint8 id) |
Private Attributes | |
| LocaleCreatureTextMap | mLocaleTextMap |
| CreatureTextMap | mTextMap |
| CreatureTextRepeatMap | mTextRepeatMap |
Friends | |
| class | Skyfire::Singleton< CreatureTextMgr, Skyfire::NullMutex > |
Definition at line 71 of file CreatureTextMgr.h.
|
inlineprivate |
Definition at line 74 of file CreatureTextMgr.h.
References CreatureTextMgr().
Referenced by CreatureTextMgr().
|
inline |
Definition at line 77 of file CreatureTextMgr.h.
| std::string CreatureTextMgr::GetLocalizedChatString | ( | uint32 | entry, |
| uint8 | textGroup, | ||
| uint32 | id, | ||
| LocaleConstant | locale ) const |
Definition at line 443 of file CreatureTextMgr.cpp.
References DEFAULT_LOCALE, ObjectMgr::GetLocaleString(), MAX_LOCALES, mLocaleTextMap, and mTextMap.
|
private |
Definition at line 269 of file CreatureTextMgr.cpp.
References CHAT_MSG_MONSTER_EMOTE, CHAT_MSG_MONSTER_YELL, CHAT_MSG_RAID_BOSS_EMOTE, CONFIG_LISTEN_RANGE_SAY, CONFIG_LISTEN_RANGE_TEXTEMOTE, CONFIG_LISTEN_RANGE_YELL, and sWorld.
Referenced by SendChatPacket(), and SendNonChatPacket().
|
private |
Definition at line 405 of file CreatureTextMgr.cpp.
References ASSERT, Object::GetGUID(), and mTextRepeatMap.
Referenced by SendChat().
|
inline |
Definition at line 80 of file CreatureTextMgr.h.
References mTextMap.
| void CreatureTextMgr::LoadCreatureTextLocales | ( | ) |
Definition at line 133 of file CreatureTextMgr.cpp.
References ObjectMgr::AddLocaleString(), getMSTime(), GetMSTimeDiffToNow(), mLocaleTextMap, SF_LOG_INFO, CreatureTextLocale::Text, TOTAL_LOCALES, and WorldDatabase.
| void CreatureTextMgr::LoadCreatureTexts | ( | ) |
Definition at line 59 of file CreatureTextMgr.cpp.
References CHAT_MSG_SAY, CreatureTextEntry::duration, CreatureTextEntry::emote, EMOTE_ONESHOT_NONE, CreatureTextEntry::entry, Field::GetFloat(), GetLanguageDescByID(), getMSTime(), GetMSTimeDiffToNow(), Field::GetString(), Field::GetUInt32(), Field::GetUInt8(), CreatureTextEntry::group, CreatureTextEntry::id, CreatureTextEntry::lang, LANG_UNIVERSAL, MSG_NULL_ACTION, mTextMap, mTextRepeatMap, CreatureTextEntry::probability, sEmotesStore, SF_LOG_ERROR, SF_LOG_INFO, CreatureTextEntry::sound, sSoundEntriesStore, CreatureTextEntry::text, CreatureTextEntry::type, WORLD_SEL_CREATURE_TEXT, and WorldDatabase.
| uint32 CreatureTextMgr::SendChat | ( | Creature * | source, |
| uint8 | textGroup, | ||
| WorldObject const * | whisperTarget = NULL, | ||
| ChatMsg | msgType = ChatMsg::CHAT_MSG_ADDON, | ||
| Language | language = Language::LANG_ADDON, | ||
| CreatureTextRange | range = TEXT_RANGE_NORMAL, | ||
| uint32 | sound = 0, | ||
| Team | team = TEAM_OTHER, | ||
| bool | gmOnly = false, | ||
| Player * | srcPlr = NULL ) |
Definition at line 162 of file CreatureTextMgr.cpp.
References CHAT_MSG_ADDON, Object::GetEntry(), Object::GetGUID(), Object::GetGUIDLow(), WorldObject::GetName(), GetRepeatGroup(), LANG_ADDON, mTextMap, mTextRepeatMap, SendChatPacket(), SendEmote(), SendSound(), SetRepeatId(), and SF_LOG_ERROR.
| void CreatureTextMgr::SendChatPacket | ( | WorldObject * | source, |
| Builder const & | builder, | ||
| ChatMsg | msgType, | ||
| WorldObject const * | whisperTarget = NULL, | ||
| CreatureTextRange | range = TEXT_RANGE_NORMAL, | ||
| Team | team = TEAM_OTHER, | ||
| bool | gmOnly = false ) const |
Definition at line 166 of file CreatureTextMgr.h.
References MapRefManager::begin(), CHAT_MSG_MONSTER_WHISPER, CHAT_MSG_RAID_BOSS_WHISPER, MapRefManager::end(), WorldObject::GetAreaId(), WorldObject::GetMap(), Unit::GetPlayer(), Map::GetPlayers(), GetRangeForChatType(), Object::GetTypeId(), WorldObject::GetZoneId(), sWorld, TEXT_RANGE_AREA, TEXT_RANGE_MAP, TEXT_RANGE_NORMAL, TEXT_RANGE_WORLD, TEXT_RANGE_ZONE, Object::ToPlayer(), TYPEID_PLAYER, and WorldObject::VisitNearbyWorldObject().
Referenced by SendChat().
Definition at line 385 of file CreatureTextMgr.cpp.
References Unit::HandleEmoteCommand().
Referenced by SendChat().
|
private |
Definition at line 317 of file CreatureTextMgr.cpp.
References MapRefManager::begin(), CHAT_MSG_MONSTER_WHISPER, CHAT_MSG_RAID_BOSS_WHISPER, MapRefManager::end(), WorldObject::GetAreaId(), WorldObject::GetMap(), Unit::GetPlayer(), Map::GetPlayers(), GetRangeForChatType(), Player::GetSession(), Object::GetTypeId(), WorldObject::GetZoneId(), WorldObject::SendMessageToSetInRange(), WorldSession::SendPacket(), sWorld, TEXT_RANGE_AREA, TEXT_RANGE_MAP, TEXT_RANGE_NORMAL, TEXT_RANGE_WORLD, TEXT_RANGE_ZONE, Object::ToPlayer(), and TYPEID_PLAYER.
Referenced by SendSound().
| void CreatureTextMgr::SendSound | ( | Creature * | source, |
| uint32 | sound, | ||
| ChatMsg | msgType, | ||
| WorldObject const * | whisperTarget, | ||
| CreatureTextRange | range, | ||
| Team | team, | ||
| bool | gmOnly ) |
Definition at line 288 of file CreatureTextMgr.cpp.
References Object::GetGUID(), SendNonChatPacket(), SMSG_PLAY_SOUND, ByteBuffer::WriteBit(), and ByteBuffer::WriteByteSeq().
Referenced by SendChat().
Definition at line 393 of file CreatureTextMgr.cpp.
References Object::GetEntry(), Object::GetGUID(), Object::GetGUIDLow(), WorldObject::GetName(), mTextRepeatMap, and SF_LOG_ERROR.
Referenced by SendChat().
Definition at line 420 of file CreatureTextMgr.cpp.
References mTextMap, and SF_LOG_DEBUG.
|
friend |
Definition at line 57 of file CreatureTextMgr.h.
|
private |
Definition at line 101 of file CreatureTextMgr.h.
Referenced by GetLocalizedChatString(), and LoadCreatureTextLocales().
|
private |
Definition at line 99 of file CreatureTextMgr.h.
Referenced by GetLocalizedChatString(), GetTextMap(), LoadCreatureTexts(), SendChat(), and TextExist().
|
private |
Definition at line 100 of file CreatureTextMgr.h.
Referenced by GetRepeatGroup(), LoadCreatureTexts(), SendChat(), and SetRepeatId().