summaryrefslogtreecommitdiff
path: root/src/net/ea/playerhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-09 14:54:15 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-09 14:54:15 +0300
commite433cda19d0d1d305a7a069a7930c2c7cf852930 (patch)
tree27abfcc9b4bb1e755b2c66519ad0abbb51219528 /src/net/ea/playerhandler.cpp
parent29c0c9e731694a40a6f2e41c6bdedb4b78e2b952 (diff)
downloadmanaplus-e433cda19d0d1d305a7a069a7930c2c7cf852930.tar.gz
manaplus-e433cda19d0d1d305a7a069a7930c2c7cf852930.tar.bz2
manaplus-e433cda19d0d1d305a7a069a7930c2c7cf852930.tar.xz
manaplus-e433cda19d0d1d305a7a069a7930c2c7cf852930.zip
add new notifications to playerhandler.
Diffstat (limited to 'src/net/ea/playerhandler.cpp')
-rw-r--r--src/net/ea/playerhandler.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 8592b737b..b19121a00 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -25,6 +25,7 @@
#include "game.h"
#include "localplayer.h"
#include "party.h"
+#include "notifymanager.h"
#include "units.h"
#include "gui/ministatuswindow.h"
@@ -456,13 +457,13 @@ void PlayerHandler::processPlayerStatUpdate2(Net::MessageIn &msg)
const int newMoney = msg.readInt32();
if (newMoney > oldMoney)
{
- SERVER_NOTICE(strprintf(_("You picked up %s."),
- Units::formatCurrency(newMoney - oldMoney).c_str()))
+ NotifyManager::notify(NotifyManager::MONEY_GET,
+ Units::formatCurrency(newMoney - oldMoney));
}
else if (newMoney < oldMoney)
{
- SERVER_NOTICE(strprintf(_("You spent %s."),
- Units::formatCurrency(oldMoney - newMoney).c_str()))
+ NotifyManager::notify(NotifyManager::MONEY_SPENT,
+ Units::formatCurrency(oldMoney - newMoney).c_str());
}
PlayerInfo::setAttribute(PlayerInfo::MONEY, newMoney);
@@ -505,7 +506,7 @@ void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg)
int points = PlayerInfo::getAttribute(PlayerInfo::CHAR_POINTS);
points += oldValue - value;
PlayerInfo::setAttribute(PlayerInfo::CHAR_POINTS, points);
- SERVER_NOTICE(_("Cannot raise skill!"))
+ NotifyManager::notify(NotifyManager::SKILL_RAISE_ERROR);
}
PlayerInfo::setStatBase(type, value);
@@ -623,7 +624,7 @@ void PlayerHandler::processPlayerArrowMessage(Net::MessageIn &msg)
switch (type)
{
case 0:
- SERVER_NOTICE(_("Equip arrows first."))
+ NotifyManager::notify(NotifyManager::ARROWS_EQUIP_NEEDED);
break;
case 3:
// arrows equiped