diff --git a/Mage.Common/src/mage/view/MatchView.java b/Mage.Common/src/mage/view/MatchView.java index e1240a83e2..d7d31ad2b1 100644 --- a/Mage.Common/src/mage/view/MatchView.java +++ b/Mage.Common/src/mage/view/MatchView.java @@ -69,9 +69,9 @@ public class MatchView implements Serializable { for (MatchPlayer player: match.getPlayers()) { sb1.append(player.getPlayer().getName()).append(", "); sb2.append(player.getPlayer().getName()).append(" ").append(player.getWins()).append("-").append(player.getLoses()).append(", "); - players = sb1.substring(0, sb1.length() - 2); - result = sb2.substring(0, sb2.length() - 2); } + players = sb1.substring(0, sb1.length() - 2); + result = sb2.substring(0, sb2.length() - 2); this.startTime = match.getStartTime(); this.endTime = match.getEndTime(); } diff --git a/Mage/src/mage/game/match/MatchImpl.java b/Mage/src/mage/game/match/MatchImpl.java index d44d7ac4b4..fce78e348b 100644 --- a/Mage/src/mage/game/match/MatchImpl.java +++ b/Mage/src/mage/game/match/MatchImpl.java @@ -90,11 +90,11 @@ public abstract class MatchImpl implements Match { public boolean leave(UUID playerId) { MatchPlayer mPlayer = getPlayer(playerId); if (mPlayer != null) { - boolean result = players.remove(mPlayer); + mPlayer.setQuit(true); synchronized (this) { this.notifyAll(); } - return result; + return true; } return false; } @@ -302,12 +302,15 @@ public abstract class MatchImpl implements Match { @Override public Date getStartTime() { - return startTime; + return new Date(startTime.getTime()); } @Override public Date getEndTime() { - return endTime; + if (endTime != null) { + return new Date(endTime.getTime()); + } + return null; } }