18#ifndef TRINITYCORE_COMMON_H
19#define TRINITYCORE_COMMON_H
26#if TRINITY_COMPILER == TRINITY_COMPILER_MICROSOFT
33#define stricmp strcasecmp
34#define strnicmp strncasecmp
38inline unsigned long atoul(
char const* str) {
return strtoul(str,
nullptr, 10); }
39inline unsigned long long atoull(
char const* str) {
return strtoull(str,
nullptr, 10); }
41#define STRINGIZE(a) #a
82#define DEFAULT_LOCALE LOCALE_enUS
125 std::array<char const*, TOTAL_LOCALES>
Str;
140#define M_PI 3.14159265358979323846
144#define M_PI_4 0.785398163397448309616
147#define MAX_QUERY_LEN 32*1024
unsigned long long atoull(char const *str)
Definition: Common.h:39
LocaleConstant
Definition: Common.h:64
@ LOCALE_zhCN
Definition: Common.h:69
@ LOCALE_deDE
Definition: Common.h:68
@ LOCALE_zhTW
Definition: Common.h:70
@ LOCALE_ptBR
Definition: Common.h:75
@ LOCALE_itIT
Definition: Common.h:76
@ LOCALE_none
Definition: Common.h:74
@ LOCALE_esES
Definition: Common.h:71
@ TOTAL_LOCALES
Definition: Common.h:78
@ LOCALE_ruRU
Definition: Common.h:73
@ LOCALE_frFR
Definition: Common.h:67
@ LOCALE_enUS
Definition: Common.h:65
@ LOCALE_koKR
Definition: Common.h:66
@ LOCALE_esMX
Definition: Common.h:72
constexpr bool IsValidLocale(LocaleConstant locale)
Definition: Common.h:111
CascLocaleBit
Definition: Common.h:85
TC_COMMON_API char const * localeNames[TOTAL_LOCALES]
Definition: Common.cpp:20
unsigned long atoul(char const *str)
Definition: Common.h:38
const uint8 OLD_TOTAL_LOCALES
Definition: Common.h:81
TC_COMMON_API LocaleConstant GetLocaleByName(std::string_view name)
Definition: Common.cpp:36
TimeConstants
Definition: Common.h:44
@ IN_MILLISECONDS
Definition: Common.h:51
@ MINUTE
Definition: Common.h:45
@ HOUR
Definition: Common.h:46
@ DAY
Definition: Common.h:47
@ MONTH
Definition: Common.h:49
@ WEEK
Definition: Common.h:48
@ YEAR
Definition: Common.h:50
AccountTypes
Definition: Common.h:55
@ SEC_PLAYER
Definition: Common.h:56
@ SEC_ADMINISTRATOR
Definition: Common.h:59
@ SEC_GAMEMASTER
Definition: Common.h:58
@ SEC_MODERATOR
Definition: Common.h:57
@ SEC_CONSOLE
Definition: Common.h:60
TC_COMMON_API CascLocaleBit WowLocaleToCascLocaleBit[TOTAL_LOCALES]
Definition: Common.cpp:45
uint8_t uint8
Definition: Define.h:145
#define TC_COMMON_API
Definition: Define.h:100
std::array< char const *, TOTAL_LOCALES > Str
Definition: Common.h:125
constexpr char const * operator[](LocaleConstant locale) const
Definition: Common.h:120