From 496e8eedceb609805acc61e06f2bec5e5c78f7ee Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Sat, 11 Mar 2023 15:28:01 -0500 Subject: [PATCH] Stop matching kill obj to progress maker, see #2079 --- core/src/main/java/me/blackvein/quests/Quester.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/me/blackvein/quests/Quester.java b/core/src/main/java/me/blackvein/quests/Quester.java index 3144bdccc..dc0e81648 100644 --- a/core/src/main/java/me/blackvein/quests/Quester.java +++ b/core/src/main/java/me/blackvein/quests/Quester.java @@ -3591,7 +3591,12 @@ public class Quester implements IQuester { dispatchedQuestIDs.addAll(dispatchMultiplayerEverything(quest, type, (final IQuester q, final IQuest cq) -> { if (!dispatchedQuestIDs.contains(cq.getId())) { - q.getQuestData(quest).mobNumKilled.set(index, newMobsKilled); + final int i = q.getCurrentStage(cq).getMobsToKill().indexOf(entityType); + if (i == -1) { + return null; + } + final int kills = q.getQuestData(quest).getMobNumKilled().get(i); + q.getQuestData(quest).mobNumKilled.set(index, kills + 1); if (q.testComplete(quest)) { quest.nextStage(q, false); } @@ -3644,7 +3649,8 @@ public class Quester implements IQuester { dispatchedQuestIDs.addAll(dispatchMultiplayerEverything(quest, type, (final IQuester q, final IQuest cq) -> { if (!dispatchedQuestIDs.contains(cq.getId())) { - q.getQuestData(quest).setPlayersKilled(newPlayersKilled); + final int kills = q.getQuestData(quest).getPlayersKilled(); + q.getQuestData(quest).setPlayersKilled(kills + 1); if (q.testComplete(quest)) { quest.nextStage(q, false); }