62 const int amount)
const
70 int cnt = nonStack ? amount : 1;
71 const int amount2 = nonStack ? 1 : amount;
76 outMsg.writeInt16(
CAST_S16(4 + 6 * cnt),
"len");
77 for (
int f = 0; f < cnt; f ++)
79 outMsg.writeItemId(itemId,
"item id");
80 outMsg.writeInt32(
CAST_S16(amount2),
"amount");
89 const int pairSize = 6;
91 FOR_EACH (STD_VECTOR<ShopItem*>::const_iterator, it, items)
96 if (usedQuantity == 0)
115 outMsg.writeInt16(
CAST_S16(4 + pairSize * cnt),
"len");
116 FOR_EACH (STD_VECTOR<ShopItem*>::const_iterator, it, items)
120 if (usedQuantity == 0)
131 for (
int f = 0; f < usedQuantity; f ++)
133 outMsg.writeItemId(item->
getId(),
135 outMsg.writeInt32(
CAST_S16(1),
"amount");
140 outMsg.writeItemId(item->
getId(),
142 outMsg.writeInt32(
CAST_S16(usedQuantity),
"amount");
void buyItem(const int itemId, const ItemTypeT type, const ItemColor color, const int amount) const
void buyItems(const std::vector< ShopItem * > &items) const
ItemTypeT getType() const
void increaseQuantity(const int amount)
void increaseUsedQuantity(const int amount)
int getUsedQuantity() const
#define FOR_EACH(type, iter, array)
Net::MarketHandler * marketHandler
#define createOutPacket(name)