summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-14 23:43:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-14 23:43:54 +0300
commit15a79eee1b3baa91953daf33dc021a1e7c147365 (patch)
tree21fc078237a8c635308c1e84e0bba869918ba3d5 /src/net/ea
parente1841e31c606f1d97ea54c3f00f3380db814f3d2 (diff)
downloadManaVerse-15a79eee1b3baa91953daf33dc021a1e7c147365.tar.gz
ManaVerse-15a79eee1b3baa91953daf33dc021a1e7c147365.tar.bz2
ManaVerse-15a79eee1b3baa91953daf33dc021a1e7c147365.tar.xz
ManaVerse-15a79eee1b3baa91953daf33dc021a1e7c147365.zip
Change refine type to uint8_t.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/inventoryhandler.cpp10
-rw-r--r--src/net/ea/inventoryitem.h4
-rw-r--r--src/net/ea/tradehandler.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index 6788784b2..2b2d1cc9e 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -267,10 +267,10 @@ void InventoryHandler::processPlayerStorageEquip(Net::MessageIn &msg)
if (mDebugInventory)
{
logger->log("Index: %d, ID: %d, Type: %d, Identified: %d, "
- "Qty: %d, Cards: %d, %d, %d, %d, Refine: %d",
- index, itemId, itemType, identified, amount,
- cards[0], cards[1], cards[2], cards[3],
- refine);
+ "Qty: %d, Cards: %d, %d, %d, %d, Refine: %u",
+ index, itemId, itemType,
+ static_cast<unsigned int>(identified), amount,
+ cards[0], cards[1], cards[2], cards[3], refine);
}
if (serverVersion < 1 && identified > 1U)
@@ -299,7 +299,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg)
const int itemId = msg.readInt16();
uint8_t identified = msg.readUInt8();
msg.readUInt8(); // attribute
- const int refine = msg.readUInt8();
+ const uint8_t refine = msg.readUInt8();
for (int i = 0; i < 4; i++)
msg.readInt16(); // cards[i]
const int equipType = msg.readInt16();
diff --git a/src/net/ea/inventoryitem.h b/src/net/ea/inventoryitem.h
index 2b8ac502a..f46ff48be 100644
--- a/src/net/ea/inventoryitem.h
+++ b/src/net/ea/inventoryitem.h
@@ -35,12 +35,12 @@ class InventoryItem final
int slot;
int id;
int quantity;
- int refine;
+ uint8_t refine;
unsigned char color;
bool equip;
InventoryItem(const int slot0, const int id0, const int quantity0,
- const int refine0, const unsigned char color0,
+ const uint8_t refine0, const unsigned char color0,
const bool equip0) :
slot(slot0),
id(id0),
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index 0d0fd05da..d6715d4f6 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -183,7 +183,7 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg)
const int type = msg.readInt16();
const uint8_t identify = msg.readUInt8(); // identified flag
msg.readUInt8(); // attribute
- const int refine = msg.readUInt8(); // refine
+ const uint8_t refine = msg.readUInt8(); // refine
msg.skip(8); // card (4 shorts)
if (tradeWindow)