Browse Source

fix resource merchant margins

lakebane-new
FatBoy-DOTC 5 months ago
parent
commit
846b8a7cde
  1. 4
      src/engine/net/client/ClientMessagePump.java
  2. 6
      src/engine/objects/Contract.java

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

@ -1409,8 +1409,8 @@ public class ClientMessagePump implements NetMsgHandler { @@ -1409,8 +1409,8 @@ public class ClientMessagePump implements NetMsgHandler {
int cost = me.getMagicValue();
int amountResource = 0;
if(ib.getType().equals(ItemType.RESOURCE) && npc.contractUUID == 900){ //resource merchant
amountResource = 3000000 / (ib.getBaseValue() * 2);
cost = amountResource * (ib.getBaseValue() * 2);
amountResource = 15000000 / (ib.getBaseValue());
cost = amountResource * (ib.getBaseValue());
}
float bargain = sourcePlayer.getBargain();

6
src/engine/objects/Contract.java

@ -201,8 +201,10 @@ public class Contract extends AbstractGameObject { @@ -201,8 +201,10 @@ public class Contract extends AbstractGameObject {
if(this.getObjectUUID() == 900){ //resource merchant
for(MobEquipment me : this.sellInventory){
if(me.getItemBase().getType().equals(Enum.ItemType.RESOURCE)){
int amountResource = 3000000 / (me.getItemBase().getBaseValue() * 2);
me.magicValue = amountResource * (me.getItemBase().getBaseValue() * 2);
int amountResource = 1500000 / (me.getItemBase().getBaseValue());
me.magicValue = amountResource * (me.getItemBase().getBaseValue());
} else{
me.magicValue = 100000;
}
}
}

Loading…
Cancel
Save