//thu tu request thong thuong: //requestcode --> requestempireoverview //test //requestcode --> requestempireoverview --> requestDEBUG public int requestCode() { //debug DBnRequestClient++; //server down !!! if (bStopAutoRequest) { DEBUG("server down !!!"); return(-1); } int iCode = 0; if (Gloval.bEmpireOverviewIsNewData) { iCode |= 1; } if (Gloval.bBuildingsOverviewIsNewData) { iCode |= 2; } if (Gloval.bTroopsOverviewIsNewData) { iCode |= 4; } DEBUG("request server: " + DBnRequestServer.ToString() + " client request: " + DBnRequestClient.ToString() + " result: " + iCode.ToString()); return(iCode); }
//thu tu request thong thuong: //requestcode --> requestempireoverview //test //requestcode --> requestempireoverview --> requestDEBUG public int requestCode() { //debug DBnRequestClient++; if (bLoadingData) { DEBUG("loading data !!!"); Debug.Logging("loading data !!!"); return(-1); } //server down !!! if (bStopAutoRequest) { DEBUG("server down !!!"); Debug.Logging("request server: " + DBnRequestServer.ToString() + " client request: " + DBnRequestClient.ToString() + " result: -1"); return(-2); } int iCode = 0; if (Gloval.bEmpireOverviewIsNewData) { iCode |= 1; } if (Gloval.bBuildingsOverviewIsNewData) { iCode |= 2; } if (Gloval.bTroopsOverviewIsNewData) { iCode |= 4; } if (Gloval.bResearchOverviewIsNewData) { iCode |= 8; } if (Gloval.bDiplomatOverviewIsNewData) { iCode |= 16; } if (Gloval.bEventOverviewIsNewData) { iCode |= 32; } DEBUG("request server: " + DBnRequestServer.ToString() + " client request: " + DBnRequestClient.ToString() + " result: " + iCode.ToString()); Debug.Logging("request server: " + DBnRequestServer.ToString() + " client request: " + DBnRequestClient.ToString() + " result: " + iCode.ToString()); return(iCode); }