Prevent giving more than necessary for delivery objective, fixes #1043

This commit is contained in:
PikaMug 2020-01-18 23:52:42 -05:00
parent a7ef31b973
commit c2c86465f2

View File

@ -1738,8 +1738,9 @@ public class Quester {
getQuestData(quest).itemsDelivered.set(items.indexOf(found), newStack);
if ((i.getAmount() + amount) >= toDeliver) {
// Take away remaining amount to be delivered
i.setAmount(i.getAmount() - (toDeliver - amount));
player.getInventory().setItem(index, i);
ItemStack clone = i.clone();
clone.setAmount(i.getAmount() - (toDeliver - amount));
player.getInventory().setItem(index, clone);
} else {
player.getInventory().setItem(index, null);
}