Example #1
0
 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());
         }
     }
 }
Example #2
0
 public KuaFuCmdData Comp_GetCompRoleData(int roleId, long dataAge)
 {
     return(CompService.Instance().GetCompRoleData(roleId, dataAge));
 }
Example #3
0
 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));
 }
Example #4
0
 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));
 }
Example #5
0
 public KuaFuCmdData Comp_GetKuaFuFuBenData(int gameType, int cityID, long dataAge)
 {
     return(CompService.Instance().GetKuaFuFuBenData(gameType, cityID, dataAge));
 }
Example #6
0
 public void Comp_UpdateFuBenMapRoleNum(int gameType, CompFuBenData fubenItem)
 {
     CompService.Instance().UpdateFuBenMapRoleNum(gameType, fubenItem);
 }
Example #7
0
 public void Comp_UpdateStrongholdData(int cityID, List <CompStrongholdData> shDataList)
 {
     CompService.Instance().UpdateStrongholdData(cityID, shDataList);
 }
Example #8
0
 public void Comp_SetRoleData4Selector(int roleId, byte[] bytes)
 {
     CompService.Instance().SetRoleData4Selector(roleId, bytes);
 }
Example #9
0
 public void Comp_UpdateMapRoleNum(int mapCode, int roleNum)
 {
     CompService.Instance().UpdateMapRoleNum(mapCode, roleNum);
 }
Example #10
0
 public void Comp_BroadCastCompNotice(int serverId, byte[] bytes)
 {
     CompService.Instance().BroadCastCompNotice(serverId, bytes);
 }
Example #11
0
 public void Comp_CompChat(int serverId, byte[] bytes)
 {
     CompService.Instance().CompChat(serverId, bytes);
 }
Example #12
0
 public void Comp_SetBulletin(int compType, string bulletin)
 {
     CompService.Instance().SetBulletin(compType, bulletin);
 }
Example #13
0
 public void Comp_CompOpt(int compType, int optType, int param1, int param2)
 {
     CompService.Instance().CompOpt(compType, optType, param1, param2);
 }
Example #14
0
 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));
 }
Example #15
0
 public int Comp_JoinComp(int roleId, int zoneId, string roleName, int compType)
 {
     return(CompService.Instance().JoinComp(roleId, zoneId, roleName, compType));
 }
Example #16
0
 public void Comp_ChangeName(int roleId, string roleName)
 {
     CompService.Instance().ChangeName(roleId, roleName);
 }