|
|
@ -90,7 +90,7 @@ public class BuyFromNPCMsgHandler extends AbstractClientMsgHandler { |
|
|
|
if (!itemMan.hasRoomInventory(me.template.item_wt)) |
|
|
|
if (!itemMan.hasRoomInventory(me.template.item_wt)) |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
int cost = me.getMagicValue(); |
|
|
|
int cost = me.magicValue; |
|
|
|
|
|
|
|
|
|
|
|
float bargain = sourcePlayer.getBargain(); |
|
|
|
float bargain = sourcePlayer.getBargain(); |
|
|
|
|
|
|
|
|
|
|
@ -112,7 +112,7 @@ public class BuyFromNPCMsgHandler extends AbstractClientMsgHandler { |
|
|
|
if (building != null && building.getProtectionState().equals(Enum.ProtectionState.NPC)) |
|
|
|
if (building != null && building.getProtectionState().equals(Enum.ProtectionState.NPC)) |
|
|
|
building = null; |
|
|
|
building = null; |
|
|
|
|
|
|
|
|
|
|
|
int buildingDeposit = cost - me.getMagicValue(); |
|
|
|
int buildingDeposit = cost - me.magicValue; |
|
|
|
|
|
|
|
|
|
|
|
if (building != null && (building.getStrongboxValue() + buildingDeposit) > building.getMaxGold()) { |
|
|
|
if (building != null && (building.getStrongboxValue() + buildingDeposit) > building.getMaxGold()) { |
|
|
|
ErrorPopupMsg.sendErrorPopup(sourcePlayer, 206); |
|
|
|
ErrorPopupMsg.sendErrorPopup(sourcePlayer, 206); |
|
|
@ -155,7 +155,7 @@ public class BuyFromNPCMsgHandler extends AbstractClientMsgHandler { |
|
|
|
int cost = vendorItem.template.item_value; |
|
|
|
int cost = vendorItem.template.item_value; |
|
|
|
|
|
|
|
|
|
|
|
if (vendorItem.flags.contains(Enum.ItemFlags.Identified) || vendorItem.isCustomValue()) |
|
|
|
if (vendorItem.flags.contains(Enum.ItemFlags.Identified) || vendorItem.isCustomValue()) |
|
|
|
cost = vendorItem.getMagicValue(); |
|
|
|
cost = vendorItem.magicValue; |
|
|
|
|
|
|
|
|
|
|
|
float bargain = sourcePlayer.getBargain(); |
|
|
|
float bargain = sourcePlayer.getBargain(); |
|
|
|
|
|
|
|
|
|
|
|