summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-16 01:04:04 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-16 01:04:04 +0300
commit4b891f50dfc89318321eeac176415d1bef61aca6 (patch)
treef1da78c30374409d4f329faecb7e7b627674cf21 /src/net
parentf8f1e69d820e49d93669b17363ab6225456515f7 (diff)
downloadmanaverse-4b891f50dfc89318321eeac176415d1bef61aca6.tar.gz
manaverse-4b891f50dfc89318321eeac176415d1bef61aca6.tar.bz2
manaverse-4b891f50dfc89318321eeac176415d1bef61aca6.tar.xz
manaverse-4b891f50dfc89318321eeac176415d1bef61aca6.zip
Add bank window (hercules only).
also add banklistener to get changed bank balance.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/bankhandler.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/net/eathena/bankhandler.cpp b/src/net/eathena/bankhandler.cpp
index 0df1734ba..99d5cf9e9 100644
--- a/src/net/eathena/bankhandler.cpp
+++ b/src/net/eathena/bankhandler.cpp
@@ -20,6 +20,8 @@
#include "net/eathena/bankhandler.h"
+#include "listeners/banklistener.h"
+
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
@@ -87,22 +89,25 @@ void BankHandler::check() const
void BankHandler::processBankStatus(Net::MessageIn &msg)
{
- msg.readInt64("money");
+ const int money = static_cast<int>(msg.readInt64("money"));
msg.readInt16("reason");
+ BankListener::distributeEvent(money);
}
void BankHandler::processBankDeposit(Net::MessageIn &msg)
{
msg.readInt16("reason");
- msg.readInt64("money");
+ const int money = static_cast<int>(msg.readInt64("money"));
msg.readInt32("balance");
+ BankListener::distributeEvent(money);
}
void BankHandler::processBankWithdraw(Net::MessageIn &msg)
{
msg.readInt16("reason");
- msg.readInt64("money");
+ const int money = static_cast<int>(msg.readInt64("money"));
msg.readInt32("balance");
+ BankListener::distributeEvent(money);
}
} // namespace EAthena