forked from metin2/server
reduce LC_InitLocalization logic, purge LC_Is* definitions
This commit is contained in:
parent
12b6abf373
commit
dbcabd7fa9
|
@ -487,76 +487,8 @@ const std::string& LocaleService_GetQuestPath()
|
|||
bool LC_InitLocalization( const std::string& szLocal )
|
||||
{
|
||||
g_stLocal = szLocal;
|
||||
|
||||
if ( !g_stLocal.compare("ymir") )
|
||||
g_eLocalType = LC_YMIR;
|
||||
else if ( !g_stLocal.compare("japan") )
|
||||
g_eLocalType = LC_JAPAN;
|
||||
else if ( !g_stLocal.compare("english") )
|
||||
g_eLocalType = LC_ENGLISH;
|
||||
else if ( !g_stLocal.compare("hongkong") )
|
||||
g_eLocalType = LC_HONGKONG;
|
||||
else if (!g_stLocal.compare("newcibn") )
|
||||
g_eLocalType = LC_NEWCIBN;
|
||||
else if ( !g_stLocal.compare("germany") )
|
||||
g_eLocalType = LC_GERMANY;
|
||||
else if ( !g_stLocal.compare("korea") )
|
||||
g_eLocalType = LC_KOREA;
|
||||
else if ( !g_stLocal.compare("france") )
|
||||
g_eLocalType = LC_FRANCE;
|
||||
else if ( !g_stLocal.compare("italy") )
|
||||
g_eLocalType = LC_ITALY;
|
||||
else if ( !g_stLocal.compare("spain") )
|
||||
g_eLocalType = LC_SPAIN;
|
||||
else if ( !g_stLocal.compare("greek") )
|
||||
g_eLocalType = LC_GREEK;
|
||||
else if ( !g_stLocal.compare("uk") )
|
||||
g_eLocalType = LC_UK;
|
||||
else if ( !g_stLocal.compare("turkey") )
|
||||
g_eLocalType = LC_TURKEY;
|
||||
else if ( !g_stLocal.compare("poland") )
|
||||
g_eLocalType = LC_POLAND;
|
||||
else if ( !g_stLocal.compare("portugal") )
|
||||
g_eLocalType = LC_PORTUGAL;
|
||||
else if ( !g_stLocal.compare("canada") )
|
||||
g_eLocalType = LC_CANADA;
|
||||
else if ( !g_stLocal.compare("brazil") )
|
||||
g_eLocalType = LC_BRAZIL;
|
||||
else if ( !g_stLocal.compare("russia") )
|
||||
g_eLocalType = LC_RUSSIA;
|
||||
else if ( !g_stLocal.compare("denmark") )
|
||||
g_eLocalType = LC_DENMARK;
|
||||
else if ( !g_stLocal.compare("bulgaria") )
|
||||
g_eLocalType = LC_BULGARIA;
|
||||
else if ( !g_stLocal.compare("croatia") )
|
||||
g_eLocalType = LC_CROATIA;
|
||||
else if ( !g_stLocal.compare("mexico") )
|
||||
g_eLocalType = LC_MEXICO;
|
||||
else if ( !g_stLocal.compare("arabia") )
|
||||
g_eLocalType = LC_ARABIA;
|
||||
else if ( !g_stLocal.compare("czech") )
|
||||
g_eLocalType = LC_CZECH;
|
||||
else if ( !g_stLocal.compare("romania") )
|
||||
g_eLocalType = LC_ROMANIA;
|
||||
else if ( !g_stLocal.compare("hungary") )
|
||||
g_eLocalType = LC_HUNGARY;
|
||||
else if ( !g_stLocal.compare("netherlands") )
|
||||
g_eLocalType = LC_NETHERLANDS;
|
||||
else if ( !g_stLocal.compare("singapore") )
|
||||
g_eLocalType = LC_SINGAPORE;
|
||||
else if ( !g_stLocal.compare("vietnam") )
|
||||
g_eLocalType = LC_VIETNAM;
|
||||
else if ( !g_stLocal.compare("thailand") )
|
||||
g_eLocalType = LC_THAILAND;
|
||||
else if ( !g_stLocal.compare("usa") )
|
||||
g_eLocalType = LC_USA;
|
||||
else if ( !g_stLocal.compare("we_korea") ) // ver.WorldEdition for korea
|
||||
g_eLocalType = LC_WE_KOREA;
|
||||
else if ( !g_stLocal.compare("taiwan") )
|
||||
g_eLocalType = LC_TAIWAN;
|
||||
else
|
||||
return false;
|
||||
|
||||
g_eLocalType = LC_ENGLISH;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -570,61 +502,3 @@ bool LC_IsLocale( const eLocalization t )
|
|||
return LC_GetLocalType() == t ? true : false;
|
||||
}
|
||||
|
||||
bool LC_IsYMIR() { return LC_GetLocalType() == LC_YMIR ? true : false; }
|
||||
bool LC_IsJapan() { return LC_GetLocalType() == LC_JAPAN ? true : false; }
|
||||
bool LC_IsEnglish() { return LC_GetLocalType() == LC_ENGLISH ? true : false; }
|
||||
bool LC_IsHongKong() { return LC_GetLocalType() == LC_HONGKONG ? true : false; }
|
||||
bool LC_IsNewCIBN() { return LC_GetLocalType() == LC_NEWCIBN ? true : false; }
|
||||
bool LC_IsGermany() { return LC_GetLocalType() == LC_GERMANY ? true : false; }
|
||||
bool LC_IsKorea() { return LC_GetLocalType() == LC_KOREA ? true : false; }
|
||||
bool LC_IsCanada() { return LC_GetLocalType() == LC_CANADA ? false : false; }
|
||||
bool LC_IsBrazil() { return LC_GetLocalType() == LC_BRAZIL ? true : false; }
|
||||
bool LC_IsSingapore() { return LC_GetLocalType() == LC_SINGAPORE ? true : false; }
|
||||
bool LC_IsVietnam() { return LC_GetLocalType() == LC_VIETNAM ? true : false; }
|
||||
bool LC_IsThailand() { return LC_GetLocalType() == LC_THAILAND ? true : false; }
|
||||
bool LC_IsWE_Korea() { return LC_GetLocalType() == LC_WE_KOREA ? true : false; }
|
||||
bool LC_IsTaiwan() { return LC_GetLocalType() == LC_TAIWAN ? true : false; }
|
||||
|
||||
bool LC_IsWorldEdition()
|
||||
{
|
||||
return LC_IsWE_Korea() || LC_IsEurope();
|
||||
}
|
||||
|
||||
bool LC_IsEurope()
|
||||
{
|
||||
eLocalization val = LC_GetLocalType();
|
||||
|
||||
switch ((int) val)
|
||||
{
|
||||
case LC_ENGLISH:
|
||||
case LC_GERMANY:
|
||||
case LC_FRANCE:
|
||||
case LC_ITALY:
|
||||
case LC_TURKEY:
|
||||
case LC_POLAND:
|
||||
case LC_UK:
|
||||
case LC_SPAIN:
|
||||
case LC_PORTUGAL:
|
||||
case LC_GREEK:
|
||||
case LC_RUSSIA:
|
||||
case LC_DENMARK:
|
||||
case LC_BULGARIA:
|
||||
case LC_CROATIA:
|
||||
case LC_MEXICO: // 남미지만 GF에서 서비스 하므로 여기 넣음
|
||||
case LC_ARABIA: // 중동이지만 GF에서 서비스 하므로 여기 넣음
|
||||
case LC_CZECH:
|
||||
case LC_ROMANIA:
|
||||
case LC_HUNGARY:
|
||||
case LC_NETHERLANDS:
|
||||
case LC_USA:
|
||||
case LC_WE_KOREA: // 한국이지만 UK 버전 기반이므로 여기 넣음
|
||||
case LC_TAIWAN: // 대만이지만 WE_KOREA 버전 기반이므로 여기 넣음
|
||||
case LC_JAPAN: // 일본이지만 WE(World Edition -_-) 버전이므로 여기 넣음
|
||||
case LC_NEWCIBN:
|
||||
case LC_CANADA: // 캐나다 GF에서 서비스 시작
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue