diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-16 14:00:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-16 14:00:46 +0300 |
commit | 719eb7581f940c31ae731d420b16b7cd4dc638ae (patch) | |
tree | 3054c10c46020e40706ae66e0dd44e79282bc9be /src/net | |
parent | 65a5155d584c7c41bbcd767b4b7b6722b6ea4f23 (diff) | |
download | manaverse-719eb7581f940c31ae731d420b16b7cd4dc638ae.tar.gz manaverse-719eb7581f940c31ae731d420b16b7cd4dc638ae.tar.bz2 manaverse-719eb7581f940c31ae731d420b16b7cd4dc638ae.tar.xz manaverse-719eb7581f940c31ae731d420b16b7cd4dc638ae.zip |
eathena: add pactial support for packet SMSG_BANK_STATUS 0x09a6.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/eathena/bankhandler.cpp | 11 | ||||
-rw-r--r-- | src/net/eathena/bankhandler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 2 |
4 files changed, 17 insertions, 1 deletions
diff --git a/src/net/eathena/bankhandler.cpp b/src/net/eathena/bankhandler.cpp index bc393faa1..7b4d849dd 100644 --- a/src/net/eathena/bankhandler.cpp +++ b/src/net/eathena/bankhandler.cpp @@ -39,6 +39,7 @@ BankHandler::BankHandler() : { static const uint16_t _messages[] = { + SMSG_BANK_STATUS, 0 }; handledMessages = _messages; @@ -49,6 +50,10 @@ void BankHandler::handleMessage(Net::MessageIn &msg) { switch (msg.getId()) { + case SMSG_BANK_STATUS: + processBankStatus(msg); + break; + default: break; } @@ -74,4 +79,10 @@ void BankHandler::check() const outMsg.writeInt32(0, "account id"); } +void BankHandler::processBankStatus(Net::MessageIn &msg) +{ + msg.readInt64("money"); + msg.readInt16("reason"); +} + } // namespace EAthena diff --git a/src/net/eathena/bankhandler.h b/src/net/eathena/bankhandler.h index bd5e81edd..025b5209c 100644 --- a/src/net/eathena/bankhandler.h +++ b/src/net/eathena/bankhandler.h @@ -44,6 +44,9 @@ class BankHandler final : public MessageHandler, void withdraw(const int money) const override final; void check() const override final; + + protected: + void processBankStatus(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index b9c928b5e..3e520a979 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -249,7 +249,7 @@ int16_t packet_lengths[] = // #0x0980 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, -1, -1, 0, 0, -1, -1, 0, 0, 11, 9, 8, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // #0x09C0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index a7108e777..a11e5239e 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -216,6 +216,8 @@ #define SMSG_PET_MESSAGE 0x01aa +#define SMSG_BANK_STATUS 0x09a6 + /********************************** * Packets from client to server * **********************************/ |