mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 16:08:44 +00:00
Changed: Use "BuildName" from client_default.cfg to determinate last supported patch version by current client under Unix
--HG-- branch : compatibility
This commit is contained in:
parent
607f39561d
commit
2c396827d5
1 changed files with 14 additions and 3 deletions
|
@ -1397,7 +1397,7 @@ void CPatchManager::downloadFileWithCurl (const string &source, const string &de
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
|
|
||||||
CurrentFile = "";
|
CurrentFile.clear();
|
||||||
|
|
||||||
if (diskFull)
|
if (diskFull)
|
||||||
{
|
{
|
||||||
|
@ -2346,6 +2346,7 @@ void CCheckThread::run ()
|
||||||
uint32 i, j, k;
|
uint32 i, j, k;
|
||||||
// Check if the client version is the same as the server version
|
// Check if the client version is the same as the server version
|
||||||
string sClientVersion = pPM->getClientVersion();
|
string sClientVersion = pPM->getClientVersion();
|
||||||
|
string sClientNewVersion = ClientCfg.BuildName;
|
||||||
string sServerVersion = pPM->getServerVersion();
|
string sServerVersion = pPM->getServerVersion();
|
||||||
ucstring sTranslate = CI18N::get("uiClientVersion") + " (" + sClientVersion + ") ";
|
ucstring sTranslate = CI18N::get("uiClientVersion") + " (" + sClientVersion + ") ";
|
||||||
sTranslate += CI18N::get("uiServerVersion") + " (" + sServerVersion + ")";
|
sTranslate += CI18N::get("uiServerVersion") + " (" + sServerVersion + ")";
|
||||||
|
@ -2359,10 +2360,20 @@ void CCheckThread::run ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sint32 nServerVersion;
|
sint32 nServerVersion, nClientVersion, nClientNewVersion;
|
||||||
fromString(sServerVersion, nServerVersion);
|
fromString(sServerVersion, nServerVersion);
|
||||||
|
fromString(sClientVersion, nClientVersion);
|
||||||
|
fromString(sClientNewVersion, nClientNewVersion);
|
||||||
|
|
||||||
if (sClientVersion != sServerVersion)
|
#ifdef NL_OS_UNIX
|
||||||
|
// servers files are not compatible with current client, use last client version
|
||||||
|
if (nClientNewVersion && nServerVersion > nClientNewVersion)
|
||||||
|
{
|
||||||
|
nServerVersion = nClientNewVersion;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (nClientVersion != nServerVersion)
|
||||||
{
|
{
|
||||||
// first, try in the version subdirectory
|
// first, try in the version subdirectory
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in a new issue