summaryrefslogtreecommitdiff
path: root/src/net/manaserv/tradehandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/manaserv/tradehandler.cpp')
-rw-r--r--src/net/manaserv/tradehandler.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/net/manaserv/tradehandler.cpp b/src/net/manaserv/tradehandler.cpp
index aa2f9ab5..46664193 100644
--- a/src/net/manaserv/tradehandler.cpp
+++ b/src/net/manaserv/tradehandler.cpp
@@ -25,10 +25,10 @@
#include "net/manaserv/gameserver/player.h"
#include "net/manaserv/connection.h"
+#include "net/manaserv/messagein.h"
+#include "net/manaserv/messageout.h"
#include "net/manaserv/protocol.h"
-#include "net/messagein.h"
-#include "net/messageout.h"
#include "net/net.h"
#include "beingmanager.h"
@@ -56,9 +56,9 @@ namespace {
{
if (event.getId() == "yes")
{
- MessageOut msg(PGMSG_TRADE_REQUEST);
+ ManaServ::MessageOut msg(PGMSG_TRADE_REQUEST);
msg.writeInt16(tradePartnerID);
- Net::GameServer::connection->send(msg);
+ ManaServ::GameServer::connection->send(msg);
}
else
Net::getTradeHandler()->cancel();
@@ -100,7 +100,7 @@ void TradeHandler::setAcceptTradeRequests(bool acceptTradeRequests)
}
}
-void TradeHandler::handleMessage(MessageIn &msg)
+void TradeHandler::handleMessage(Net::MessageIn &msg)
{
switch (msg.getId())
{
@@ -170,13 +170,13 @@ void TradeHandler::request(Being *being)
MessageOut msg(PGMSG_TRADE_REQUEST);
msg.writeInt16(tradePartnerID);
- Net::GameServer::connection->send(msg);
+ GameServer::connection->send(msg);
}
void TradeHandler::respond(bool accept)
{
MessageOut msg(accept ? PGMSG_TRADE_REQUEST : PGMSG_TRADE_CANCEL);
- Net::GameServer::connection->send(msg);
+ GameServer::connection->send(msg);
if (!accept)
player_node->setTrading(false);
@@ -187,7 +187,7 @@ void TradeHandler::addItem(Item *item, int amount)
MessageOut msg(PGMSG_TRADE_ADD_ITEM);
msg.writeInt8(item->getInvIndex());
msg.writeInt8(amount);
- Net::GameServer::connection->send(msg);
+ GameServer::connection->send(msg);
tradeWindow->addItem(item->getId(), true, amount);
item->increaseQuantity(-amount);
@@ -202,25 +202,25 @@ void TradeHandler::setMoney(int amount)
{
MessageOut msg(PGMSG_TRADE_SET_MONEY);
msg.writeInt32(amount);
- Net::GameServer::connection->send(msg);
+ GameServer::connection->send(msg);
}
void TradeHandler::confirm()
{
MessageOut msg(PGMSG_TRADE_CONFIRM);
- Net::GameServer::connection->send(msg);
+ GameServer::connection->send(msg);
}
void TradeHandler::finish()
{
MessageOut msg(PGMSG_TRADE_AGREED);
- Net::GameServer::connection->send(msg);
+ GameServer::connection->send(msg);
}
void TradeHandler::cancel()
{
MessageOut msg(PGMSG_TRADE_CANCEL);
- Net::GameServer::connection->send(msg);
+ GameServer::connection->send(msg);
}
} // namespace ManaServ