mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 03:07:34 +00:00
Possible fix for instant complete kill quests having their progress stuck.
This commit is contained in:
1 parent
464f5ecb1e
commit
694afb7b6b
1 file changed
+13
@@ -51,7 +51,20 @@ public class QuestKill extends QuestInterface implements IQuestKill {
|
||||
QuestData data = playerdata.activeQuests.get(questId);
|
||||
if(data == null)
|
||||
return false;
|
||||
|
||||
HashMap<String,Integer> killed = getKilled(data);
|
||||
int completed = 0;
|
||||
for(String entityName : targets.keySet()){
|
||||
int amount = 0;
|
||||
if(killed.containsKey(entityName))
|
||||
amount = killed.get(entityName);
|
||||
if(amount >= targets.get(entityName)){
|
||||
completed++;
|
||||
}
|
||||
}
|
||||
if(completed >= targets.keySet().size())
|
||||
return true;
|
||||
|
||||
if(killed.size() != targets.size())
|
||||
return false;
|
||||
for(String entity : killed.keySet()){
|
||||
|
||||
Reference in new issue
Block a user