forked from metin2/client
Added configuration utility, consolidated language config
This commit is contained in:
@ -18,11 +18,10 @@ const char* LSS_GLOBAL = "GLOBAL";
|
||||
|
||||
static bool IS_CHEONMA = false;
|
||||
|
||||
char MULTI_LOCALE_SERVICE[256] = "YMIR";
|
||||
char MULTI_LOCALE_PATH[256] = "locale/ymir";
|
||||
char MULTI_LOCALE_NAME[256] = "ymir";
|
||||
int MULTI_LOCALE_CODE = 949;
|
||||
int MULTI_LOCALE_REPORT_PORT = 10000;
|
||||
char MULTI_LOCALE_SERVICE[256] = "EUROPE";
|
||||
char MULTI_LOCALE_PATH[256] = "locale/en";
|
||||
char MULTI_LOCALE_NAME[256] = "en";
|
||||
int MULTI_LOCALE_CODE = 1252;
|
||||
|
||||
void LocaleService_LoadConfig(const char* fileName)
|
||||
{
|
||||
@ -34,13 +33,11 @@ void LocaleService_LoadConfig(const char* fileName)
|
||||
char line[256];
|
||||
char name[256];
|
||||
int code;
|
||||
int id;
|
||||
if (fgets(line, sizeof(line)-1, fp))
|
||||
{
|
||||
line[sizeof(line)-1] = '\0';
|
||||
sscanf(line, "%d %d %s", &id, &code, name);
|
||||
sscanf(line, "%d %s", &code, name);
|
||||
|
||||
MULTI_LOCALE_REPORT_PORT = id;
|
||||
MULTI_LOCALE_CODE = code;
|
||||
strcpy(MULTI_LOCALE_NAME, name);
|
||||
sprintf(MULTI_LOCALE_PATH, "locale/%s", MULTI_LOCALE_NAME);
|
||||
|
Reference in New Issue
Block a user