From c9caa698057b8789627a7fbad7d422a108cb8077 Mon Sep 17 00:00:00 2001 From: Bluzume <39113159+KuromeSan@users.noreply.github.com> Date: Tue, 26 Oct 2021 17:28:48 -0400 Subject: [PATCH] Fix crashing on GetWinners of WaterBaloonGame. --- .../HorseIsleServer/Game/Events/WaterBalloonGame.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/HorseIsleServer/HorseIsleServer/Game/Events/WaterBalloonGame.cs b/HorseIsleServer/HorseIsleServer/Game/Events/WaterBalloonGame.cs index 1c6e73d..7577ba6 100644 --- a/HorseIsleServer/HorseIsleServer/Game/Events/WaterBalloonGame.cs +++ b/HorseIsleServer/HorseIsleServer/Game/Events/WaterBalloonGame.cs @@ -15,12 +15,18 @@ namespace HISP.Game.Events Active = false; } - private List thrownWaterBalloonMemory; - public ThrownCounter[] ThrownWaterBalloonMemory; public bool Active; private Timer gameTimeout; private const int WATER_BALLOON_GAME_TIMEOUT = 5; + public ThrownCounter[] ThrownWaterBalloonMemory + { + get + { + return thrownWaterBalloonMemory.ToArray(); + } + } + public class ThrownCounter { public ThrownCounter(WaterBalloonGame game, User userHit, int numThrown)