From 2b187657812f505dd0058de19d55726c0ad3ee1a Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 28 May 2024 20:39:08 -0500 Subject: [PATCH] elan stones sell 10 for 1 mil from resource vendor --- src/engine/net/client/ClientMessagePump.java | 7 +++++++ src/engine/objects/Contract.java | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index 3b697852..d956678e 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/src/engine/net/client/ClientMessagePump.java @@ -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 { 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(); } } diff --git a/src/engine/objects/Contract.java b/src/engine/objects/Contract.java index 07cd934b..9814b9ac 100644 --- a/src/engine/objects/Contract.java +++ b/src/engine/objects/Contract.java @@ -201,7 +201,11 @@ public class Contract extends AbstractGameObject { if(this.getObjectUUID() == 900){ 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)