summaryrefslogtreecommitdiff
path: root/src/net/eathena/vendinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-02 20:58:41 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-02 20:58:41 +0300
commit84d2bab38202cd52b5eb0a37c12204ab6f607915 (patch)
tree2f3951b2f4f3b75f190eb2539979cc4afbace27c /src/net/eathena/vendinghandler.cpp
parent40730c4fa73d403cf7284a76d9b26f7ec662afa4 (diff)
downloadmv-84d2bab38202cd52b5eb0a37c12204ab6f607915.tar.gz
mv-84d2bab38202cd52b5eb0a37c12204ab6f607915.tar.bz2
mv-84d2bab38202cd52b5eb0a37c12204ab6f607915.tar.xz
mv-84d2bab38202cd52b5eb0a37c12204ab6f607915.zip
Remove MessageHandler class
Diffstat (limited to 'src/net/eathena/vendinghandler.cpp')
-rw-r--r--src/net/eathena/vendinghandler.cpp59
1 files changed, 3 insertions, 56 deletions
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp
index 5d0724f12..d8a3f72b7 100644
--- a/src/net/eathena/vendinghandler.cpp
+++ b/src/net/eathena/vendinghandler.cpp
@@ -34,6 +34,8 @@
#include "listeners/vendingmodelistener.h"
#include "listeners/vendingslotslistener.h"
+#include "net/messagein.h"
+
#include "net/ea/eaprotocol.h"
#include "net/eathena/messageout.h"
@@ -47,67 +49,12 @@ extern Net::VendingHandler *vendingHandler;
namespace EAthena
{
-VendingHandler::VendingHandler() :
- MessageHandler()
+VendingHandler::VendingHandler()
{
- static const uint16_t _messages[] =
- {
- SMSG_VENDING_OPEN_REQ,
- SMSG_VENDING_SHOW_BOARD,
- SMSG_VENDING_HIDE_BOARD,
- SMSG_VENDING_ITEMS_LIST,
- SMSG_VENDING_BUY_ACK,
- SMSG_VENDING_OPEN,
- SMSG_VENDING_REPORT,
- SMSG_VENDING_OPEN_STATUS,
- 0
- };
- handledMessages = _messages;
vendingHandler = this;
VendingRecv::mBuyDialog = nullptr;
}
-void VendingHandler::handleMessage(Net::MessageIn &msg)
-{
- switch (msg.getId())
- {
- case SMSG_VENDING_OPEN_REQ:
- VendingRecv::processOpenReq(msg);
- break;
-
- case SMSG_VENDING_SHOW_BOARD:
- VendingRecv::processShowBoard(msg);
- break;
-
- case SMSG_VENDING_HIDE_BOARD:
- VendingRecv::processHideBoard(msg);
- break;
-
- case SMSG_VENDING_ITEMS_LIST:
- VendingRecv::processItemsList(msg);
- break;
-
- case SMSG_VENDING_BUY_ACK:
- VendingRecv::processBuyAck(msg);
- break;
-
- case SMSG_VENDING_OPEN:
- VendingRecv::processOpen(msg);
- break;
-
- case SMSG_VENDING_REPORT:
- VendingRecv::processReport(msg);
- break;
-
- case SMSG_VENDING_OPEN_STATUS:
- VendingRecv::processOpenStatus(msg);
- break;
-
- default:
- break;
- }
-}
-
void VendingHandler::close() const
{
createOutPacket(CMSG_VENDING_CLOSE);