mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Fix NPE
This commit is contained in:
committed by
Hans Mackowiak
parent
829eae7c97
commit
bc5e5a731d
@@ -511,7 +511,7 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
|
||||
int abiX = cardXOffset + (cardWidth / 2) + (cardWidth / 3);
|
||||
int abiSpace = (cardWidth / 7);
|
||||
int abiY = cardWidth < 200 ? cardYOffset + 25 : cardYOffset + 50;
|
||||
if (card.getZone().equals(ZoneType.Battlefield)){
|
||||
if (ZoneType.Battlefield.equals(card.getZone())){
|
||||
if (card.getCurrentState().hasFlying()) {
|
||||
CardFaceSymbols.drawAbilitySymbol("flying", g, abiX, abiY, abiScale, abiScale);
|
||||
abiY += abiSpace;
|
||||
|
||||
@@ -544,7 +544,7 @@ public class CardRenderer {
|
||||
g.drawRect(BORDER_THICKNESS, Color.MAGENTA, cx, cy, cw, ch);
|
||||
}
|
||||
//Ability Icons
|
||||
boolean onbattlefield = card.getZone().equals(ZoneType.Battlefield);
|
||||
boolean onbattlefield = ZoneType.Battlefield.equals(card.getZone());
|
||||
float abiY = cy;
|
||||
float abiX = cx + ((cw*2)/2.3f);
|
||||
float abiScale = cw / 5.5f;
|
||||
|
||||
Reference in New Issue
Block a user