|
|
@ -52,7 +52,7 @@ public class Item extends AbstractWorldObject { |
|
|
|
public Enum.EquipSlotType equipSlot; |
|
|
|
public Enum.EquipSlotType equipSlot; |
|
|
|
private boolean canDestroy; |
|
|
|
private boolean canDestroy; |
|
|
|
private boolean isRandom = false; |
|
|
|
private boolean isRandom = false; |
|
|
|
private int value; |
|
|
|
public int value; |
|
|
|
public OwnerType ownerType; |
|
|
|
public OwnerType ownerType; |
|
|
|
public int templateID; |
|
|
|
public int templateID; |
|
|
|
private long dateToUpgrade; |
|
|
|
private long dateToUpgrade; |
|
|
@ -781,6 +781,8 @@ public class Item extends AbstractWorldObject { |
|
|
|
if (this.chargesRemaining < 0) |
|
|
|
if (this.chargesRemaining < 0) |
|
|
|
this.chargesRemaining = 0; |
|
|
|
this.chargesRemaining = 0; |
|
|
|
DbManager.ItemQueries.UPDATE_REMAINING_CHARGES(this); |
|
|
|
DbManager.ItemQueries.UPDATE_REMAINING_CHARGES(this); |
|
|
|
|
|
|
|
this.value = this.value * (this.chargesRemaining / this.template.item_initial_charges); |
|
|
|
|
|
|
|
DbManager.ItemQueries.UPDATE_VALUE(this, this.value); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void zeroItem() { |
|
|
|
public void zeroItem() { |
|
|
|