From 5303875e764a66f4d69d3dc93a8c62e11027d876 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 1 Apr 2020 12:00:27 +0000 Subject: [PATCH] Default value for hero legend StatSet. --- .../java/org/l2jmobius/gameserver/model/entity/Hero.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/entity/Hero.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/entity/Hero.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/entity/Hero.java index a0bcd7b98f..fcfdedd4f0 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/entity/Hero.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/entity/Hero.java @@ -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); } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/entity/Hero.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/entity/Hero.java index a0bcd7b98f..fcfdedd4f0 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/entity/Hero.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/entity/Hero.java @@ -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); }