本文整理汇总了Java中server.stores.IMaplePlayerShop.getShopType方法的典型用法代码示例。如果您正苦于以下问题:Java IMaplePlayerShop.getShopType方法的具体用法?Java IMaplePlayerShop.getShopType怎么用?Java IMaplePlayerShop.getShopType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类server.stores.IMaplePlayerShop
的用法示例。
在下文中一共展示了IMaplePlayerShop.getShopType方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shopItemUpdate
import server.stores.IMaplePlayerShop; //导入方法依赖的package包/类
public static final byte[] shopItemUpdate(final IMaplePlayerShop shop) {
final PacketWriter pw = new PacketWriter();
pw.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
pw.write(77);//was50
if (shop.getShopType() == 1) {
pw.writeLong(0L);
}
pw.write(shop.getItems().size());
for (final MaplePlayerShopItem item : shop.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: shopItemUpdate
import server.stores.IMaplePlayerShop; //导入方法依赖的package包/类
public static final byte[] shopItemUpdate(final IMaplePlayerShop shop) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
mplew.write(77);//was50
if (shop.getShopType() == 1) {
mplew.writeLong(0L);
}
mplew.write(shop.getItems().size());
for (final MaplePlayerShopItem item : shop.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: addInteraction
import server.stores.IMaplePlayerShop; //导入方法依赖的package包/类
public static void addInteraction(PacketWriter pw, IMaplePlayerShop shop) {
pw.write(shop.getGameType());
pw.writeInt(((AbstractPlayerStore) shop).getObjectId());
pw.writeMapleAsciiString(shop.getDescription());
if (shop.getShopType() != 1) {
pw.write(shop.getPassword().length() > 0 ? 1 : 0);
}
pw.write(shop.getItemId() % 10);
pw.write(shop.getSize());
pw.write(shop.getMaxSize());
if (shop.getShopType() != 1) {
pw.write(shop.isOpen() ? 0 : 1);
}
}
示例4: addInteraction
import server.stores.IMaplePlayerShop; //导入方法依赖的package包/类
public static void addInteraction(MaplePacketLittleEndianWriter mplew, IMaplePlayerShop shop) {
mplew.write(shop.getGameType());
mplew.writeInt(((AbstractPlayerStore) shop).getObjectId());
mplew.writeMapleAsciiString(shop.getDescription());
if (shop.getShopType() != 1) {
mplew.write(shop.getPassword().length() > 0 ? 1 : 0);
}
mplew.write(shop.getItemId() % 10);
mplew.write(shop.getSize());
mplew.write(shop.getMaxSize());
if (shop.getShopType() != 1) {
mplew.write(shop.isOpen() ? 0 : 1);
}
}
示例5: getPlayerStore
import server.stores.IMaplePlayerShop; //导入方法依赖的package包/类
public static final byte[] getPlayerStore(final MapleCharacter chr, final boolean firstTime) {
final PacketWriter pw = new PacketWriter();
pw.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
IMaplePlayerShop ips = chr.getPlayerShop();
pw.write(11);
switch (ips.getShopType()) {
case 2:
pw.write(4);
pw.write(4);
break;
case 3:
pw.write(2);
pw.write(2);
break;
case 4:
pw.write(1);
pw.write(2);
break;
}
pw.writeShort(ips.getVisitorSlot(chr));
PacketHelper.addCharLook(pw, ((MaplePlayerShop) ips).getMCOwner(), false, false);
pw.writeMapleAsciiString(ips.getOwnerName());
pw.writeShort(((MaplePlayerShop) ips).getMCOwner().getJob());
for (final Pair<Byte, MapleCharacter> storechr : ips.getVisitors()) {
pw.write(storechr.left);
PacketHelper.addCharLook(pw, storechr.right, false, false);
pw.writeMapleAsciiString(storechr.right.getName());
pw.writeShort(storechr.right.getJob());
}
pw.write(255);
pw.writeMapleAsciiString(ips.getDescription());
pw.write(10);
pw.write(ips.getItems().size());
for (final MaplePlayerShopItem item : ips.getItems()) {
pw.writeShort(item.bundles);
pw.writeShort(item.item.getQuantity());
pw.writeInt(item.price);
PacketHelper.addItemInfo(pw, item.item);
}
return pw.getPacket();
}
示例6: getPlayerStore
import server.stores.IMaplePlayerShop; //导入方法依赖的package包/类
public static final byte[] getPlayerStore(final MapleCharacter chr, final boolean firstTime) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
IMaplePlayerShop ips = chr.getPlayerShop();
mplew.write(GameConstants.GMS ? 11 : 5);
switch (ips.getShopType()) {
case 2:
mplew.write(4);
mplew.write(4);
break;
case 3:
mplew.write(2);
mplew.write(2);
break;
case 4:
mplew.write(1);
mplew.write(2);
break;
}
mplew.writeShort(ips.getVisitorSlot(chr));
PacketHelper.addCharLook(mplew, ((MaplePlayerShop) ips).getMCOwner(), false, false);
mplew.writeMapleAsciiString(ips.getOwnerName());
mplew.writeShort(((MaplePlayerShop) ips).getMCOwner().getJob());
for (final Pair<Byte, MapleCharacter> storechr : ips.getVisitors()) {
mplew.write(storechr.left);
PacketHelper.addCharLook(mplew, storechr.right, false, false);
mplew.writeMapleAsciiString(storechr.right.getName());
mplew.writeShort(storechr.right.getJob());
}
mplew.write(255);
mplew.writeMapleAsciiString(ips.getDescription());
mplew.write(10);
mplew.write(ips.getItems().size());
for (final MaplePlayerShopItem item : ips.getItems()) {
mplew.writeShort(item.bundles);
mplew.writeShort(item.item.getQuantity());
mplew.writeInt(item.price);
PacketHelper.addItemInfo(mplew, item.item);
}
return mplew.getPacket();
}