Browse Source

fix resource merchant elan stones

lakebane-new
FatBoy-DOTC 6 months ago
parent
commit
7e5ad644d3
  1. 13
      src/engine/net/client/ClientMessagePump.java

13
src/engine/net/client/ClientMessagePump.java

@ -1408,9 +1408,14 @@ public class ClientMessagePump implements NetMsgHandler {
int cost = me.getMagicValue(); int cost = me.getMagicValue();
int amountResource = 0; int amountResource = 0;
if(ib.getType().equals(ItemType.RESOURCE) && npc.contractUUID == 900){ //resource merchant if(npc.contractUUID == 900){ //resource merchant
amountResource = 15000000 / (ib.getBaseValue()); if(ib.getType().equals(ItemType.RESOURCE)) {
cost = amountResource * (ib.getBaseValue()); amountResource = 15000000 / (ib.getBaseValue());
cost = amountResource * (ib.getBaseValue());
}else{
amountResource = 10;
cost = 100000; //elans
}
} }
float bargain = sourcePlayer.getBargain(); float bargain = sourcePlayer.getBargain();
@ -1449,7 +1454,7 @@ public class ClientMessagePump implements NetMsgHandler {
if (buy != null) { if (buy != null) {
me.transferEnchants(buy); me.transferEnchants(buy);
if(ib.getType().equals(ItemType.RESOURCE) && npc.contractUUID == 900){ //resource merchant if(npc.contractUUID == 900){ //resource merchant
buy.setNumOfItems(amountResource); buy.setNumOfItems(amountResource);
} }
itemMan.addItemToInventory(buy); itemMan.addItemToInventory(buy);

Loading…
Cancel
Save