diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-07 15:34:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-07 15:34:58 +0300 |
commit | 64ed5cd18dca0d5eb08302d552a09f03d9ceeb10 (patch) | |
tree | b608836a222dc7af4c5d9e4da0af01717ca28b12 /src | |
parent | 9f37c6e32dedd9b91aae09038de5e3fa1ab84513 (diff) | |
download | plus-64ed5cd18dca0d5eb08302d552a09f03d9ceeb10.tar.gz plus-64ed5cd18dca0d5eb08302d552a09f03d9ceeb10.tar.bz2 plus-64ed5cd18dca0d5eb08302d552a09f03d9ceeb10.tar.xz plus-64ed5cd18dca0d5eb08302d552a09f03d9ceeb10.zip |
eathena: add packet CMSG_VENDING_BUY2 0x0801.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/protocol.h | 1 | ||||
-rw-r--r-- | src/net/eathena/vendinghandler.cpp | 16 | ||||
-rw-r--r-- | src/net/eathena/vendinghandler.h | 5 | ||||
-rw-r--r-- | src/net/tmwa/vendinghandler.cpp | 7 | ||||
-rw-r--r-- | src/net/tmwa/vendinghandler.h | 5 | ||||
-rw-r--r-- | src/net/vendinghandler.h | 5 |
6 files changed, 39 insertions, 0 deletions
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index f10ec6163..61c8661ad 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -536,5 +536,6 @@ #define CMSG_VENDING_CLOSE 0x012e #define CMSG_VENDING_LIST_REQ 0x0130 #define CMSG_VENDING_BUY 0x0134 +#define CMSG_VENDING_BUY2 0x0801 #endif // NET_EATHENA_PROTOCOL_H diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp index e16e26fd8..e01040055 100644 --- a/src/net/eathena/vendinghandler.cpp +++ b/src/net/eathena/vendinghandler.cpp @@ -182,4 +182,20 @@ void VendingHandler::buy(const Being *const being, outMsg.writeInt16(index, "index"); } +void VendingHandler::buy2(const Being *const being, + const int vendId, + const int index, + const int amount) const +{ + if (!being) + return; + + createOutPacket(CMSG_VENDING_BUY2); + outMsg.writeInt16(16, "len"); + outMsg.writeInt32(being->getId(), "account id"); + outMsg.writeInt32(vendId, "vend id"); + outMsg.writeInt16(amount, "amount"); + outMsg.writeInt16(index, "index"); +} + } // namespace EAthena diff --git a/src/net/eathena/vendinghandler.h b/src/net/eathena/vendinghandler.h index ef18f4ce2..e14ca0596 100644 --- a/src/net/eathena/vendinghandler.h +++ b/src/net/eathena/vendinghandler.h @@ -45,6 +45,11 @@ class VendingHandler final : public MessageHandler, const int index, const int amount) const override final; + void buy2(const Being *const being, + const int vendId, + const int index, + const int amount) const override final; + protected: static void processOpenReq(Net::MessageIn &msg); diff --git a/src/net/tmwa/vendinghandler.cpp b/src/net/tmwa/vendinghandler.cpp index b638ba6ee..deff011ca 100644 --- a/src/net/tmwa/vendinghandler.cpp +++ b/src/net/tmwa/vendinghandler.cpp @@ -56,4 +56,11 @@ void VendingHandler::buy(const Being *const being A_UNUSED, { } +void VendingHandler::buy2(const Being *const being A_UNUSED, + const int vendId A_UNUSED, + const int index A_UNUSED, + const int amount A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/vendinghandler.h b/src/net/tmwa/vendinghandler.h index fee23c0be..f23e8276c 100644 --- a/src/net/tmwa/vendinghandler.h +++ b/src/net/tmwa/vendinghandler.h @@ -45,6 +45,11 @@ class VendingHandler final : public MessageHandler, void buy(const Being *const being, const int index, const int amount) const override final; + + void buy2(const Being *const being, + const int vendId, + const int index, + const int amount) const override final; }; } // namespace TmwAthena diff --git a/src/net/vendinghandler.h b/src/net/vendinghandler.h index af8f39acc..c8eed3bd3 100644 --- a/src/net/vendinghandler.h +++ b/src/net/vendinghandler.h @@ -43,6 +43,11 @@ class VendingHandler notfinal virtual void buy(const Being *const being, const int index, const int amount) const = 0; + + virtual void buy2(const Being *const being, + const int vendId, + const int index, + const int amount) const = 0; }; } // namespace Net |