Fix challenge item take algorithm

This commit is contained in:
Fabrizio La Rosa 2020-06-14 18:43:17 +02:00
parent 94e56d3b10
commit cb7a442b50

View File

@ -166,12 +166,13 @@ public class Challenge {
toRemove -= jis.getAmount();
jis.setAmount(0);
} else {
jis.setAmount(is.getAmount() - toRemove);
jis.setAmount(jis.getAmount() - toRemove);
toRemove = 0;
}
}
if(toRemove <= 0) {
p.updateInventory();
break;
}
}
}