diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/Common.h | 2 | ||||
-rw-r--r-- | src/server/game/Texts/CreatureTextMgr.cpp | 2 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 2 |
3 files changed, 2 insertions, 4 deletions
diff --git a/src/common/Common.h b/src/common/Common.h index 3518d1cb628..7f76698c9c9 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -97,8 +97,6 @@ enum LocaleConstant : uint8 const uint8 OLD_TOTAL_LOCALES = 9; /// @todo convert in simple system #define DEFAULT_LOCALE LOCALE_enUS -#define MAX_LOCALES 11 - TC_COMMON_API extern char const* localeNames[TOTAL_LOCALES]; TC_COMMON_API LocaleConstant GetLocaleByName(std::string const& name); diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 6febfd49362..78e96e12492 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -438,7 +438,7 @@ std::string CreatureTextMgr::GetLocalizedChatString(uint32 entry, uint8 gender, if (groupItr == holderItr->second.end()) return ""; - if (locale > MAX_LOCALES) + if (locale >= TOTAL_LOCALES) locale = DEFAULT_LOCALE; std::string baseText = ""; diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 87f2e1125f7..1067283431d 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1270,7 +1270,7 @@ public: std::string itemName = itemNameStr+1; auto itr = std::find_if(sItemSparseStore.begin(), sItemSparseStore.end(), [&itemName](ItemSparseEntry const* sparse) { - for (uint32 i = 0; i < MAX_LOCALES; ++i) + for (uint32 i = 0; i < TOTAL_LOCALES; ++i) if (itemName == sparse->Display->Str[i]) return true; return false; |