mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-12 13:43:57 +01:00
Prevent giving more than necessary for delivery objective, fixes #1043
This commit is contained in:
parent
a7ef31b973
commit
c2c86465f2
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user