Code:
} else if (interfaceId == 1265) {
Shop shop = (Shop) player.getTemporaryAttributtes().get("Shop");
if (shop == null)
return;
Integer slot = (Integer) player.getTemporaryAttributtes().get("ShopSelectedSlot");
boolean isBuying = player.getTemporaryAttributtes().get("shop_buying") != null;
if (componentId == 20) {
player.getTemporaryAttributtes().put("ShopSelectedSlot", slotId);
if (packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET)
shop.sendInfo(player, slotId, isBuying);
else if (packetId == WorldPacketsDecoder.ACTION_BUTTON2_PACKET)
shop.buy(player, slotId, 1);
else if (packetId == WorldPacketsDecoder.ACTION_BUTTON3_PACKET)
shop.buy(player, slotId, 5);
else if (packetId == WorldPacketsDecoder.ACTION_BUTTON4_PACKET)
shop.buy(player, slotId, 10);
else if (packetId == WorldPacketsDecoder.ACTION_BUTTON5_PACKET)
shop.buy(player, slotId, 50);
else if (packetId == WorldPacketsDecoder.ACTION_BUTTON9_PACKET)
shop.buy(player, slotId, 500);
else if (packetId == WorldPacketsDecoder.ACTION_BUTTON8_PACKET)
shop.sendExamine(player, slotId);
}
} else if (interfaceId == 1266) {
if (componentId == 0) {
if (packetId == WorldPacketsDecoder.ACTION_BUTTON9_PACKET)
player.getInventory().sendExamine(slotId);
else {
Shop shop = (Shop) player.getTemporaryAttributtes().get(
"Shop");
if (shop == null)
return;
if (packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET)
shop.sendValue(player, slotId);
else if (packetId == WorldPacketsDecoder.ACTION_BUTTON2_PACKET)
shop.sell(player, slotId, 1);
else if (packetId == WorldPacketsDecoder.ACTION_BUTTON3_PACKET)
shop.sell(player, slotId, 5);
else if (packetId == WorldPacketsDecoder.ACTION_BUTTON4_PACKET)
shop.sell(player, slotId, 10);
else if (packetId == WorldPacketsDecoder.ACTION_BUTTON5_PACKET)
shop.sell(player, slotId, 50);
}
}
may fix it i had the same problem..