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.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; } }); } }
public static void GenerateEvent(EventType type) { if (!ServerManager.Instance.StartedEvents.Contains(type)) { Task.Factory.StartNew(() => { ServerManager.Instance.StartedEvents.Add(type); switch (type) { case EventType.RankingRefresh: ServerManager.Instance.RefreshRanking(); ServerManager.Instance.StartedEvents.Remove(EventType.RankingRefresh); break; case EventType.LOD: Lod.GenerateLod(); break; case EventType.MinilandRefresh: MinilandRefresh.GenerateMinilandEvent(); break; case EventType.InstantBattle: InstantBattle.GenerateInstantBattle(); break; case EventType.LODDH: Lod.GenerateLod(35); break; case EventType.MeteoriteGame: MeteoriteGame.GenerateMeteoriteGame(); break; case EventType.Act4Ship: Act4Ship.GenerateAct4Ship(1); Act4Ship.GenerateAct4Ship(2); break; case EventType.TalentArena: TalentArena.Run(); break; case EventType.Caligor: CaligorRaid.Run(); break; } }); } }