summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-13 21:07:52 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-13 21:07:52 +0300
commita515a9c9f6f1a6f7a0d94e0ceba5ed52c69902bb (patch)
treefb07bb55e2d630172b847238718f6d4ade596cbe
parent259c2b3803bcf1dd16759b6adad7ac9006c36f09 (diff)
downloadplus-a515a9c9f6f1a6f7a0d94e0ceba5ed52c69902bb.tar.gz
plus-a515a9c9f6f1a6f7a0d94e0ceba5ed52c69902bb.tar.bz2
plus-a515a9c9f6f1a6f7a0d94e0ceba5ed52c69902bb.tar.xz
plus-a515a9c9f6f1a6f7a0d94e0ceba5ed52c69902bb.zip
eathena: show correct message if item cant be used because not left delay.
-rw-r--r--src/net/eathena/chathandler.cpp5
-rw-r--r--src/resources/notifications.h4
-rw-r--r--src/resources/notifytypes.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 7461f8bd8..1ff0e9035 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -470,6 +470,11 @@ void ChatHandler::processFormatMessageNumber(Net::MessageIn &msg)
{
int msgId = msg.readInt16("msg id");
int value = msg.readInt32("value");
+ if (msgId == 1862)
+ {
+ NotifyManager::notify(NotifyTypes::USE_ITEM_WAIT, value);
+ return;
+ }
// +++ here need load message from configuration file
const std::string chatMsg = strprintf(
"Message #%d, value: %d", msgId, value);
diff --git a/src/resources/notifications.h b/src/resources/notifications.h
index 5f3eeb5d5..9ca406712 100644
--- a/src/resources/notifications.h
+++ b/src/resources/notifications.h
@@ -563,6 +563,10 @@ namespace NotifyManager
// TRANSLATORS: notification message
N_("Room join failed. Wrong race."),
NotifyFlags::EMPTY},
+ {"chat room error race",
+ // TRANSLATORS: notification message
+ N_("Left %d seconds until you can use item."),
+ NotifyFlags::INT},
};
} // namespace NotifyManager
#endif // RESOURCES_NOTIFICATIONS_H
diff --git a/src/resources/notifytypes.h b/src/resources/notifytypes.h
index 0b1a9285b..d698734e2 100644
--- a/src/resources/notifytypes.h
+++ b/src/resources/notifytypes.h
@@ -159,6 +159,7 @@ namespace NotifyTypes
ROOM_ERROR_LOW_LEVEL,
ROOM_ERROR_HIGH_LEVEL,
ROOM_ERROR_RACE,
+ USE_ITEM_WAIT,
TYPE_END
};