diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-09 00:32:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-09 00:32:28 +0300 |
commit | 0aca242db52695fa0804ac180fc7961b281b422a (patch) | |
tree | 8592405060b32827d0412c25f9c5bd742eb6bd57 /src/notifymanager.cpp | |
parent | a36ef7797d382c62f02be97976d564418029d24c (diff) | |
download | manaplus-0aca242db52695fa0804ac180fc7961b281b422a.tar.gz manaplus-0aca242db52695fa0804ac180fc7961b281b422a.tar.bz2 manaplus-0aca242db52695fa0804ac180fc7961b281b422a.tar.xz manaplus-0aca242db52695fa0804ac180fc7961b281b422a.zip |
Add new notifications to gamehandler.
Diffstat (limited to 'src/notifymanager.cpp')
-rw-r--r-- | src/notifymanager.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/notifymanager.cpp b/src/notifymanager.cpp index 616082b04..2dae7d280 100644 --- a/src/notifymanager.cpp +++ b/src/notifymanager.cpp @@ -30,7 +30,23 @@ namespace NotifyManager { if (message >= TYPE_END || !localChatTab) return; - localChatTab->chatLog(gettext(notifications[message].text), - BY_SERVER); + const NotificationInfo &info = notifications[message]; + if (info.flags == EMPTY) + { + localChatTab->chatLog(gettext(info.text), + BY_SERVER); + } + } + + void notify(const unsigned int message, const int num) + { + if (message >= TYPE_END || !localChatTab) + return; + const NotificationInfo &info = notifications[message]; + if (info.flags == INT) + { + localChatTab->chatLog(strprintf(gettext(info.text), + num), BY_SERVER); + } } } |