summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-18 15:30:43 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-18 15:30:43 +0300
commitd18d370956e6f58970c7f828b79dbf86525949ea (patch)
tree156a3f9e842affe124bb3a3a2cb6cc3d8d1cfa7d
parent485cf3ed0a92beddfbff839d3603ff1f2a98f805 (diff)
downloadmv-d18d370956e6f58970c7f828b79dbf86525949ea.tar.gz
mv-d18d370956e6f58970c7f828b79dbf86525949ea.tar.bz2
mv-d18d370956e6f58970c7f828b79dbf86525949ea.tar.xz
mv-d18d370956e6f58970c7f828b79dbf86525949ea.zip
eathena: add partial support for packet SMSG_VENDING_OPEN_STATUS 0x0a28.
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/eathena/vendinghandler.cpp12
-rw-r--r--src/net/eathena/vendinghandler.h2
4 files changed, 16 insertions, 1 deletions
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index b5d286ee7..ebf630506 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -261,7 +261,7 @@ int16_t packet_lengths[] =
// #0x0A00
269, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 7,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// #0x0A40
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index dccaf107c..25d38396e 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -405,6 +405,7 @@
#define SMSG_VENDING_ITEMS_LIST 0x0800
#define SMSG_VENDING_BUY_ACK 0x0135
#define SMSG_VENDING_OPEN 0x0136
+#define SMSG_VENDING_OPEN_STATUS 0x0a28
#define SMSG_VENDING_REPORT 0x0137
#define SMSG_ELEMENTAL_UPDATE_STATUS 0x081e
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp
index 079dde1e2..27a43200f 100644
--- a/src/net/eathena/vendinghandler.cpp
+++ b/src/net/eathena/vendinghandler.cpp
@@ -59,6 +59,8 @@ VendingHandler::VendingHandler() :
SMSG_VENDING_ITEMS_LIST,
SMSG_VENDING_BUY_ACK,
SMSG_VENDING_OPEN,
+ SMSG_VENDING_REPORT,
+ SMSG_VENDING_OPEN_STATUS,
0
};
handledMessages = _messages;
@@ -98,6 +100,10 @@ void VendingHandler::handleMessage(Net::MessageIn &msg)
processReport(msg);
break;
+ case SMSG_VENDING_OPEN_STATUS:
+ processOpenStatus(msg);
+ break;
+
default:
break;
}
@@ -198,6 +204,12 @@ void VendingHandler::processReport(Net::MessageIn &msg)
msg.readInt16("amount");
}
+void VendingHandler::processOpenStatus(Net::MessageIn &msg)
+{
+ UNIMPLIMENTEDPACKET;
+ msg.readUInt8("result");
+}
+
void VendingHandler::close() const
{
createOutPacket(CMSG_VENDING_CLOSE);
diff --git a/src/net/eathena/vendinghandler.h b/src/net/eathena/vendinghandler.h
index ba7059071..5fb9a3ef5 100644
--- a/src/net/eathena/vendinghandler.h
+++ b/src/net/eathena/vendinghandler.h
@@ -71,6 +71,8 @@ class VendingHandler final : public MessageHandler,
static void processReport(Net::MessageIn &msg);
+ static void processOpenStatus(Net::MessageIn &msg);
+
static BuyDialog *mBuyDialog;
};