From 793ef9a791108d4940fca7f4158dbd4cacee96f2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 11 Dec 2012 02:07:30 +0300 Subject: Show trade partner nick in trading errors. --- src/net/ea/tradehandler.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/net/ea') diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp index 32ddcfb98..946019251 100644 --- a/src/net/ea/tradehandler.cpp +++ b/src/net/ea/tradehandler.cpp @@ -131,12 +131,12 @@ void TradeHandler::processTradeResponse(Net::MessageIn &msg) switch (msg.readInt8()) { case 0: // Too far away - SERVER_NOTICE(_("Trading isn't possible. Trade " - "partner is too far away.")) + SERVER_NOTICE(strprintf(_("Trading with %s isn't possible." + " Trade partner is too far away."), tradePartnerName.c_str())) break; case 1: // Character doesn't exist - SERVER_NOTICE(_("Trading isn't possible. Character " - "doesn't exist.")) + SERVER_NOTICE(strprintf(_("Trading with %s isn't possible." + " Character doesn't exist."), tradePartnerName.c_str())) break; case 2: // Invite request check failed... SERVER_NOTICE(_("Trade cancelled due to an unknown reason.")) @@ -156,7 +156,7 @@ void TradeHandler::processTradeResponse(Net::MessageIn &msg) PlayerRelation::SPEECH_LOG)) { SERVER_NOTICE(strprintf(_("Trade with %s cancelled."), - tradePartnerName.c_str())) + tradePartnerName.c_str())) } // otherwise ignore silently @@ -168,7 +168,8 @@ void TradeHandler::processTradeResponse(Net::MessageIn &msg) PlayerInfo::setTrading(false); break; default: // Shouldn't happen as well, but to be sure - SERVER_NOTICE(_("Unhandled trade cancel packet.")) + SERVER_NOTICE(strprintf(_("Unhandled trade cancel packet with %s"), + tradePartnerName.c_str())) if (tradeWindow) tradeWindow->clear(); break; -- cgit v1.2.3-70-g09d2