TrinityCore
Loading...
Searching...
No Matches
Common.h File Reference
#include "Define.h"
#include <array>
#include <string>
+ Include dependency graph for Common.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STRINGIZE(a)   #a
 
#define DEFAULT_LOCALE   LOCALE_enUS
 
#define MAX_LOCALES   8
 
#define MAX_ACCOUNT_TUTORIAL_VALUES   8
 
#define M_PI   3.14159265358979323846
 
#define M_PI_4   0.785398163397448309616
 
#define MAX_QUERY_LEN   32*1024
 

Enumerations

enum  TimeConstants {
  MINUTE = 60 , HOUR = MINUTE*60 , DAY = HOUR*24 , WEEK = DAY*7 ,
  MONTH = DAY*30 , YEAR = DAY*365 , IN_MILLISECONDS = 1000
}
 
enum  AccountTypes {
  SEC_PLAYER = 0 , SEC_MODERATOR = 1 , SEC_GAMEMASTER = 2 , SEC_ADMINISTRATOR = 3 ,
  SEC_CONSOLE = 4
}
 
enum  LocaleConstant : uint8 {
  LOCALE_enUS = 0 , LOCALE_koKR = 1 , LOCALE_frFR = 2 , LOCALE_deDE = 3 ,
  LOCALE_zhCN = 4 , LOCALE_zhTW = 5 , LOCALE_esES = 6 , LOCALE_esMX = 7 ,
  LOCALE_ruRU = 8 , TOTAL_LOCALES
}
 

Functions

TC_COMMON_API LocaleConstant GetLocaleByName (std::string const &name)
 

Variables

TC_COMMON_API char const * localeNames [TOTAL_LOCALES]
 

Macro Definition Documentation

◆ DEFAULT_LOCALE

#define DEFAULT_LOCALE   LOCALE_enUS

Definition at line 62 of file Common.h.

◆ M_PI

#define M_PI   3.14159265358979323846

Definition at line 72 of file Common.h.

◆ M_PI_4

#define M_PI_4   0.785398163397448309616

Definition at line 76 of file Common.h.

◆ MAX_ACCOUNT_TUTORIAL_VALUES

#define MAX_ACCOUNT_TUTORIAL_VALUES   8

Definition at line 65 of file Common.h.

◆ MAX_LOCALES

#define MAX_LOCALES   8

Definition at line 64 of file Common.h.

◆ MAX_QUERY_LEN

#define MAX_QUERY_LEN   32*1024

Definition at line 79 of file Common.h.

◆ STRINGIZE

#define STRINGIZE (   a)    #a

Definition at line 25 of file Common.h.

Enumeration Type Documentation

◆ AccountTypes

Enumerator
SEC_PLAYER 
SEC_MODERATOR 
SEC_GAMEMASTER 
SEC_ADMINISTRATOR 
SEC_CONSOLE 

Definition at line 38 of file Common.h.

◆ LocaleConstant

Enumerator
LOCALE_enUS 
LOCALE_koKR 
LOCALE_frFR 
LOCALE_deDE 
LOCALE_zhCN 
LOCALE_zhTW 
LOCALE_esES 
LOCALE_esMX 
LOCALE_ruRU 
TOTAL_LOCALES 

Definition at line 47 of file Common.h.

◆ TimeConstants

Enumerator
MINUTE 
HOUR 
DAY 
WEEK 
MONTH 
YEAR 
IN_MILLISECONDS 

Definition at line 27 of file Common.h.

Function Documentation

◆ GetLocaleByName()

TC_COMMON_API LocaleConstant GetLocaleByName ( std::string const &  name)

Definition at line 33 of file Common.cpp.

+ Here is the caller graph for this function:

Variable Documentation

◆ localeNames

TC_COMMON_API char const* localeNames[TOTAL_LOCALES]
extern

Definition at line 20 of file Common.cpp.