Most visitors online was 8830 , on 6 Feb 2024
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!public static byte[] getNPCShop(MapleClient c, int sid, List<MapleShopItem> items) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.OPEN_SHOP_DLG.getValue());
mplew.writeInt(sid);
mplew.writeShort(items.size());
for (MapleShopItem item : items) {
mplew.writeInt(item.getItemId());
mplew.writeInt(item.getPrice());
mplew.writeInt(item.getPrice() == 0 ? item.getPitch() : 0);
mplew.writeInt(0);
mplew.writeInt(0);
if (!ItemConstants.isRechargable(item.getItemId())) {
mplew.writeShort(1);
mplew.writeShort(item.getBuyable());
} else {
mplew.writeShort(0);
mplew.writeInt(0);
mplew.writeShort(doubleToShortBits(ItemInfo.getPrice(item.getItemId())));
mplew.writeShort(ItemInfo.getSlotMax(item.getItemId()));
}
}
return mplew.getPacket();
}
mplew.writeInt(item.getPrice() == 0 ? item.getPitch() : 0);