diff options
| author | ModoX <moardox@gmail.com> | 2021-10-26 22:49:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-26 22:49:12 +0200 |
| commit | 94b14e4f6355a7bab8004dcc2ecadadbc52833de (patch) | |
| tree | 05a07038b3acfbe35cbe36f24d40232c33d710b7 /src/common | |
| parent | d57e798d5074002c50ec65be84e762bafdf93aa0 (diff) | |
Core/Conversations: Dropped time fields and calculate them using db2 data (#27151)
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/Common.cpp | 16 | ||||
| -rw-r--r-- | src/common/Common.h | 23 |
2 files changed, 39 insertions, 0 deletions
diff --git a/src/common/Common.cpp b/src/common/Common.cpp index a176941e6f9..1d1beddddc6 100644 --- a/src/common/Common.cpp +++ b/src/common/Common.cpp @@ -41,3 +41,19 @@ LocaleConstant GetLocaleByName(std::string const& name) return TOTAL_LOCALES; } + +CascLocaleBit WowLocaleToCascLocaleBit[TOTAL_LOCALES] = +{ + CascLocaleBit::enUS, + CascLocaleBit::koKR, + CascLocaleBit::frFR, + CascLocaleBit::deDE, + CascLocaleBit::zhCN, + CascLocaleBit::zhTW, + CascLocaleBit::esES, + CascLocaleBit::esMX, + CascLocaleBit::ruRU, + CascLocaleBit::None, + CascLocaleBit::ptBR, + CascLocaleBit::itIT +}; diff --git a/src/common/Common.h b/src/common/Common.h index 7c0f2b37142..902b8cf6567 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -98,10 +98,33 @@ enum LocaleConstant : uint8 const uint8 OLD_TOTAL_LOCALES = 9; /// @todo convert in simple system #define DEFAULT_LOCALE LOCALE_enUS +enum class CascLocaleBit : uint8 +{ + None = 0, + enUS = 1, + koKR = 2, + Reserved = 3, + frFR = 4, + deDE = 5, + zhCN = 6, + esES = 7, + zhTW = 8, + enGB = 9, + enCN = 10, + enTW = 11, + esMX = 12, + ruRU = 13, + ptBR = 14, + itIT = 15, + ptPT = 16 +}; + TC_COMMON_API extern char const* localeNames[TOTAL_LOCALES]; TC_COMMON_API LocaleConstant GetLocaleByName(std::string const& name); +TC_COMMON_API extern CascLocaleBit WowLocaleToCascLocaleBit[TOTAL_LOCALES]; + constexpr inline bool IsValidLocale(LocaleConstant locale) { return locale < TOTAL_LOCALES && locale != LOCALE_none; |
