From ef0bd75596f6e30375c9a9ddb62318d165b62b31 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 7 Jan 2015 12:17:47 +0300 Subject: eathena: add partial support for packet SMSG_VENDING_SHOW_BOARD 0x0131. --- src/net/eathena/protocol.h | 1 + src/net/eathena/vendinghandler.cpp | 11 +++++++++++ src/net/eathena/vendinghandler.h | 2 ++ 3 files changed, 14 insertions(+) diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index af63e4ea9..0f0a1a6ec 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -307,6 +307,7 @@ #define SMSG_AUCTION_CLOSE 0x025d #define SMSG_VENDING_OPEN_REQ 0x012d +#define SMSG_VENDING_SHOW_BOARD 0x0131 #define SMSG_ELEMENTAL_UPDATE_STATUS 0x081e #define SMSG_ELEMENTAL_INFO 0x081d diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp index d38f2d102..8605cbe98 100644 --- a/src/net/eathena/vendinghandler.cpp +++ b/src/net/eathena/vendinghandler.cpp @@ -35,6 +35,7 @@ VendingHandler::VendingHandler() : static const uint16_t _messages[] = { SMSG_VENDING_OPEN_REQ, + SMSG_VENDING_SHOW_BOARD, 0 }; handledMessages = _messages; @@ -49,6 +50,10 @@ void VendingHandler::handleMessage(Net::MessageIn &msg) processOpenReq(msg); break; + case SMSG_VENDING_SHOW_BOARD: + processShowBoard(msg); + break; + default: break; } @@ -59,4 +64,10 @@ void VendingHandler::processOpenReq(Net::MessageIn &msg) msg.readInt16("slots allowed"); } +void VendingHandler::processShowBoard(Net::MessageIn &msg) +{ + msg.readInt32("owner id"); + msg.readString(80, "shop name"); +} + } // namespace EAthena diff --git a/src/net/eathena/vendinghandler.h b/src/net/eathena/vendinghandler.h index fbd9b4481..ee84cf79c 100644 --- a/src/net/eathena/vendinghandler.h +++ b/src/net/eathena/vendinghandler.h @@ -39,6 +39,8 @@ class VendingHandler final : public MessageHandler, protected: static void processOpenReq(Net::MessageIn &msg); + + static void processShowBoard(Net::MessageIn &msg); }; } // namespace EAthena -- cgit v1.2.3-70-g09d2