Пример #1
0
        public void GenerateEvent(EventType type, bool useTimer = true)
        {
            if (!ServerManager.Instance.StartedEvents.Contains(type))
            {
                Task.Factory.StartNew(() =>
                {
                    ServerManager.Instance.StartedEvents.Add(type);
                    switch (type)
                    {
                    case EventType.RANKINGREFRESH:
                        ServerManager.Instance.RefreshRanking();
                        break;

                    case EventType.LOD:
                        LOD.GenerateLod();
                        break;

                    case EventType.MINILANDREFRESHEVENT:
                        MinilandRefresh.GenerateMinilandEvent();
                        break;

                    case EventType.INSTANTBATTLE:
                        InstantBattle.GenerateInstantBattle(useTimer);
                        break;

                    case EventType.TALENTARENA:
                        ArenaEvent.GenerateTalentArena();
                        break;

                    case EventType.LODDH:
                        LOD.GenerateLod(35);
                        break;

                    case EventType.ICEBREAKER:
                        IceBreaker.GenerateIceBreaker(useTimer);
                        break;
                    }
                });
            }
        }
Пример #2
0
        public void GenerateEvent(EventType type, bool useTimer = true)
        {
            if (!ServerManager.Instance.StartedEvents.Contains(type))
            {
                Task.Factory.StartNew(async() =>
                {
                    ServerManager.Instance.StartedEvents.Add(type);
                    switch (type)
                    {
                    case EventType.RANKINGREFRESH:
                        ServerManager.Instance.RefreshRanking();
                        break;

                    case EventType.LOD:
                        Lod.GenerateLod();
                        break;

                    case EventType.MINILANDREFRESHEVENT:
                        MinilandRefresh.GenerateMinilandEvent();
                        break;

                    case EventType.INSTANTBATTLE:
                        InstantBattle.GenerateInstantBattle(useTimer);
                        break;

                    case EventType.TALENTARENA:
                        ArenaEvent.GenerateTalentArena();
                        break;

                    case EventType.LODDH:
                        Lod.GenerateLod(35);
                        break;

                    case EventType.METEORITEGAME:
                        MeteoriteGame.GenerateMeteoriteGame();
                        break;

                    case EventType.SHEEPGAME:
                        SheepGame.GenerateSheepGames();
                        break;

                    case EventType.ICEBREAKER:
                        IceBreaker.GenerateIceBreaker(useTimer);
                        break;

                    case EventType.BATTLEROYAL:
                        //BattleRoyaleManager.Instance.Prepare(useTimer);
                        break;

                    case EventType.CALIGOR:
                        await Caligor.GenerateCaligor();
                        break;

                    case EventType.ACT4SHIP:
                        Act4Ship.GenerateAct4Ship(FactionType.Angel);
                        Act4Ship.GenerateAct4Ship(FactionType.Demon);
                        break;
                    }
                });
            }
        }