mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-20 12:49:02 +00:00
fix crash in header
This commit is contained in:
parent
97e78338f6
commit
b9de6eb569
4 changed files with 15 additions and 15 deletions
|
|
@ -29,7 +29,7 @@ public class BasicStats extends BaseModel {
|
|||
public Float _int;
|
||||
|
||||
public Float getCon() {
|
||||
return con;
|
||||
return con != null ? con : Float.valueOf(0);
|
||||
}
|
||||
|
||||
public void setCon(Float con) {
|
||||
|
|
@ -37,7 +37,7 @@ public class BasicStats extends BaseModel {
|
|||
}
|
||||
|
||||
public Float getStr() {
|
||||
return str;
|
||||
return str != null ? str : Float.valueOf(0);
|
||||
}
|
||||
|
||||
public void setStr(Float str) {
|
||||
|
|
@ -45,7 +45,7 @@ public class BasicStats extends BaseModel {
|
|||
}
|
||||
|
||||
public Float getPer() {
|
||||
return per;
|
||||
return per != null ? per : Float.valueOf(0);
|
||||
}
|
||||
|
||||
public void setPer(Float per) {
|
||||
|
|
@ -53,7 +53,7 @@ public class BasicStats extends BaseModel {
|
|||
}
|
||||
|
||||
public Float get_int() {
|
||||
return _int;
|
||||
return _int != null ? _int : Float.valueOf(0);
|
||||
}
|
||||
|
||||
public void set_int(Float _int) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public class Buffs extends BasicStats {
|
|||
}
|
||||
|
||||
public Boolean getSnowball() {
|
||||
return snowball;
|
||||
return snowball != null ? snowball: Boolean.FALSE;
|
||||
}
|
||||
|
||||
public void setSnowball(Boolean snowball) {
|
||||
|
|
@ -33,7 +33,7 @@ public class Buffs extends BasicStats {
|
|||
}
|
||||
|
||||
public Boolean getStreaks() {
|
||||
return streaks;
|
||||
return streaks != null ? streaks : Boolean.FALSE;
|
||||
}
|
||||
|
||||
public void setStreaks(Boolean streaks) {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public abstract class PlayerMinStats extends BasicStats {
|
|||
}
|
||||
|
||||
public Integer getPoints() {
|
||||
return points;
|
||||
return points != null ? points : Integer.valueOf(0);
|
||||
}
|
||||
|
||||
public void setPoints(Integer points) {
|
||||
|
|
@ -62,7 +62,7 @@ public abstract class PlayerMinStats extends BasicStats {
|
|||
}
|
||||
|
||||
public Integer getLvl() {
|
||||
return lvl;
|
||||
return lvl != null ? lvl : Integer.valueOf(0);
|
||||
}
|
||||
|
||||
public void setLvl(Integer lvl) {
|
||||
|
|
@ -85,7 +85,7 @@ public abstract class PlayerMinStats extends BasicStats {
|
|||
}
|
||||
|
||||
public Double getGp() {
|
||||
return gp;
|
||||
return gp != null ? gp : Double.valueOf(0);
|
||||
}
|
||||
|
||||
public void setGp(Double gp) {
|
||||
|
|
@ -93,7 +93,7 @@ public abstract class PlayerMinStats extends BasicStats {
|
|||
}
|
||||
|
||||
public Double getExp() {
|
||||
return exp;
|
||||
return exp != null ? exp : Double.valueOf(0);
|
||||
}
|
||||
|
||||
public void setExp(Double exp) {
|
||||
|
|
@ -101,7 +101,7 @@ public abstract class PlayerMinStats extends BasicStats {
|
|||
}
|
||||
|
||||
public Double getMp() {
|
||||
return mp;
|
||||
return mp != null ? mp : Double.valueOf(0);
|
||||
}
|
||||
|
||||
public void setMp(Double mp) {
|
||||
|
|
@ -109,7 +109,7 @@ public abstract class PlayerMinStats extends BasicStats {
|
|||
}
|
||||
|
||||
public Double getHp() {
|
||||
return hp;
|
||||
return hp != null ? hp : Double.valueOf(0);
|
||||
}
|
||||
|
||||
public void setHp(Double hp) {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public class Stats extends PlayerMinStats{
|
|||
|
||||
|
||||
public Integer getToNextLevel() {
|
||||
return toNextLevel;
|
||||
return toNextLevel != null ? toNextLevel : Integer.valueOf(0);
|
||||
}
|
||||
|
||||
public void setToNextLevel(Integer toNextLevel) {
|
||||
|
|
@ -26,7 +26,7 @@ public class Stats extends PlayerMinStats{
|
|||
}
|
||||
|
||||
public Integer getMaxHealth() {
|
||||
return maxHealth;
|
||||
return maxHealth != null ? maxHealth : Integer.valueOf(0);
|
||||
}
|
||||
|
||||
public void setMaxHealth(Integer maxHealth) {
|
||||
|
|
@ -34,7 +34,7 @@ public class Stats extends PlayerMinStats{
|
|||
}
|
||||
|
||||
public Integer getMaxMP() {
|
||||
return maxMP;
|
||||
return maxMP != null ? maxMP : Integer.valueOf(0);
|
||||
}
|
||||
|
||||
public void setMaxMP(Integer maxMP) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue