From 7e5ad644d386305c822925991e871060c269ca8f Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 15 Jun 2024 16:04:02 -0500 Subject: [PATCH] fix resource merchant elan stones --- src/engine/net/client/ClientMessagePump.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index 6c7f1ae4..aff7209c 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/src/engine/net/client/ClientMessagePump.java @@ -1408,9 +1408,14 @@ public class ClientMessagePump implements NetMsgHandler { int cost = me.getMagicValue(); int amountResource = 0; - if(ib.getType().equals(ItemType.RESOURCE) && npc.contractUUID == 900){ //resource merchant - amountResource = 15000000 / (ib.getBaseValue()); - cost = amountResource * (ib.getBaseValue()); + if(npc.contractUUID == 900){ //resource merchant + if(ib.getType().equals(ItemType.RESOURCE)) { + amountResource = 15000000 / (ib.getBaseValue()); + cost = amountResource * (ib.getBaseValue()); + }else{ + amountResource = 10; + cost = 100000; //elans + } } float bargain = sourcePlayer.getBargain(); @@ -1449,7 +1454,7 @@ public class ClientMessagePump implements NetMsgHandler { if (buy != null) { me.transferEnchants(buy); - if(ib.getType().equals(ItemType.RESOURCE) && npc.contractUUID == 900){ //resource merchant + if(npc.contractUUID == 900){ //resource merchant buy.setNumOfItems(amountResource); } itemMan.addItemToInventory(buy);