recalc magic value
This commit is contained in:
@@ -210,6 +210,8 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
targetItem.setValue(itemPrice);
|
targetItem.setValue(itemPrice);
|
||||||
|
targetItem.magicValue = targetItem.value + targetItem.calcMagicValue();
|
||||||
|
|
||||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.DEPOSIT, true);
|
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.DEPOSIT, true);
|
||||||
dispatch = Dispatch.borrow(player, outMsg);
|
dispatch = Dispatch.borrow(player, outMsg);
|
||||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||||
|
|||||||
@@ -991,7 +991,7 @@ public class Item extends AbstractWorldObject {
|
|||||||
this.effectNames.add(enchantID);
|
this.effectNames.add(enchantID);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int calcMagicValue() {
|
public int calcMagicValue() {
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
for (String enchant : this.effectNames) {
|
for (String enchant : this.effectNames) {
|
||||||
ret += Item.getEnchantValue(enchant + 'A');
|
ret += Item.getEnchantValue(enchant + 'A');
|
||||||
|
|||||||
Reference in New Issue
Block a user