44 static const Uint16 _messages[] = {
76 for (
int k = 0; k < n_items; k++)
94 for (
int k = 0; k < n_items; k++)
96 int index = msg.
readInt16() - INVENTORY_OFFSET;
103 dialog->addItem(item, value);
void addItem(int id, int amount, int price)
Adds an item to the shop inventory.
void setMoney(int amount)
Sets the amount of available money.
A dialog to choose between buying or selling at a shop.
Item * getItem(int index) const
Returns the item at the specified index.
Represents one or more instances of a certain item type.
bool isEquipped() const
Returns whether this item is equipped.
const uint16_t * handledMessages
void handleMessage(MessageIn &msg) override
Used for parsing an incoming message from eAthena.
uint16_t readInt16()
Reads an unsigned 16-bit integer from the message.
uint8_t readInt8()
Reads an unsigned 8-bit integer from the message.
uint16_t getId() const
Returns the message ID.
uint32_t readInt32()
Reads an unsigned 32-bit integer from the message.
unsigned int getLength() const
Returns the message length.
void serverNotice(const std::string &message)
Inventory * getInventory()
Returns the player's inventory.
BuySellState getBuySellState()
Returns the current buy, sell, or related interaction the player is involved in.
int getAttribute(int id)
Returns the value of the given attribute.
Warning: buffers and other variables are shared, so there can be only one connection active at a time...
@ SMSG_NPC_BUY_SELL_CHOICE