forked from MagicBane/Server
item_value refactored to template
This commit is contained in:
@@ -234,7 +234,7 @@ public class Item extends AbstractWorldObject {
|
||||
} else
|
||||
writer.putInt(item.numberOfItems); // Amount of gold
|
||||
} else
|
||||
writer.putInt(item.getItemBase().getBaseValue());
|
||||
writer.putInt(item.template.item_value);
|
||||
|
||||
writer.putInt(item.getValue());
|
||||
|
||||
@@ -1049,7 +1049,7 @@ public class Item extends AbstractWorldObject {
|
||||
public final void loadEnchantments() {
|
||||
//dont load mobloot enchantments, they arent in db.
|
||||
if (this.getObjectType().equals(GameObjectType.MobLoot)) {
|
||||
this.magicValue = this.getItemBase().getBaseValue() + calcMagicValue();
|
||||
this.magicValue = this.template.item_value + calcMagicValue();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1063,7 +1063,7 @@ public class Item extends AbstractWorldObject {
|
||||
}
|
||||
}
|
||||
|
||||
this.magicValue = this.getItemBase().getBaseValue() + calcMagicValue();
|
||||
this.magicValue = this.template.item_value + calcMagicValue();
|
||||
}
|
||||
|
||||
public HashMap<Integer, Integer> getBakedInStats() {
|
||||
@@ -1226,7 +1226,7 @@ public class Item extends AbstractWorldObject {
|
||||
public int getValue() {
|
||||
|
||||
if (this.value == 0)
|
||||
if (this.template.item_flags.contains(ItemFlags.Identified)) {
|
||||
if (this.isID()) {
|
||||
return this.getMagicValue();
|
||||
} else
|
||||
return this.template.item_value;
|
||||
|
||||
Reference in New Issue
Block a user