diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-30 00:54:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-30 00:54:38 +0300 |
commit | 5b64623aa85d9272cd3b5eb62c2e7d7f08f08ffb (patch) | |
tree | 153d3b175a2229163e55f5b722dcd1c670827c95 | |
parent | 880f6190ba4d5902d7e08f6d03ad1d91dedec15e (diff) | |
download | manaplus-5b64623aa85d9272cd3b5eb62c2e7d7f08f08ffb.tar.gz manaplus-5b64623aa85d9272cd3b5eb62c2e7d7f08f08ffb.tar.bz2 manaplus-5b64623aa85d9272cd3b5eb62c2e7d7f08f08ffb.tar.xz manaplus-5b64623aa85d9272cd3b5eb62c2e7d7f08f08ffb.zip |
eathena: add partial support for packets SMSG_BANK_DEPOSIT 0x09a8
and SMSG_BANK_WITHDRAW 0x09aa.
-rw-r--r-- | src/net/eathena/bankhandler.cpp | 24 | ||||
-rw-r--r-- | src/net/eathena/bankhandler.h | 4 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 2 |
3 files changed, 30 insertions, 0 deletions
diff --git a/src/net/eathena/bankhandler.cpp b/src/net/eathena/bankhandler.cpp index 79562c515..0df1734ba 100644 --- a/src/net/eathena/bankhandler.cpp +++ b/src/net/eathena/bankhandler.cpp @@ -36,6 +36,8 @@ BankHandler::BankHandler() : static const uint16_t _messages[] = { SMSG_BANK_STATUS, + SMSG_BANK_DEPOSIT, + SMSG_BANK_WITHDRAW, 0 }; handledMessages = _messages; @@ -50,6 +52,14 @@ void BankHandler::handleMessage(Net::MessageIn &msg) processBankStatus(msg); break; + case SMSG_BANK_DEPOSIT: + processBankDeposit(msg); + break; + + case SMSG_BANK_WITHDRAW: + processBankWithdraw(msg); + break; + default: break; } @@ -81,4 +91,18 @@ void BankHandler::processBankStatus(Net::MessageIn &msg) msg.readInt16("reason"); } +void BankHandler::processBankDeposit(Net::MessageIn &msg) +{ + msg.readInt16("reason"); + msg.readInt64("money"); + msg.readInt32("balance"); +} + +void BankHandler::processBankWithdraw(Net::MessageIn &msg) +{ + msg.readInt16("reason"); + msg.readInt64("money"); + msg.readInt32("balance"); +} + } // namespace EAthena diff --git a/src/net/eathena/bankhandler.h b/src/net/eathena/bankhandler.h index 2957caf9c..193f7ea0b 100644 --- a/src/net/eathena/bankhandler.h +++ b/src/net/eathena/bankhandler.h @@ -45,6 +45,10 @@ class BankHandler final : public MessageHandler, protected: void processBankStatus(Net::MessageIn &msg); + + void processBankDeposit(Net::MessageIn &msg); + + void processBankWithdraw(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 562489397..c5b4d5c0d 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -233,6 +233,8 @@ #define SMSG_PET_FOOD 0x01a3 #define SMSG_BANK_STATUS 0x09a6 +#define SMSG_BANK_DEPOSIT 0x09a8 +#define SMSG_BANK_WITHDRAW 0x09aa #define SMSG_SOLVE_CHAR_NAME 0x0194 #define SMSG_SKILL_CASTING 0x07fb |