new ID for dynamic item work flawlessly with adding multiple at once

This commit is contained in:
Song Minjae
2017-04-24 21:31:53 +09:00
parent 5cd5ebbea3
commit c35ba8201a
10 changed files with 77 additions and 44 deletions

View File

@@ -20,16 +20,16 @@ object AmmoMeterProxy {
else {
meter.vitalGetterVal = {
if (ItemCodex[currentItem.originalID].consumable)
actor.inventory.getByDynamicID(currentItem.dynamicID)!!.amount.toFloat()
else
actor.inventory.getByDynamicID(currentItem.dynamicID)!!.item.durability
actor.inventory.getByDynamicID(currentItem.dynamicID)!!.amount.toFloat()
else
currentItem.durability
}
meter.vitalGetterMax = {
if (ItemCodex[currentItem.originalID].consumable)
500f
else
actor.inventory.getByDynamicID(currentItem.dynamicID)!!.item.maxDurability.toFloat()
currentItem.maxDurability.toFloat()
}
}
}