Removed unused locale information, refactored where needed. Enabled DS system.

This commit is contained in:
2024-03-10 10:37:36 +02:00
parent e1cf8cde92
commit c9aa9a0b03
22 changed files with 70 additions and 288 deletions

View File

@ -18,12 +18,6 @@ const char* LSS_GLOBAL = "GLOBAL";
static bool IS_CHEONMA = false;
#ifndef LSS_SECURITY_KEY
#define LSS_SECURITY_KEY "testtesttesttest"
#endif
std::string __SECURITY_KEY_STRING__ = LSS_SECURITY_KEY;
char MULTI_LOCALE_SERVICE[256] = "YMIR";
char MULTI_LOCALE_PATH[256] = "locale/ymir";
char MULTI_LOCALE_NAME[256] = "ymir";
@ -165,11 +159,6 @@ int LocaleService_GetSkillPower(unsigned level)
return INTERNATIONAL_SKILL_POWERS[level];
}
const char* LocaleService_GetSecurityKey()
{
return __SECURITY_KEY_STRING__.c_str();
}
// CHEONMA
void LocaleService_SetCHEONMA(bool isEnable)
{
@ -243,12 +232,6 @@ void LocaleService_ForceSetLocale(const char* name, const char* localePath)
{
strcpy(MULTI_LOCALE_NAME, name);
strcpy(MULTI_LOCALE_PATH, localePath);
// <20><><EFBFBD><EFBFBD> õ<><C3B5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ӽÿ<D3BD><C3BF><EFBFBD> security key <20><><EFBFBD><EFBFBD> (WE <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD> õ<><C3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD>)
if (0 == stricmp(name, "ymir"))
__SECURITY_KEY_STRING__ = "testtesttesttest";
if (0 == stricmp(name, "we_korea"))
__SECURITY_KEY_STRING__ = "1234abcd5678efgh";
}
#if defined(LOCALE_SERVICE_GLOBAL)
@ -257,36 +240,35 @@ struct SLOCALEDATA
const char* szServiceName;
const char* szLocaleName;
WORD wCodePage;
const char* szSecurityKey;
} gs_stLocaleData[] = {
{ LSS_YMIR, "ymir", 949, "testtesttesttest" }, // Korea
{ LSS_EUROPE, "de", 1252, "1234abcd5678efgh" }, // GameForge (Germany)
{ LSS_EUROPE, "en", 1252, "1234abcd5678efgh" }, // GameForge (United Kingdom)
{ LSS_EUROPE, "us", 1252, "1234abcd5678efgh" }, // GameForge (USA)
{ LSS_EUROPE, "es", 1252, "1234abcd5678efgh" }, // GameForge (Spain)
{ LSS_EUROPE, "it", 1252, "1234abcd5678efgh" }, // GameForge (Italy)
{ LSS_EUROPE, "fr", 1252, "1234abcd5678efgh" }, // GameForge (France)
{ LSS_EUROPE, "pt", 1252, "1234abcd5678efgh" }, // GameForge (Portugal)
{ LSS_EUROPE, "tr", 1253, "1234abcd5678efgh" }, // GameForge (Greece)
{ LSS_EUROPE, "pl", 1250, "1234abcd5678efgh" }, // GameForge (Poland)
{ LSS_EUROPE, "tr", 1254, "1234abcd5678efgh" }, // GameForge (Turkey)
{ LSS_EUROPE, "dk", 1252, "1234abcd5678efgh" }, // GameForge (Demmark)
{ LSS_EUROPE, "ae", 1256, "1234abcd5678efgh" }, // GameForge (United Arab Emirate)
{ LSS_EUROPE, "mx", 1252, "1234abcd5678efgh" }, // GameForge (Mexico)
{ LSS_EUROPE, "nl", 1252, "1234abcd5678efgh" }, // GameForge (Netherlands)
{ LSS_EUROPE, "cz", 1252, "1234abcd5678efgh" }, // GameForge (Czech Republic)
{ LSS_EUROPE, "ru", 1251, "1234abcd5678efgh" }, // GameForge (Russian Federation)
{ LSS_EUROPE, "hu", 1250, "1234abcd5678efgh" }, // GameForge (Hungary)
{ LSS_EUROPE, "ro", 1250, "1234abcd5678efgh" }, // GameForge (Romania)
{ LSS_EUROPE, "ca", 1252, "testtesttesttest" }, // Z8Games (Canada)
{ LSS_EUROPE, "sg", 1252, "testtesttesttest" }, // TEC (Singapore)
{ LSS_JAPAN, "japan", 932, "testtesttesttest" }, // Japan
{ LSS_EUROPE, "br", 1252, "testtesttesttest" }, // OnGame (Brazil)
{ LSS_HONGKONG, "hongkong", 950, "testtesttesttest" }, // HongKong & Taiwan
{ LSS_NEWCIBN, "newcibn", 936, "testtesttesttest" }, // CIBN (Free world)
{ LSS_ENGLISH, "english", 949, "testtesttesttest" }, // English (Obsoleted)
{ LSS_YMIR, "kr", 949, "testtesttesttest" }, // Korea (Obsoleted)
{ NULL, NULL, 0, "testtesttesttest" }
{ LSS_YMIR, "ymir", 949 }, // Korea
{ LSS_EUROPE, "de", 1252 }, // GameForge (Germany)
{ LSS_EUROPE, "en", 1252 }, // GameForge (United Kingdom)
{ LSS_EUROPE, "us", 1252 }, // GameForge (USA)
{ LSS_EUROPE, "es", 1252 }, // GameForge (Spain)
{ LSS_EUROPE, "it", 1252 }, // GameForge (Italy)
{ LSS_EUROPE, "fr", 1252 }, // GameForge (France)
{ LSS_EUROPE, "pt", 1252 }, // GameForge (Portugal)
{ LSS_EUROPE, "tr", 1253 }, // GameForge (Greece)
{ LSS_EUROPE, "pl", 1250 }, // GameForge (Poland)
{ LSS_EUROPE, "tr", 1254 }, // GameForge (Turkey)
{ LSS_EUROPE, "dk", 1252 }, // GameForge (Demmark)
{ LSS_EUROPE, "ae", 1256 }, // GameForge (United Arab Emirate)
{ LSS_EUROPE, "mx", 1252 }, // GameForge (Mexico)
{ LSS_EUROPE, "nl", 1252 }, // GameForge (Netherlands)
{ LSS_EUROPE, "cz", 1252 }, // GameForge (Czech Republic)
{ LSS_EUROPE, "ru", 1251 }, // GameForge (Russian Federation)
{ LSS_EUROPE, "hu", 1250 }, // GameForge (Hungary)
{ LSS_EUROPE, "ro", 1250 }, // GameForge (Romania)
{ LSS_EUROPE, "ca", 1252 }, // Z8Games (Canada)
{ LSS_EUROPE, "sg", 1252 }, // TEC (Singapore)
{ LSS_JAPAN, "japan", 932 }, // Japan
{ LSS_EUROPE, "br", 1252 }, // OnGame (Brazil)
{ LSS_HONGKONG, "hongkong", 950 }, // HongKong & Taiwan
{ LSS_NEWCIBN, "newcibn", 936 }, // CIBN (Free world)
{ LSS_ENGLISH, "english", 949 }, // English (Obsoleted)
{ LSS_YMIR, "kr", 949 }, // Korea (Obsoleted)
{ NULL, NULL, 0 }
};
const char* LocaleService_GetName()
@ -379,8 +361,6 @@ bool LocaleService_LoadGlobal(HINSTANCE hInstance)
strcpy(MULTI_LOCALE_NAME, gs_stLocaleData[gs_iLocale].szLocaleName);
sprintf(MULTI_LOCALE_PATH, "locale/%s", gs_stLocaleData[gs_iLocale].szLocaleName);
MULTI_LOCALE_CODE = gs_stLocaleData[gs_iLocale].wCodePage;
if(gs_stLocaleData[gs_iLocale].szSecurityKey)
__SECURITY_KEY_STRING__ = gs_stLocaleData[gs_iLocale].szSecurityKey;
return true;
}
#else