summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-08 22:25:23 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-08 23:44:33 +0300
commit6328313a6d8a76b4d38a82f6f4dcef350c695704 (patch)
treefd2aba6ed0af90547f0805b335a461bda555a170 /src/net
parentdcd0d2e4d8a827d06a10344855d8d044bd26630d (diff)
downloadplus-6328313a6d8a76b4d38a82f6f4dcef350c695704.tar.gz
plus-6328313a6d8a76b4d38a82f6f4dcef350c695704.tar.bz2
plus-6328313a6d8a76b4d38a82f6f4dcef350c695704.tar.xz
plus-6328313a6d8a76b4d38a82f6f4dcef350c695704.zip
Impliment notify manager.
Move buy/sell notifications to NotifyManager.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/buysellhandler.cpp8
-rw-r--r--src/net/eathena/buysellhandler.cpp10
-rw-r--r--src/net/tmwa/buysellhandler.cpp10
3 files changed, 14 insertions, 14 deletions
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp
index 1b24c6b42..2838f8351 100644
--- a/src/net/ea/buysellhandler.cpp
+++ b/src/net/ea/buysellhandler.cpp
@@ -25,9 +25,9 @@
#include "actorspritemanager.h"
#include "client.h"
#include "configuration.h"
-#include "depricatedevent.h"
#include "inventory.h"
#include "localplayer.h"
+#include "notifymanager.h"
#include "playerinfo.h"
#include "gui/buydialog.h"
@@ -160,7 +160,7 @@ void BuySellHandler::processNpcSell(Net::MessageIn &msg, int offset)
}
else
{
- SERVER_NOTICE(_("Nothing to sell."))
+ NotifyManager::notify(NotifyManager::SELL_LIST_EMPTY);
}
}
@@ -168,7 +168,7 @@ void BuySellHandler::processNpcBuyResponse(Net::MessageIn &msg)
{
if (msg.readInt8() == 0)
{
- SERVER_NOTICE(_("Thanks for buying."))
+ NotifyManager::notify(NotifyManager::BUY_DONE);
}
else
{
@@ -176,7 +176,7 @@ void BuySellHandler::processNpcBuyResponse(Net::MessageIn &msg)
// would go fine
if (mBuyDialog)
mBuyDialog->setMoney(PlayerInfo::getAttribute(PlayerInfo::MONEY));
- SERVER_NOTICE(_("Unable to buy."))
+ NotifyManager::notify(NotifyManager::BUY_FAILED);
}
}
diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp
index 4214a76f0..3e81304b0 100644
--- a/src/net/eathena/buysellhandler.cpp
+++ b/src/net/eathena/buysellhandler.cpp
@@ -24,9 +24,9 @@
#include "actorspritemanager.h"
#include "configuration.h"
-#include "depricatedevent.h"
#include "inventory.h"
#include "localplayer.h"
+#include "notifymanager.h"
#include "playerinfo.h"
#include "gui/buydialog.h"
@@ -124,17 +124,17 @@ void BuySellHandler::processNpcSellResponse(Net::MessageIn &msg)
switch (msg.readInt8())
{
case 0:
- SERVER_NOTICE(_("Thanks for selling."))
+ NotifyManager::notify(NotifyManager::SOLD);
break;
case 1:
default:
- SERVER_NOTICE(_("Unable to sell."))
+ NotifyManager::notify(NotifyManager::SELL_FAILED);
break;
case 2:
- SERVER_NOTICE(_("Unable to sell while trading."))
+ NotifyManager::notify(NotifyManager::SELL_TRADE_FAILED);
break;
case 3:
- SERVER_NOTICE(_("Unable to sell unsellable item."))
+ NotifyManager::notify(NotifyManager::SELL_UNSELLABLE_FAILED);
break;
}
}
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index 00cb16231..997a6220c 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -24,9 +24,9 @@
#include "actorspritemanager.h"
#include "configuration.h"
-#include "depricatedevent.h"
#include "inventory.h"
#include "localplayer.h"
+#include "notifymanager.h"
#include "playerinfo.h"
#include "gui/buydialog.h"
@@ -130,17 +130,17 @@ void BuySellHandler::processNpcSellResponse(Net::MessageIn &msg)
switch (msg.readInt8())
{
case 0:
- SERVER_NOTICE(_("Thanks for selling."))
+ NotifyManager::notify(NotifyManager::SOLD);
break;
case 1:
default:
- SERVER_NOTICE(_("Unable to sell."))
+ NotifyManager::notify(NotifyManager::SELL_FAILED);
break;
case 2:
- SERVER_NOTICE(_("Unable to sell while trading."))
+ NotifyManager::notify(NotifyManager::SELL_TRADE_FAILED);
break;
case 3:
- SERVER_NOTICE(_("Unable to sell unsellable item."))
+ NotifyManager::notify(NotifyManager::SELL_UNSELLABLE_FAILED);
break;
}
}