Default value for hero legend StatSet.

This commit is contained in:
MobiusDevelopment
2020-04-01 12:00:27 +00:00
parent 362fc6d6cb
commit 5303875e76
2 changed files with 4 additions and 4 deletions

View File

@@ -658,7 +658,7 @@ public class Hero
if (COMPLETE_HEROS.containsKey(charId))
{
final StatSet oldHero = COMPLETE_HEROS.get(charId);
if (hero.getInt(LEGEND_COUNT) == 1)
if (hero.getInt(LEGEND_COUNT, 0) == 1)
{
final int count = oldHero.getInt(LEGEND_COUNT);
oldHero.set(LEGEND_COUNT, count + 1);
@@ -677,7 +677,7 @@ public class Hero
final StatSet newHero = new StatSet();
newHero.set(Olympiad.CHAR_NAME, hero.getString(Olympiad.CHAR_NAME));
newHero.set(Olympiad.CLASS_ID, hero.getInt(Olympiad.CLASS_ID));
if (hero.getInt(LEGEND_COUNT) == 1)
if (hero.getInt(LEGEND_COUNT, 0) == 1)
{
newHero.set(LEGEND_COUNT, 1);
}

View File

@@ -658,7 +658,7 @@ public class Hero
if (COMPLETE_HEROS.containsKey(charId))
{
final StatSet oldHero = COMPLETE_HEROS.get(charId);
if (hero.getInt(LEGEND_COUNT) == 1)
if (hero.getInt(LEGEND_COUNT, 0) == 1)
{
final int count = oldHero.getInt(LEGEND_COUNT);
oldHero.set(LEGEND_COUNT, count + 1);
@@ -677,7 +677,7 @@ public class Hero
final StatSet newHero = new StatSet();
newHero.set(Olympiad.CHAR_NAME, hero.getString(Olympiad.CHAR_NAME));
newHero.set(Olympiad.CLASS_ID, hero.getInt(Olympiad.CLASS_ID));
if (hero.getInt(LEGEND_COUNT) == 1)
if (hero.getInt(LEGEND_COUNT, 0) == 1)
{
newHero.set(LEGEND_COUNT, 1);
}