62 const int16_t result =
msg.readInt16(
"result");
63 const int weight =
msg.readInt32(
"weight");
83 const int count = (
msg.readInt16(
"len") - 12) / (7 +
itemIdLen);
84 msg.readBeingId(
"account id");
85 msg.readInt32(
"money limit");
86 for (
int f = 0; f < count; f ++)
88 msg.readInt32(
"price");
89 msg.readInt16(
"amount");
90 msg.readUInt8(
"item type");
91 msg.readItemId(
"item id");
101 const BeingId id =
msg.readBeingId(
"owner id");
103 if (dstBeing !=
nullptr)
109 msg.readString(80,
"shop name");
117 const BeingId id =
msg.readBeingId(
"owner id");
119 if (dstBeing !=
nullptr)
132 const int count = (
msg.readInt16(
"len") - 16) / (7 +
itemIdLen);
133 const BeingId id =
msg.readBeingId(
"account id");
134 const int storeId =
msg.readInt32(
"store id");
136 msg.readInt32(
"money limit");
139 if (dstBeing ==
nullptr)
147 for (
int f = 0; f < count; f ++)
149 const int price =
msg.readInt32(
"price");
150 const int amount =
msg.readInt16(
"amount");
152 msg.readUInt8(
"item type"));
153 const int itemId =
msg.readItemId(
"item id");
167 const int16_t result =
msg.readInt16(
"result");
185 const int16_t result =
msg.readInt16(
"result");
186 msg.readItemId(
"item id");
211 msg.readItemId(
"item id");
212 msg.readInt16(
"amount");
213 if (
msg.getVersion() >= 20141016)
215 msg.readInt32(
"money");
216 msg.readInt32(
"money limit");
217 msg.readInt32(
"char id");
218 msg.readInt32(
"date");
222 msg.readInt32(
"money limit");
232 const int amount =
msg.readInt16(
"amount");
233 msg.readInt32(
"price");
235 if (inventory !=
nullptr)
239 item->increaseQuantity(-amount);
240 if (item->getQuantity() == 0)
ActorManager * actorManager
Being * findBeing(const BeingId id) const
static void distributeEvent()
void setBuyBoard(const std::string &text)
static void distributeEvent(const bool b)
static void distributeEvent(const int slots)
void removeItemAt(const int index)
Item * getItem(const int index) const
Item * findItem(const int itemId, const ItemColor color) const
void addItem(const Item *const item, const int price)
void setMoney(const int amount)
static const int INVENTORY_OFFSET
const ItemColor ItemColor_one
LocalPlayer * localPlayer
#define UNIMPLEMENTEDPACKET
bool msg(InputEvent &event)
void processBuyingStoreCreateFailed(Net::MessageIn &msg)
void processBuyingStoreSellFailed(Net::MessageIn &msg)
void processBuyingStoreOwnItems(Net::MessageIn &msg)
void processBuyingStoreDeleteItem(Net::MessageIn &msg)
void processBuyingStoreSellerSellFailed(Net::MessageIn &msg)
void processBuyingStoreItemsList(Net::MessageIn &msg)
void processBuyingStoreShowBoard(Net::MessageIn &msg)
void processBuyingStoreReport(Net::MessageIn &msg)
void processBuyingStoreHideBoard(Net::MessageIn &msg)
void processBuyingStoreOpen(Net::MessageIn &msg)
void notify(const unsigned int message)
@ BUYING_STORE_SELLER_SELL_FAILED_BALANCE
@ BUYING_STORE_SELLER_SELL_FAILED_DEAL
@ BUYING_STORE_SELL_FAILED_EMPTY
@ BUYING_STORE_CREATE_EMPTY
@ BUYING_STORE_SELL_FAILED
@ BUYING_STORE_SELL_FAILED_MONEY_LIMIT
@ BUYING_STORE_CREATE_FAILED_WEIGHT
@ BUYING_STORE_SELLER_SELL_FAILED
@ BUYING_STORE_CREATE_FAILED
@ BUYING_STORE_SELLER_SELL_FAILED_AMOUNT
Inventory * getInventory()
void enableVending(const bool b)
int32_t getAttribute(const AttributesT id)