diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-01-17 20:55:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-01-17 20:55:15 +0300 |
commit | 5457eedde5d9ce286817b523f38074cb75caeb85 (patch) | |
tree | 56147a21cdc930b188f1715424486f5f8efb0511 /src | |
parent | 1bf9b4e88e6e398d0f7e8b88ea78757e88aecfcd (diff) | |
download | plus-5457eedde5d9ce286817b523f38074cb75caeb85.tar.gz plus-5457eedde5d9ce286817b523f38074cb75caeb85.tar.bz2 plus-5457eedde5d9ce286817b523f38074cb75caeb85.tar.xz plus-5457eedde5d9ce286817b523f38074cb75caeb85.zip |
Show error message if bank check action failed.
Diffstat (limited to 'src')
-rw-r--r-- | src/enums/resources/notifytypes.h | 1 | ||||
-rw-r--r-- | src/net/eathena/bankrecv.cpp | 4 | ||||
-rw-r--r-- | src/resources/notifications.h | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/enums/resources/notifytypes.h b/src/enums/resources/notifytypes.h index 20a177259..d0b599409 100644 --- a/src/enums/resources/notifytypes.h +++ b/src/enums/resources/notifytypes.h @@ -124,6 +124,7 @@ namespace NotifyTypes HOMUNCULUS_FEED_FAIL, CARD_INSERT_FAILED, CARD_INSERT_SUCCESS, + BANK_CHECK_FAILED, BANK_DEPOSIT_FAILED, BANK_WITHDRAW_FAILED, BUYING_STORE_CREATE_FAILED, diff --git a/src/net/eathena/bankrecv.cpp b/src/net/eathena/bankrecv.cpp index 859978077..1f6abc85a 100644 --- a/src/net/eathena/bankrecv.cpp +++ b/src/net/eathena/bankrecv.cpp @@ -38,8 +38,10 @@ namespace EAthena void BankRecv::processBankStatus(Net::MessageIn &msg) { const int money = CAST_S32(msg.readInt64("money")); - msg.readInt16("reason"); + const int reason = msg.readInt16("reason"); BankListener::distributeEvent(money); + if (reason != 0) + NotifyManager::notify(NotifyTypes::BANK_CHECK_FAILED); } void BankRecv::processBankDeposit(Net::MessageIn &msg) diff --git a/src/resources/notifications.h b/src/resources/notifications.h index f17758a85..760817190 100644 --- a/src/resources/notifications.h +++ b/src/resources/notifications.h @@ -419,6 +419,10 @@ namespace NotifyManager // TRANSLATORS: notification message N_("Card inserted."), NotifyFlags::EMPTY}, + {"bank check failed", + // TRANSLATORS: notification message + N_("Bank check failed. Bank probably disabled."), + NotifyFlags::EMPTY}, {"bank deposit failed", // TRANSLATORS: notification message N_("Deposit failed. You probably don't have this " |