示例#1
0
 void RunPairAfter()
 {
     CrosscrowdInfoMgr.Update(_crowdInfo);
     //将服务状态置为结束
     _status              = EnumLadderStatus.Running;
     _needClearFightDic   = true;
     _clearTimer.Interval = ClearFightdicTime; //启动清除上一轮比赛池计时器
     _clearTimer.Start();
 }
示例#2
0
 void CrowdEnd()
 {
     try
     {
         _crowdInfo.Status = (int)EnumLadderStatus.End;
         CrosscrowdInfoMgr.Update(_crowdInfo);
         _crowdInfo    = null;
         CompetitorDic = new ConcurrentDictionary <Guid, CrosscrowdManagerEntity>();
         //CrossChatHelper.SendBannerCrowdEnd(_domainId);
     }
     catch (Exception ex)
     {
         SystemlogMgr.Error("CrossCrowd-CrowdEnd", ex);
     }
     finally
     {
         _status = EnumLadderStatus.End;
     }
 }
示例#3
0
 public static string AdminSendPrize(int crowdId)
 {
     try
     {
         var crowd = CrosscrowdInfoMgr.GetById(crowdId);
         if (crowd == null)
         {
             return("crowd is null");
         }
         SendMaxKillerPrize(crowd);
         if (crowd.IsSendKillPrize && crowd.IsSendRankPrize)
         {
             return("prize has sended");
         }
         DateTime curTime        = DateTime.Now;
         var      crowdMaxPoint  = CacheFactory.AppsettingCache.GetAppSettingToInt(EnumAppsetting.CrowdMaxPoint);
         int      maxLegendCount = CacheFactory.AppsettingCache.GetAppSettingToInt(EnumAppsetting.CrowdMaxLegendCount);
         if (curTime >= crowd.EndTime)
         {
             ISKillDouble();
             SendKillPrize(crowd, crowdMaxPoint, maxLegendCount);
             SendRankPrize(crowd);
             crowd.Status = (int)EnumLadderStatus.End;
             CrosscrowdInfoMgr.Update(crowd);
             return("success");
         }
         else
         {
             return("the crowd not ending");
         }
     }
     catch (Exception ex)
     {
         SystemlogMgr.Error("AdminSendPrize", ex);
         return("cause exception:" + ex.Message);
     }
 }