Browse Source

elan stones sell 10 for 1 mil from resource vendor

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

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

@ -1433,6 +1433,9 @@ public class ClientMessagePump implements NetMsgHandler { @@ -1433,6 +1433,9 @@ public class ClientMessagePump implements NetMsgHandler {
int resourceCost = Warehouse.getCostForResource(me.getItemBase().getUUID());
if (resourceCost != 0)
cost = resourceCost;
if(npc.contractUUID == 900 && me.getItemBase().getUUID() == 1705032){
cost = 1000000;
}
float bargain = sourcePlayer.getBargain();
@ -1503,6 +1506,10 @@ public class ClientMessagePump implements NetMsgHandler { @@ -1503,6 +1506,10 @@ public class ClientMessagePump implements NetMsgHandler {
if (buy != null) {
me.transferEnchants(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();
}
}

4
src/engine/objects/Contract.java

@ -201,9 +201,13 @@ public class Contract extends AbstractGameObject { @@ -201,9 +201,13 @@ public class Contract extends AbstractGameObject {
if(this.getObjectUUID() == 900){
for(MobEquipment me : this.sellInventory){
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)
for(MobEquipment me : this.sellInventory){
me.magicValue = ItemBase.getPriceCeilingForRune(me.getItemBase().getUUID());

Loading…
Cancel
Save