Fixed v1 server incompatible with v0 clients (freezes on game startup)

This commit is contained in:
Oleg Agafonov 2018-01-28 17:57:55 +04:00
parent 6f175981ce
commit 66eb1de7f1
2 changed files with 2 additions and 27 deletions

View file

@ -1127,7 +1127,7 @@ public class ModernCardRenderer extends CardRenderer {
protected static Paint getBorderPaint(ObjectColor colors, Collection<CardType> types, int width) {
if (colors.isMulticolored()) {
if (colors.getColorCount() == 2) {
List<ObjectColor> twoColors = colors.getTwoColorsInOrder();
List<ObjectColor> twoColors = colors.getColors();
// Two-color frames look better if we use a whiter white
// than the normal white frame color for them, as the normal
@ -1203,7 +1203,7 @@ public class ModernCardRenderer extends CardRenderer {
protected static Paint getTextboxPaint(ObjectColor colors, Collection<CardType> types, int width) {
if (colors.isMulticolored()) {
if (colors.getColorCount() == 2) {
List<ObjectColor> twoColors = colors.getTwoColorsInOrder();
List<ObjectColor> twoColors = colors.getColors();
Color[] translatedColors;
if (types.contains(CardType.LAND)) {
translatedColors = new Color[]{

View file

@ -154,30 +154,6 @@ public class ObjectColor implements Serializable, Copyable<ObjectColor>, Compara
}
public List<ObjectColor> getColors() {
List<ObjectColor> colors = new ArrayList<>();
if (this.isWhite()) {
colors.add(ObjectColor.WHITE);
}
if (this.isBlue()) {
colors.add(ObjectColor.BLUE);
}
if (this.isBlack()) {
colors.add(ObjectColor.BLACK);
}
if (this.isRed()) {
colors.add(ObjectColor.RED);
}
if (this.isGreen()) {
colors.add(ObjectColor.GREEN);
}
if (this.isGold()) {
colors.add(ObjectColor.GOLD);
}
return colors;
}
public List<ObjectColor> getTwoColorsInOrder() {
List<ObjectColor> colors = new ArrayList<>();
int firstColor = 5000;
int secondColor = -1;
@ -554,5 +530,4 @@ public class ObjectColor implements Serializable, Copyable<ObjectColor>, Compara
colors.add(ObjectColor.GOLD);
return colors;
}
}