示例#1
0
 private void GetBoCai(GameClient client, int nID, string[] cmdParams, ref GetBoCaiResult mgsData)
 {
     try
     {
         int BocaiType = Convert.ToInt32(cmdParams[1]);
         mgsData.Info      = 0;
         mgsData.BocaiType = BocaiType;
         if (2 == BocaiType)
         {
             FunctionSendManager.GetInstance().AddFunction(FunctionType.CaiShuZi, client.ClientData.RoleID);
             BoCaiCaiShuZi.GetInstance().OpenGetBoCai(client.ClientData.RoleID, ref mgsData);
         }
         else if (1 == BocaiType)
         {
             FunctionSendManager.GetInstance().AddFunction(FunctionType.CaiDaXiao, client.ClientData.RoleID);
             BoCaiCaiDaXiao.GetInstance().OpenGetBoCai(client.ClientData.RoleID, ref mgsData);
         }
         else
         {
             mgsData.Info = 1;
         }
     }
     catch (Exception ex)
     {
         mgsData.Info = 100;
         LogManager.WriteLog(LogTypes.Exception, string.Format("[ljl_博彩]{0}", ex.ToString()), null, true);
     }
 }
示例#2
0
 public void UpdateBoCai()
 {
     try
     {
         lock (this.mutex)
         {
             BoCaiUpdate data = new BoCaiUpdate();
             data.BocaiType   = this.BoCaiType;
             data.Value1      = this.ServerOpenData.AllBalance.ToString();
             data.DataPeriods = this.ServerOpenData.DataPeriods;
             data.Stage       = this.StageData.Stage;
             if (this.StageData.isOpenDay)
             {
                 data.OpenTime = TimeUtil.GetDiffTimeSeconds(this.ServerData.GetStageDataTime.AddMilliseconds((double)this.StageData.OpenTime), TimeUtil.NowDateTime(), true);
             }
             else
             {
                 data.OpenTime = TimeUtil.GetDiffTimeSeconds(this.ServerData.GetStageDataTime.AddSeconds((double)this.StageData.OpenTime), TimeUtil.NowDateTime(), true);
             }
             FunctionSendManager.GetInstance().SendMsg <BoCaiUpdate>(FunctionType.CaiShuZi, 2084, data);
         }
     }
     catch (Exception ex)
     {
         LogManager.WriteLog(LogTypes.Exception, string.Format("[ljl_caidaxiao_猜数字]{0}", ex.ToString()), null, true);
     }
 }