public void ThreadProc(object state) { do { Thread.Sleep(1000); }while (!this.Persistence.Initialized); for (;;) { try { DateTime now = TimeUtil.NowDateTime(); Global.UpdateNowTime(now); if (now > this.CheckRoleTimerProcTime) { this.CheckRoleTimerProcTime = now.AddSeconds(1.428); int signUpCnt; int startCnt; this.CheckRoleTimerProc(now, out signUpCnt, out startCnt); ClientAgentManager.Instance().SetGameTypeLoad(this.GameType, signUpCnt, startCnt); } if (now > this.SaveServerStateProcTime) { this.SaveServerStateProcTime = now.AddSeconds(30.0); if (now.Hour >= 3 && now.Hour < 4) { this.ClearRolePairFightCount(); this.Persistence.UpdateTianTiRankData(now, false, false); } } if (now > this.CheckGameFuBenTime) { this.CheckGameFuBenTime = now.AddSeconds(1000.0); this.CheckGameFuBenTimerProc(now); } AsyncDataItem[] asyncEvArray = ZhengBaManagerK.Instance().Update(); ClientAgentManager.Instance().BroadCastAsyncEvent(this.GameType, asyncEvArray); this.Persistence.WriteRoleInfoDataProc(); CoupleArenaService.getInstance().Update(); CoupleWishService.getInstance().Update(); zhengDuoService.Instance().Update(now); BangHuiMatchService.Instance().Update(now); CompService.Instance().Update(now); TianTi5v5Service.ThreadProc(null); Zork5v5Service.Instance().Update(now); int sleepMS = (int)(TimeUtil.NowDateTime() - now).TotalMilliseconds; this.Persistence.SaveCostTime(sleepMS); sleepMS = 1000 - sleepMS; if (sleepMS < 50) { sleepMS = 50; } Thread.Sleep(sleepMS); } catch (Exception ex) { LogManager.WriteExceptionUseCache(ex.ToString()); } } }
public KuaFuCmdData Comp_GetCompRoleData(int roleId, long dataAge) { return(CompService.Instance().GetCompRoleData(roleId, dataAge)); }
public CompSyncData Comp_SyncData(long ageComp, long ageRankJX, long ageRankJXL, long ageRankBD, long ageRankBJF, long ageRankMJF) { return(CompService.Instance().Comp_SyncData(ageComp, ageRankJX, ageRankJXL, ageRankBD, ageRankBJF, ageRankMJF)); }
public int Comp_GameFuBenRoleChangeState(int gameType, int serverId, int cityID, int roleId, int zhiwu, int state) { return(CompService.Instance().GameFuBenRoleChangeState(gameType, serverId, cityID, roleId, zhiwu, state)); }
public KuaFuCmdData Comp_GetKuaFuFuBenData(int gameType, int cityID, long dataAge) { return(CompService.Instance().GetKuaFuFuBenData(gameType, cityID, dataAge)); }
public void Comp_UpdateFuBenMapRoleNum(int gameType, CompFuBenData fubenItem) { CompService.Instance().UpdateFuBenMapRoleNum(gameType, fubenItem); }
public void Comp_UpdateStrongholdData(int cityID, List <CompStrongholdData> shDataList) { CompService.Instance().UpdateStrongholdData(cityID, shDataList); }
public void Comp_SetRoleData4Selector(int roleId, byte[] bytes) { CompService.Instance().SetRoleData4Selector(roleId, bytes); }
public void Comp_UpdateMapRoleNum(int mapCode, int roleNum) { CompService.Instance().UpdateMapRoleNum(mapCode, roleNum); }
public void Comp_BroadCastCompNotice(int serverId, byte[] bytes) { CompService.Instance().BroadCastCompNotice(serverId, bytes); }
public void Comp_CompChat(int serverId, byte[] bytes) { CompService.Instance().CompChat(serverId, bytes); }
public void Comp_SetBulletin(int compType, string bulletin) { CompService.Instance().SetBulletin(compType, bulletin); }
public void Comp_CompOpt(int compType, int optType, int param1, int param2) { CompService.Instance().CompOpt(compType, optType, param1, param2); }
public int Comp_JoinComp_Repair(int roleId, int zoneId, string roleName, int compType, int battleJiFen) { return(CompService.Instance().Comp_JoinComp_Repair(roleId, zoneId, roleName, compType, battleJiFen)); }
public int Comp_JoinComp(int roleId, int zoneId, string roleName, int compType) { return(CompService.Instance().JoinComp(roleId, zoneId, roleName, compType)); }
public void Comp_ChangeName(int roleId, string roleName) { CompService.Instance().ChangeName(roleId, roleName); }