summaryrefslogtreecommitdiff
path: root/src/net/ea/tradehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-14 22:44:37 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-14 22:44:37 +0300
commite1841e31c606f1d97ea54c3f00f3380db814f3d2 (patch)
treefa9c9b178fe5ba9ca931e67332aef016efa95145 /src/net/ea/tradehandler.cpp
parent72938b640199d03d6092366224d3927d5d2a33b9 (diff)
downloadmanaverse-e1841e31c606f1d97ea54c3f00f3380db814f3d2.tar.gz
manaverse-e1841e31c606f1d97ea54c3f00f3380db814f3d2.tar.bz2
manaverse-e1841e31c606f1d97ea54c3f00f3380db814f3d2.tar.xz
manaverse-e1841e31c606f1d97ea54c3f00f3380db814f3d2.zip
Rename readInt8 into readUInt8 because it really read uint8_t.
Diffstat (limited to 'src/net/ea/tradehandler.cpp')
-rw-r--r--src/net/ea/tradehandler.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index b328086fc..0d0fd05da 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -128,7 +128,7 @@ void TradeHandler::processTradeResponse(Net::MessageIn &msg) const
return;
}
- switch (msg.readInt8())
+ switch (msg.readUInt8())
{
case 0: // Too far away
NotifyManager::notify(NotifyTypes::TRADE_FAIL_FAR_AWAY,
@@ -181,10 +181,10 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg)
{
const int amount = msg.readInt32();
const int type = msg.readInt16();
- const int identify = msg.readInt8(); // identified flag
- msg.readInt8(); // attribute
- const int refine = msg.readInt8(); // refine
- msg.skip(8); // card (4 shorts)
+ const uint8_t identify = msg.readUInt8(); // identified flag
+ msg.readUInt8(); // attribute
+ const int refine = msg.readUInt8(); // refine
+ msg.skip(8); // card (4 shorts)
if (tradeWindow)
{
@@ -194,8 +194,8 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg)
}
else
{
- tradeWindow->addItem2(type, false, amount, refine,
- static_cast<unsigned char>(identify), false);
+ tradeWindow->addItem2(type, false, amount,
+ refine, identify, false);
}
}
}
@@ -216,7 +216,7 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg)
}
const int quantity = msg.readInt16();
- const int res = msg.readInt8();
+ const uint8_t res = msg.readUInt8();
switch (res)
{
case 0:
@@ -254,9 +254,9 @@ void TradeHandler::processTradeOk(Net::MessageIn &msg)
{
// 0 means ok from myself, 1 means ok from other;
if (tradeWindow)
- tradeWindow->receivedOk(msg.readInt8() == 0);
+ tradeWindow->receivedOk(msg.readUInt8() == 0U);
else
- msg.readInt8();
+ msg.readUInt8();
}
void TradeHandler::processTradeCancel(Net::MessageIn &msg A_UNUSED)