summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-16 14:00:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-16 14:00:46 +0300
commit719eb7581f940c31ae731d420b16b7cd4dc638ae (patch)
tree3054c10c46020e40706ae66e0dd44e79282bc9be /src
parent65a5155d584c7c41bbcd767b4b7b6722b6ea4f23 (diff)
downloadplus-719eb7581f940c31ae731d420b16b7cd4dc638ae.tar.gz
plus-719eb7581f940c31ae731d420b16b7cd4dc638ae.tar.bz2
plus-719eb7581f940c31ae731d420b16b7cd4dc638ae.tar.xz
plus-719eb7581f940c31ae731d420b16b7cd4dc638ae.zip
eathena: add pactial support for packet SMSG_BANK_STATUS 0x09a6.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/bankhandler.cpp11
-rw-r--r--src/net/eathena/bankhandler.h3
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h2
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 *
**********************************/