diff options
-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 * **********************************/ |