summaryrefslogtreecommitdiff
path: root/src/net/manaserv/tradehandler.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-07-17 23:10:05 -0600
committerJared Adams <jaxad0127@gmail.com>2010-07-18 11:45:33 -0600
commit81d8168bb5796ccb1704bcce9f5327c35e55d281 (patch)
tree3e7e111eb956757f49579bb4366c24c94712387d /src/net/manaserv/tradehandler.cpp
parent2ae96bdc5517b2147662f19ff6d700657c0d0d42 (diff)
downloadmana-81d8168bb5796ccb1704bcce9f5327c35e55d281.tar.gz
mana-81d8168bb5796ccb1704bcce9f5327c35e55d281.tar.bz2
mana-81d8168bb5796ccb1704bcce9f5327c35e55d281.tar.xz
mana-81d8168bb5796ccb1704bcce9f5327c35e55d281.zip
Move more from LocalPlayer to PlayerInfo
Also cleanup PlayerInfo a bit. Reviewed-by: Chuck Miller
Diffstat (limited to 'src/net/manaserv/tradehandler.cpp')
-rw-r--r--src/net/manaserv/tradehandler.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/net/manaserv/tradehandler.cpp b/src/net/manaserv/tradehandler.cpp
index b6169ac9..d5505075 100644
--- a/src/net/manaserv/tradehandler.cpp
+++ b/src/net/manaserv/tradehandler.cpp
@@ -24,6 +24,7 @@
#include "actorspritemanager.h"
#include "item.h"
#include "localplayer.h"
+#include "playerinfo.h"
#include "gui/confirmdialog.h"
#include "gui/trade.h"
@@ -110,7 +111,7 @@ void TradeHandler::handleMessage(Net::MessageIn &msg)
respond(false);
break;
}
- player_node->setTrading(true);
+ PlayerInfo::setTrading(true);
tradePartnerName = being->getName();
tradePartnerID = being->getId();
ConfirmDialog *dlg = new ConfirmDialog(_("Request for Trade"),
@@ -149,14 +150,14 @@ void TradeHandler::handleMessage(Net::MessageIn &msg)
localChatTab->chatLog(_("Trade canceled."), BY_SERVER);
tradeWindow->setVisible(false);
tradeWindow->reset();
- player_node->setTrading(false);
+ PlayerInfo::setTrading(false);
break;
case GPMSG_TRADE_COMPLETE:
localChatTab->chatLog(_("Trade completed."), BY_SERVER);
tradeWindow->setVisible(false);
tradeWindow->reset();
- player_node->setTrading(false);
+ PlayerInfo::setTrading(false);
break;
}
}
@@ -177,7 +178,7 @@ void TradeHandler::respond(bool accept)
gameServerConnection->send(msg);
if (!accept)
- player_node->setTrading(false);
+ PlayerInfo::setTrading(false);
}
void TradeHandler::addItem(Item *item, int amount)