forked from MagicBane/Server
Value set in constructor
This commit is contained in:
@@ -56,7 +56,7 @@ public class Item extends AbstractWorldObject {
|
||||
public OwnerType ownerType;
|
||||
public int templateID;
|
||||
private long dateToUpgrade;
|
||||
private int magicValue;
|
||||
public int magicValue;
|
||||
public ItemTemplate template;
|
||||
public String name;
|
||||
|
||||
@@ -76,7 +76,7 @@ public class Item extends AbstractWorldObject {
|
||||
this.numberOfItems = 1;
|
||||
this.flags.addAll(this.template.item_flags);
|
||||
this.value = this.template.item_value;
|
||||
|
||||
this.magicValue = this.value + calcMagicValue();
|
||||
loadTemplateEnchantments();
|
||||
}
|
||||
|
||||
@@ -971,10 +971,6 @@ public class Item extends AbstractWorldObject {
|
||||
return true;
|
||||
}
|
||||
|
||||
public final int getMagicValue() {
|
||||
return this.magicValue;
|
||||
}
|
||||
|
||||
private void loadTemplateEnchantments() {
|
||||
|
||||
EffectsBase effect;
|
||||
@@ -1155,7 +1151,7 @@ public class Item extends AbstractWorldObject {
|
||||
|
||||
if (this.value == 0)
|
||||
if (this.flags.contains(ItemFlags.Identified)) {
|
||||
return this.getMagicValue();
|
||||
return this.magicValue;
|
||||
} else
|
||||
return this.template.item_value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user