So the easiest fix for this is to find this in TradeAndDuel:
Code:
if(Item.itemStackable[itemID] || Item.itemIsNote[itemID]) {
boolean inTrade = false;
for(GameItem item : offeredItems) {
if(item.id == itemID) {
inTrade = true;
item.amount += amount;
c.getItems().deleteItem(itemID, c.getItems().getItemSlot(itemID), amount);
o.getPA().sendFrame126("Trading with: " + c.playerName+" who has @gre@"+c.getItems().freeSlots()+" free slots" ,3417);
break;
}
}
and change
Code:
c.getItems().deleteItem(itemID, c.getItems().getItemSlot(itemID), amount);
to
Code:
c.getItems().deleteItem2(itemID, amount);
there's already a method in itemAssistant that handles the two argument deleteItem, so this is all you need to do.
Woops, forgot to include on last thing:
change
Code:
if(!inTrade) {
offeredItems.add(new GameItem(itemID, amount));
c.getItems().deleteItem(itemID, fromSlot, amount);
o.getPA().sendFrame126("Trading with: " + c.playerName+" who has @gre@"+c.getItems().freeSlots()+" free slots" ,3417);
}
to
Code:
if(!inTrade) {
offeredItems.add(new GameItem(itemID, amount));
c.getItems().deleteItem2(itemID, amount);
o.getPA().sendFrame126("Trading with: " + c.playerName+" who has @gre@"+c.getItems().freeSlots()+" free slots" ,3417);
}
it should work now
Credits to itz fannypak
next time use the search button