summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-09 15:59:51 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-09 16:15:02 +0300
commit25da12e98285c44279d24ee77a08bd5f563d8ad0 (patch)
tree6f67b770cebe0f76119113c795ee6856af320154 /src
parentd7e0bbcc76bd6548975dfd30a50910d4967cad55 (diff)
downloadplus-25da12e98285c44279d24ee77a08bd5f563d8ad0.tar.gz
plus-25da12e98285c44279d24ee77a08bd5f563d8ad0.tar.bz2
plus-25da12e98285c44279d24ee77a08bd5f563d8ad0.tar.xz
plus-25da12e98285c44279d24ee77a08bd5f563d8ad0.zip
Add new notifications in some other classes.
Diffstat (limited to 'src')
-rw-r--r--src/net/ea/chathandler.cpp24
-rw-r--r--src/net/ea/tradehandler.cpp1
-rw-r--r--src/net/eathena/adminhandler.cpp5
-rw-r--r--src/net/tmwa/adminhandler.cpp5
-rw-r--r--src/notifications.h14
5 files changed, 29 insertions, 20 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index b2c6154b3..9f67bfbcf 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -26,6 +26,7 @@
#include "configuration.h"
#include "guildmanager.h"
#include "localplayer.h"
+#include "notifymanager.h"
#include "playerrelations.h"
#include "gui/chatwindow.h"
@@ -353,14 +354,9 @@ void ChatHandler::processMVP(Net::MessageIn &msg)
{
const Being *const being = actorSpriteManager->findBeing(id);
if (!being)
- {
- localChatTab->chatLog(_("MVP player."), BY_SERVER);
- }
+ NotifyManager::notify(NotifyManager::MVP_PLAYER, "");
else
- {
- localChatTab->chatLog(_("MVP player: ")
- + being->getName(), BY_SERVER);
- }
+ NotifyManager::notify(NotifyManager::MVP_PLAYER, being->getName());
}
}
@@ -378,12 +374,11 @@ void ChatHandler::processIgnoreAllResponse(Net::MessageIn &msg)
switch (fail)
{
case 0:
- localChatTab->chatLog(_("All whispers ignored."),
- BY_SERVER);
+ NotifyManager::notify(NotifyManager::WHISPERS_IGNORED);
break;
default:
- localChatTab->chatLog(_("All whispers ignore failed."),
- BY_SERVER);
+ NotifyManager::notify(NotifyManager::
+ WHISPERS_IGNORE_FAILED);
break;
}
break;
@@ -393,12 +388,11 @@ void ChatHandler::processIgnoreAllResponse(Net::MessageIn &msg)
switch (fail)
{
case 0:
- localChatTab->chatLog(_("All whispers unignored."),
- BY_SERVER);
+ NotifyManager::notify(NotifyManager::WHISPERS_UNIGNORED);
break;
default:
- localChatTab->chatLog(_("All whispers unignore failed."),
- BY_SERVER);
+ NotifyManager::notify(NotifyManager::
+ WHISPERS_UNIGNORE_FAILED);
break;
}
break;
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index 12f29c4e7..3a401349a 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -22,7 +22,6 @@
#include "net/ea/tradehandler.h"
-#include "depricatedevent.h"
#include "inventory.h"
#include "item.h"
#include "logger.h"
diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp
index 0208b46d5..ba9551dc1 100644
--- a/src/net/eathena/adminhandler.cpp
+++ b/src/net/eathena/adminhandler.cpp
@@ -25,6 +25,7 @@
#include "actorspritemanager.h"
#include "depricatedevent.h"
#include "game.h"
+#include "notifymanager.h"
#include "playerrelations.h"
#include "net/chathandler.h"
@@ -63,9 +64,9 @@ void AdminHandler::handleMessage(Net::MessageIn &msg)
case SMSG_ADMIN_KICK_ACK:
id = msg.readInt32();
if (id == 0)
- SERVER_NOTICE(_("Kick failed!"))
+ NotifyManager::notify(NotifyManager::KICK_FAIL);
else
- SERVER_NOTICE(_("Kick succeeded!"))
+ NotifyManager::notify(NotifyManager::KICK_SUCCEED);
default:
break;
}
diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp
index dcb9d10a1..6f356c871 100644
--- a/src/net/tmwa/adminhandler.cpp
+++ b/src/net/tmwa/adminhandler.cpp
@@ -25,6 +25,7 @@
#include "actorspritemanager.h"
#include "depricatedevent.h"
#include "game.h"
+#include "notifymanager.h"
#include "playerrelations.h"
#include "net/chathandler.h"
@@ -63,9 +64,9 @@ void AdminHandler::handleMessage(Net::MessageIn &msg)
case SMSG_ADMIN_KICK_ACK:
id = msg.readInt32();
if (id == 0)
- SERVER_NOTICE(_("Kick failed!"))
+ NotifyManager::notify(NotifyManager::KICK_FAIL);
else
- SERVER_NOTICE(_("Kick succeeded!"))
+ NotifyManager::notify(NotifyManager::KICK_SUCCEED);
default:
break;
}
diff --git a/src/notifications.h b/src/notifications.h
index 41c0734b4..6644d8ffe 100644
--- a/src/notifications.h
+++ b/src/notifications.h
@@ -100,6 +100,13 @@ namespace NotifyManager
TRADE_ADD_ERROR,
TRADE_CANCELLED,
TRADE_COMPLETE,
+ KICK_FAIL,
+ KICK_SUCCEED,
+ MVP_PLAYER,
+ WHISPERS_IGNORED,
+ WHISPERS_IGNORE_FAILED,
+ WHISPERS_UNIGNORED,
+ WHISPERS_UNIGNORE_FAILED,
TYPE_END
};
@@ -163,6 +170,13 @@ namespace NotifyManager
{N_("Failed adding item for unknown reason."), EMPTY},
{N_("Trade canceled."), EMPTY},
{N_("Trade completed."), EMPTY},
+ {N_("Kick failed!"), EMPTY},
+ {N_("Kick succeeded!"), EMPTY},
+ {N_("MVP player: %s"), STRING},
+ {N_("All whispers ignored."), EMPTY},
+ {N_("All whispers ignore failed."), EMPTY},
+ {N_("All whispers unignored."), EMPTY},
+ {N_("All whispers unignore failed."), EMPTY},
};
}
#endif