From e433cda19d0d1d305a7a069a7930c2c7cf852930 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 9 Mar 2013 14:54:15 +0300 Subject: add new notifications to playerhandler. --- src/net/ea/playerhandler.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/net/ea/playerhandler.cpp') 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 -- cgit v1.2.3-60-g2f50