本文整理汇总了Java中server.stores.AbstractPlayerStore.BoughtItem类的典型用法代码示例。如果您正苦于以下问题:Java BoughtItem类的具体用法?Java BoughtItem怎么用?Java BoughtItem使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BoughtItem类属于server.stores.AbstractPlayerStore包,在下文中一共展示了BoughtItem类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getHiredMerch
import server.stores.AbstractPlayerStore.BoughtItem; //导入依赖的package包/类
public static byte[] getHiredMerch(MapleCharacter chr, HiredMerchant merch, boolean firstTime) {
PacketWriter pw = new PacketWriter();
pw.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
pw.write(20);//was11
pw.write(6);
pw.write(7);
pw.writeShort(merch.getVisitorSlot(chr));
pw.writeInt(merch.getItemId());
pw.writeMapleAsciiString("Hired Merchant");
for (Pair storechr : merch.getVisitors()) {
pw.write(((Byte) storechr.left).byteValue());
PacketHelper.addCharLook(pw, (MapleCharacterLook) storechr.right, false, false);
pw.writeMapleAsciiString(((MapleCharacter) storechr.right).getName());
pw.writeShort(((MapleCharacter) storechr.right).getJob());
}
pw.write(-1);
pw.writeShort(0);
pw.writeMapleAsciiString(merch.getOwnerName());
if (merch.isOwner(chr)) {
pw.writeInt(merch.getTimeLeft());
pw.write(firstTime ? 1 : 0);
pw.write(merch.getBoughtItems().size());
for (final BoughtItem SoldItem : merch.getBoughtItems()) {
pw.writeInt(SoldItem.id);
pw.writeShort(SoldItem.quantity);
pw.writeLong(SoldItem.totalPrice);
pw.writeMapleAsciiString(SoldItem.buyer);
}
pw.writeLong(merch.getMeso());
}
pw.writeInt(263);
pw.writeMapleAsciiString(merch.getDescription());
pw.write(16);
pw.writeLong(merch.getMeso());
pw.write(merch.getItems().size());
for (MaplePlayerShopItem item : merch.getItems()) {
pw.writeShort(item.bundles);
pw.writeShort(item.item.getQuantity());
pw.writeLong(item.price);
PacketHelper.addItemInfo(pw, item.item);
}
pw.writeShort(0);
return pw.getPacket();
}
示例2: getHiredMerch
import server.stores.AbstractPlayerStore.BoughtItem; //导入依赖的package包/类
public static byte[] getHiredMerch(MapleCharacter chr, HiredMerchant merch, boolean firstTime) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
mplew.write(20);//was11
mplew.write(6);
mplew.write(7);
mplew.writeShort(merch.getVisitorSlot(chr));
mplew.writeInt(merch.getItemId());
mplew.writeMapleAsciiString("Hired Merchant");
for (Pair storechr : merch.getVisitors()) {
mplew.write(((Byte) storechr.left).byteValue());
PacketHelper.addCharLook(mplew, (MapleCharacterLook) storechr.right, false, false);
mplew.writeMapleAsciiString(((MapleCharacter) storechr.right).getName());
mplew.writeShort(((MapleCharacter) storechr.right).getJob());
}
mplew.write(-1);
mplew.writeShort(0);
mplew.writeMapleAsciiString(merch.getOwnerName());
if (merch.isOwner(chr)) {
mplew.writeInt(merch.getTimeLeft());
mplew.write(firstTime ? 1 : 0);
mplew.write(merch.getBoughtItems().size());
for (final BoughtItem SoldItem : merch.getBoughtItems()) {
mplew.writeInt(SoldItem.id);
mplew.writeShort(SoldItem.quantity);
mplew.writeLong(SoldItem.totalPrice);
mplew.writeMapleAsciiString(SoldItem.buyer);
}
mplew.writeLong(merch.getMeso());
}
mplew.writeInt(263);
mplew.writeMapleAsciiString(merch.getDescription());
mplew.write(16);
mplew.writeLong(merch.getMeso());
mplew.write(merch.getItems().size());
for (MaplePlayerShopItem item : merch.getItems()) {
mplew.writeShort(item.bundles);
mplew.writeShort(item.item.getQuantity());
mplew.writeLong(item.price);
PacketHelper.addItemInfo(mplew, item.item);
}
mplew.writeShort(0);
return mplew.getPacket();
}
示例3: getBoughtItems
import server.stores.AbstractPlayerStore.BoughtItem; //导入依赖的package包/类
public List<BoughtItem> getBoughtItems();