diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-04-25 23:42:40 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-04-25 23:42:40 +0200 |
| commit | 1390621f4da88d6749e42bea0a131fae74742fa4 (patch) | |
| tree | 5c6b3c03866feb85ade9f5f95b5cb7cbd5617f61 /src/server/game/Texts/CreatureTextMgr.cpp | |
| parent | 7edfbaeb6ee667584b14fc3f59189aa762ae38c5 (diff) | |
| parent | c81d6e9b4bec14a46fd4eb01ce51d874a12bf5f7 (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
src/server/game/Handlers/MiscHandler.cpp
src/server/scripts/Commands/cs_reload.cpp
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 29c7cf3170b..fe72e12e7e1 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -473,13 +473,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; |
