-Quests with complete text now complete the quest in data before showing the text GUI, instead of being completed when that GUI is closed.

Item Quests:
Some fixes to item quest completion when an item is picked up.
This commit is contained in:
Luis C.M committed 2022-06-13 04:08:36 -05:00
1 parent 1293fabca9
commit dfec85484b
7 files changed
+17 -11

No files matched your search

@@ -16,6 +16,7 @@ import noppes.npcs.util.ValueUtil;
public class QuestItem extends QuestInterface implements IQuestItem {
public NpcMiscInventory items = new NpcMiscInventory(3);
public static ItemStack pickedUp;
public boolean leaveItems = false;
public boolean ignoreDamage = false;
public boolean ignoreNBT = false;
@@ -64,7 +65,11 @@ public class QuestItem extends QuestInterface implements IQuestItem {
is.stackSize = 0;
map.put(slot,is);
}
for(ItemStack item : player.inventory.mainInventory){
ArrayList<ItemStack> list = new ArrayList<>(Arrays.asList(player.inventory.mainInventory));
list.add(pickedUp);
for(ItemStack item : list){
if(item == null)
continue;
for(ItemStack questItem : map.values()){