42 static const uint16_t _messages[] = {
65 int npcId = being->
getId(), count = 0;
66 Event *
event =
nullptr;
72 event->setInt(
"id", npcId);
78 event->setInt(
"choiceCount", count);
84 event->setInt(
"id", npcId);
87 event->setInt(
"default", msg.
readInt32());
93 event->setInt(
"id", npcId);
99 event->setInt(
"id", npcId);
105 event->setInt(
"id", npcId);
111 event->setInt(
"id", npcId);
117 event->setInt(
"id", npcId);
123 event->setInt(
"id", npcId);
216 const std::string &text)
ActorSpriteManager * actorSpriteManager
Being * findBeing(int id) const
Returns a specific Being, by id;.
Type getType() const final
Returns the type of the ActorSprite.
void send(const ManaServ::MessageOut &msg)
Sends a message.
Used for parsing an incoming message from manaserv.
uint16_t readInt16()
Reads an unsigned 16-bit integer from the message.
unsigned int getUnreadLength() const
Returns the length of unread data.
std::string readString(int length=-1)
Reads a string.
uint16_t getId() const
Returns the message ID.
uint32_t readInt32()
Reads an unsigned 32-bit integer from the message.
Used for building an outgoing message to manaserv.
void writeInt16(uint16_t value)
Writes an unsigned 16-bit integer to the message.
void writeInt32(uint32_t value)
Writes an unsigned 32-bit integer to the message.
void writeInt8(uint8_t value)
Writes an unsigned 8-bit integer to the message.
void writeString(const std::string &string, int length=-1)
Writes a string.
void sell(int beingId) override
void sendLetter(int npcId, const std::string &recipient, const std::string &text) override
void endShopping(int beingId) override
void handleMessage(MessageIn &msg) override
void buy(int beingId) override
void closeDialog(int npcId) override
void startShopping(int beingId) override
void integerInput(int npcId, int value) override
void stringInput(int npcId, const std::string &value) override
void buyItem(int beingId, int itemId, int amount) override
void menuSelect(int npcId, int choice) override
void sellItem(int beingId, int itemId, int amount) override
void nextDialog(int npcId) override
void talk(int npcId) override
const uint16_t * handledMessages
Net::NpcHandler * npcHandler
Connection * gameServerConnection
@ GPMSG_NPC_BUYSELL_RESPONSE
std::string toString(const T &arg)
Converts the given value to a string using std::stringstream.