|
|
@ -1482,10 +1482,10 @@ public class CharacterItemManager { |
|
|
|
if (!purchasedItem.moveItemToInventory((PlayerCharacter) this.absCharacter)) |
|
|
|
if (!purchasedItem.moveItemToInventory((PlayerCharacter) this.absCharacter)) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
if (purchasedItem.getValue() != purchasedItem.magicValue) { |
|
|
|
// Reset value
|
|
|
|
DbManager.ItemQueries.UPDATE_VALUE(purchasedItem, 0); |
|
|
|
purchasedItem.value = (int) (purchasedItem.template.item_value * (purchasedItem.combat_health_current / purchasedItem.template.combat_health_full)); |
|
|
|
purchasedItem.setValue(0); |
|
|
|
purchasedItem.value = purchasedItem.value * (purchasedItem.chargesRemaining / purchasedItem.template.item_initial_charges); |
|
|
|
} |
|
|
|
DbManager.ItemQueries.UPDATE_VALUE(purchasedItem, purchasedItem.value); |
|
|
|
|
|
|
|
|
|
|
|
// db transfer successfull, remove from this character
|
|
|
|
// db transfer successfull, remove from this character
|
|
|
|
// skip this check if this is a mobLoot item (which is not in any inventory)
|
|
|
|
// skip this check if this is a mobLoot item (which is not in any inventory)
|
|
|
|