From 7113c11d5361d276610c08cf2b2a136145b46748 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Wed, 29 May 2024 00:37:54 -0700 Subject: [PATCH] Fix parsing error --- src/games/stendhal/server/maps/quests/AbstractQuest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/games/stendhal/server/maps/quests/AbstractQuest.java b/src/games/stendhal/server/maps/quests/AbstractQuest.java index 825320fb4a7..e60dd0f2b73 100644 --- a/src/games/stendhal/server/maps/quests/AbstractQuest.java +++ b/src/games/stendhal/server/maps/quests/AbstractQuest.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.List; +import games.stendhal.common.MathHelper; import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.entity.npc.NPCList; import games.stendhal.server.entity.player.Player; @@ -159,7 +160,7 @@ public int getCompletedCount(final Player player) { stateIndex = completionsIndexes.first(); } if (stateIndex != null && state.length > stateIndex && !"".equals(state[stateIndex])) { - return Integer.parseInt(state[stateIndex]); + return MathHelper.parseIntDefault(state[stateIndex], completed ? 1 : 0); } } // default is to return 1 if quest is in complete state and 0 otherwise