From 15d95f0fee6cfb3a47cc520c7f2d874f330821f7 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 5 Mar 2015 07:49:42 +0100 Subject: [PATCH] * Tiny Leaders - Preserved deck name for Leader name. --- Mage/src/mage/game/match/MatchImpl.java | 2 ++ Mage/src/mage/game/match/MatchPlayer.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Mage/src/mage/game/match/MatchImpl.java b/Mage/src/mage/game/match/MatchImpl.java index 7bb0ea4d25..118dea380f 100644 --- a/Mage/src/mage/game/match/MatchImpl.java +++ b/Mage/src/mage/game/match/MatchImpl.java @@ -398,6 +398,8 @@ public abstract class MatchImpl implements Match { public void submitDeck(UUID playerId, Deck deck) { MatchPlayer player = getPlayer(playerId); if (player != null) { + // make sure the deck name (needed for Tiny Leaders) won't get lost by sideboarding + deck.setName(player.getDeck().getName()); player.submitDeck(deck); } synchronized (this) { diff --git a/Mage/src/mage/game/match/MatchPlayer.java b/Mage/src/mage/game/match/MatchPlayer.java index 9cead17c7f..c6adfc83ed 100644 --- a/Mage/src/mage/game/match/MatchPlayer.java +++ b/Mage/src/mage/game/match/MatchPlayer.java @@ -87,6 +87,10 @@ public class MatchPlayer { } public void updateDeck(Deck deck) { + if (this.deck != null) { + // preserver deck name, important for Tiny Leaders format + deck.setName(this.getDeck().getName()); + } this.deck = deck; }