forked from MagicBane/Server
item_value refactored to template
This commit is contained in:
@@ -1009,20 +1009,6 @@ public class Item extends AbstractWorldObject {
|
||||
return this.magicValue;
|
||||
}
|
||||
|
||||
public int getBaseValue() {
|
||||
if (this.getItemBase() != null)
|
||||
return this.getItemBase().getBaseValue();
|
||||
return 0;
|
||||
}
|
||||
|
||||
public AbstractWorldObject getLastOwner() {
|
||||
return this.lastOwner;
|
||||
}
|
||||
|
||||
public void setLastOwner(AbstractWorldObject value) {
|
||||
this.lastOwner = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
||||
@@ -1240,10 +1226,10 @@ public class Item extends AbstractWorldObject {
|
||||
public int getValue() {
|
||||
|
||||
if (this.value == 0)
|
||||
if (this.isID()) {
|
||||
if (this.template.item_flags.contains(ItemFlags.Identified)) {
|
||||
return this.getMagicValue();
|
||||
} else
|
||||
return this.getBaseValue();
|
||||
return this.template.item_value;
|
||||
|
||||
return this.value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user