mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Removed old incorrect define
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 = "";
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user