summaryrefslogtreecommitdiff
path: root/src/net/eathena/bankhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/bankhandler.cpp')
-rw-r--r--src/net/eathena/bankhandler.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/net/eathena/bankhandler.cpp b/src/net/eathena/bankhandler.cpp
index 99d5cf9e9..7eb3961b1 100644
--- a/src/net/eathena/bankhandler.cpp
+++ b/src/net/eathena/bankhandler.cpp
@@ -20,11 +20,15 @@
#include "net/eathena/bankhandler.h"
+#include "notifymanager.h"
+
#include "listeners/banklistener.h"
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
+#include "resources/notifytypes.h"
+
#include "debug.h"
extern Net::BankHandler *bankHandler;
@@ -96,18 +100,22 @@ void BankHandler::processBankStatus(Net::MessageIn &msg)
void BankHandler::processBankDeposit(Net::MessageIn &msg)
{
- msg.readInt16("reason");
+ const int reason = msg.readInt16("reason");
const int money = static_cast<int>(msg.readInt64("money"));
msg.readInt32("balance");
BankListener::distributeEvent(money);
+ if (reason)
+ NotifyManager::notify(NotifyTypes::BANK_DEPOSIT_FAILED);
}
void BankHandler::processBankWithdraw(Net::MessageIn &msg)
{
- msg.readInt16("reason");
+ const int reason = msg.readInt16("reason");
const int money = static_cast<int>(msg.readInt64("money"));
msg.readInt32("balance");
BankListener::distributeEvent(money);
+ if (reason)
+ NotifyManager::notify(NotifyTypes::BANK_WITHDRAW_FAILED);
}
} // namespace EAthena