diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-04-25 23:24:29 +0200 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-04-25 23:25:59 +0200 |
commit | c81d6e9b4bec14a46fd4eb01ce51d874a12bf5f7 (patch) | |
tree | b59e12749120651458fe9d80e477bfd6d78a35ce /src/server/game/Texts/CreatureTextMgr.cpp | |
parent | f27057bf2406797f12b995f1fb40d6750c83af87 (diff) |
Core/Texts:
* Enable some BroadcastTexts stuff (is not finish)
* Added reload command for broadcast_text table
ToDo:
- Enable: Sound/Emote stuff, etc.
- Auth base need refresh
Diffstat (limited to 'src/server/game/Texts/CreatureTextMgr.cpp')
-rw-r--r-- | src/server/game/Texts/CreatureTextMgr.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index dd790cf9072..77592ab4a8e 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -472,13 +472,19 @@ std::string CreatureTextMgr::GetLocalizedChatString(uint32 entry, uint8 textGrou if (locale > MAX_LOCALES) locale = DEFAULT_LOCALE; - std::string baseText = groupItr->text; + std::string baseText = ""; + BroadcastText const* bct = sObjectMgr->GetBroadcastText(groupItr->BroadcastTextId); - if (locale != DEFAULT_LOCALE) + if (bct) + ObjectMgr::GetLocaleString(bct->MaleText, locale, baseText); + else + baseText = groupItr->text; + + if (locale != DEFAULT_LOCALE && !bct) { - LocaleCreatureTextMap::const_iterator locItr = mLocaleTextMap.find(CreatureTextId(entry, uint32(textGroup), id)); - if (locItr != mLocaleTextMap.end()) - ObjectMgr::GetLocaleString(locItr->second.Text, locale, baseText); + LocaleCreatureTextMap::const_iterator locItr = mLocaleTextMap.find(CreatureTextId(entry, uint32(textGroup), id)); + if (locItr != mLocaleTextMap.end()) + ObjectMgr::GetLocaleString(locItr->second.Text, locale, baseText); } return baseText; |