Пример #1
0
        private static void LoadData(GameActive gameActive)
        {
            if ((gameActive.CombatStatus == CombatStatus.Wait || gameActive.CombatStatus == CombatStatus.Combat) && !gameActive.LoadSuccess)
            {
                if (!string.IsNullOrEmpty(gameActive.Broadcast))
                {
                    var broadcastService = new TjxBroadcastService(null);
                    var msg = broadcastService.Create(NoticeType.Game, gameActive.Broadcast);

                    if (gameActive.ActiveId == 11)
                    {
                        int    invertal  = (int)new TimeSpan(0, 0, gameActive.WaitMinutes, 0).TotalSeconds / 5;
                        string startTime = DateTime.Now.ToString("HH:mm:ss");
                        string endTime   = DateTime.Now.AddMinutes(gameActive.WaitMinutes).ToString("HH:mm:ss");
                        broadcastService.SendTimer(msg, startTime, endTime, true, invertal);//秒
                    }
                    else
                    {
                        broadcastService.Send(msg);
                    }
                }
                gameActive.LoadSuccess = true;
                if (gameActive.ActiveType == FunctionEnum.Booszhang)
                {
                    BossCombat.InitBoss(gameActive);
                }
                else if (gameActive.ActiveType == FunctionEnum.Lintuzhang)
                {
                    CountryCombat.Init(gameActive);
                }
                else if (gameActive.ActiveType == FunctionEnum.Multiplot)
                {
                    PlotTeamCombat.Init(gameActive);
                }
                else if (gameActive.ActiveType == FunctionEnum.MorePlotCoin)
                {
                    PlotTeamCombat.Init(gameActive);
                }
                else if (gameActive.ActiveType == FunctionEnum.MorePlotEnergy)
                {
                    PlotTeamCombat.Init(gameActive);
                }
            }
        }