public override string ToString() { int i = 0; var sb = new StringBuilder(); sb.AppendLine("Round Results:"); Winners.ForEach(winner => { i++; sb.AppendLine("Game " + i + " - winner: " + winner.ToString()); }); return(sb.ToString()); }
public override void Stop() { Program.MainForm.LogDebug("Stopping." + Environment.StackTrace); End?.Stop(); End = null; List <Character> Winners; List <Character> Losers; if (SnowballMap.GetWinner() == SnowballEventState.MAPLE_WIN) { Winners = MapleTeam.ToList(); Losers = StoryTeam.ToList(); } else { Winners = StoryTeam.ToList(); Losers = MapleTeam.ToList(); } _log.Info("Total players: " + (Winners.Count + Losers.Count)); _log.Info("Winners: " + string.Join(", ", Winners.Select(x => x.Name))); _log.Info("Losers: " + string.Join(", ", Losers.Select(x => x.Name))); Winners.ForEach(c => { MapPacket.MapEffect(c, 4, "Coconut/Victory", true); MapPacket.MapEffect(c, 3, "event/coconut/victory", true); }); Losers.ForEach(c => { MapPacket.MapEffect(c, 4, "Coconut/Failed", true); MapPacket.MapEffect(c, 3, "event/coconut/lose", true); }); RepeatingAction.Start("snowball warper", e => { Winners.ForEach(c => c.ChangeMap(WinMapId)); Losers.ForEach(c => c.ChangeMap(LoseMapId)); SnowballMap.TimerEndTime = MasterThread.CurrentTime; MapleTeam.Clear(); StoryTeam.Clear(); SnowballMap.Reset(); base.Stop(); }, 10 * 1000, 0); }