Reenable updating from server to test server patching.

Cherry-Picked from BThallids commit aba621b7359df5e73b42b0dcb3be3afeb9b802b3
This commit is contained in:
BThallid 2010-07-13 22:25:27 -05:00 committed by shlainn
parent a015f3c897
commit a1280a9647

View File

@ -545,11 +545,17 @@ void RealmSession::_HandleLogonProof(ByteBuffer& pkt)
// handle error codes // handle error codes
switch(error) switch(error)
{ {
case REALM_AUTH_WRONG_BUILD_NUMBER:
log("Wrong or invalid build version.");
if(gui)
gui->SetSceneData(ISCENE_LOGIN_CONN_STATUS,DSCENE_LOGIN_WRONG_VERSION);
DieOrReconnect(true);
return;
case REALM_AUTH_UPDATE_CLIENT: case REALM_AUTH_UPDATE_CLIENT:
log("The realm server requested client update."); log("The realm server requested client update.");
if(gui) if(gui)
gui->SetSceneData(ISCENE_LOGIN_CONN_STATUS,DSCENE_LOGIN_WRONG_VERSION); gui->SetSceneData(ISCENE_LOGIN_CONN_STATUS,DSCENE_LOGIN_WRONG_VERSION);
DieOrReconnect(true);
return; return;
case REALM_AUTH_NO_MATCH: case REALM_AUTH_NO_MATCH:
@ -685,7 +691,7 @@ void RealmSession::_HandleTransferData(ByteBuffer& pkt)
{ {
std::fstream fh; std::fstream fh;
char namebuf[100]; char namebuf[100];
sprintf(namebuf,"%u_%s.mpq",GetInstance()->GetConf()->clientbuild,GetInstance()->GetConf()->clientlang.c_str()); sprintf(namebuf,"%u%s.mpq",GetInstance()->GetConf()->clientbuild,GetInstance()->GetConf()->clientlang.c_str());
fh.open(namebuf,std::ios_base::out | std::ios_base::binary); fh.open(namebuf,std::ios_base::out | std::ios_base::binary);
if(fh.is_open()) if(fh.is_open())
{ {