summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-07 13:26:24 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-07 13:26:24 +0300
commitd73c56f5d0495ffc2758b8057207d304c827dc3e (patch)
treeb8c9780f3565548b569a27a23023247fcaf84ff4
parenta39151db799a49eac2ae0588f99a6cad23b914c3 (diff)
downloadmanaverse-d73c56f5d0495ffc2758b8057207d304c827dc3e.tar.gz
manaverse-d73c56f5d0495ffc2758b8057207d304c827dc3e.tar.bz2
manaverse-d73c56f5d0495ffc2758b8057207d304c827dc3e.tar.xz
manaverse-d73c56f5d0495ffc2758b8057207d304c827dc3e.zip
eathena: add partial support for packet SMSG_VENDING_BUY_ACK 0x0135.
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/eathena/vendinghandler.cpp12
-rw-r--r--src/net/eathena/vendinghandler.h2
3 files changed, 15 insertions, 0 deletions
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 0ee9e2bf0..33a5322fe 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -310,6 +310,7 @@
#define SMSG_VENDING_SHOW_BOARD 0x0131
#define SMSG_VENDING_HIDE_BOARD 0x0132
#define SMSG_VENDING_ITEMS_LIST 0x0800
+#define SMSG_VENDING_BUY_ACK 0x0135
#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 10ced1a07..e342ccea8 100644
--- a/src/net/eathena/vendinghandler.cpp
+++ b/src/net/eathena/vendinghandler.cpp
@@ -38,6 +38,7 @@ VendingHandler::VendingHandler() :
SMSG_VENDING_SHOW_BOARD,
SMSG_VENDING_HIDE_BOARD,
SMSG_VENDING_ITEMS_LIST,
+ SMSG_VENDING_BUY_ACK,
0
};
handledMessages = _messages;
@@ -64,6 +65,10 @@ void VendingHandler::handleMessage(Net::MessageIn &msg)
processItemsList(msg);
break;
+ case SMSG_VENDING_BUY_ACK:
+ processBuyAck(msg);
+ break;
+
default:
break;
}
@@ -103,4 +108,11 @@ void VendingHandler::processItemsList(Net::MessageIn &msg)
}
}
+void VendingHandler::processBuyAck(Net::MessageIn &msg)
+{
+ msg.readInt16("inv index");
+ msg.readInt16("amount");
+ msg.readUInt8("flag");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/vendinghandler.h b/src/net/eathena/vendinghandler.h
index 27c8ef937..a5b17d5fb 100644
--- a/src/net/eathena/vendinghandler.h
+++ b/src/net/eathena/vendinghandler.h
@@ -45,6 +45,8 @@ class VendingHandler final : public MessageHandler,
static void processHideBoard(Net::MessageIn &msg);
static void processItemsList(Net::MessageIn &msg);
+
+ static void processBuyAck(Net::MessageIn &msg);
};
} // namespace EAthena