Browse Source

elan stones sell 10 for 1 mil from resource vendor

lakebane-master
FatBoy-DOTC 5 months ago
parent
commit
2b18765781
  1. 7
      src/engine/net/client/ClientMessagePump.java
  2. 6
      src/engine/objects/Contract.java

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

@ -1433,6 +1433,9 @@ public class ClientMessagePump implements NetMsgHandler {
int resourceCost = Warehouse.getCostForResource(me.getItemBase().getUUID()); int resourceCost = Warehouse.getCostForResource(me.getItemBase().getUUID());
if (resourceCost != 0) if (resourceCost != 0)
cost = resourceCost; cost = resourceCost;
if(npc.contractUUID == 900 && me.getItemBase().getUUID() == 1705032){
cost = 1000000;
}
float bargain = sourcePlayer.getBargain(); float bargain = sourcePlayer.getBargain();
@ -1503,6 +1506,10 @@ public class ClientMessagePump implements NetMsgHandler {
if (buy != null) { if (buy != null) {
me.transferEnchants(buy); me.transferEnchants(buy);
itemMan.addItemToInventory(buy); itemMan.addItemToInventory(buy);
if(npc.contractUUID == 900 && buy.getItemBaseID() == 1705032){
buy.setNumOfItems(10);
DbManager.ItemQueries.UPDATE_NUM_ITEMS(buy,buy.getNumOfItems(),0);
}
//itemMan.updateInventory(); //itemMan.updateInventory();
} }
} }

6
src/engine/objects/Contract.java

@ -201,7 +201,11 @@ public class Contract extends AbstractGameObject {
if(this.getObjectUUID() == 900){ if(this.getObjectUUID() == 900){
for(MobEquipment me : this.sellInventory){ for(MobEquipment me : this.sellInventory){
me.magicValue = Warehouse.getCostForResource(me.getItemBase().getUUID()) * Warehouse.getSellStackSize(me.getItemBase().getUUID()); if(me.getItemBase().getUUID() == 1705032){
me.magicValue = 1000000;
}else {
me.magicValue = Warehouse.getCostForResource(me.getItemBase().getUUID()) * Warehouse.getSellStackSize(me.getItemBase().getUUID());
}
} }
} }
if(this.getObjectUUID() == 1202) if(this.getObjectUUID() == 1202)

Loading…
Cancel
Save