summaryrefslogtreecommitdiff
path: root/src/net/eathena/inventoryrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-13 22:53:57 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-13 22:53:57 +0300
commit9f8da99f6b6266a7456d3be4d38880a3bd761932 (patch)
tree96aeb55b21dcdd6389f7b1caf47a3628b29a7df7 /src/net/eathena/inventoryrecv.cpp
parent546d5180247512270a2ccd114266fb36cd426e61 (diff)
downloadmv-9f8da99f6b6266a7456d3be4d38880a3bd761932.tar.gz
mv-9f8da99f6b6266a7456d3be4d38880a3bd761932.tar.bz2
mv-9f8da99f6b6266a7456d3be4d38880a3bd761932.tar.xz
mv-9f8da99f6b6266a7456d3be4d38880a3bd761932.zip
Add into network code function readUInt16. Also fix reading cards id.
Diffstat (limited to 'src/net/eathena/inventoryrecv.cpp')
-rw-r--r--src/net/eathena/inventoryrecv.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp
index 5ba7a81b3..dea3a411f 100644
--- a/src/net/eathena/inventoryrecv.cpp
+++ b/src/net/eathena/inventoryrecv.cpp
@@ -149,7 +149,7 @@ void InventoryRecv::processPlayerEquipment(Net::MessageIn &msg)
const uint8_t refine = CAST_U8(msg.readInt8("refine"));
int cards[maxCards];
for (int f = 0; f < maxCards; f++)
- cards[f] = msg.readInt16("card");
+ cards[f] = msg.readUInt16("card");
if (msg.getVersion() >= 20071002)
msg.readInt32("hire expire date (?)");
if (msg.getVersion() >= 20080102)
@@ -218,7 +218,7 @@ void InventoryRecv::processPlayerInventoryAdd(Net::MessageIn &msg)
const uint8_t refine = msg.readUInt8("refine");
int cards[maxCards];
for (int f = 0; f < maxCards; f++)
- cards[f] = msg.readInt16("card");
+ cards[f] = msg.readUInt16("card");
int equipType;
if (msg.getVersion() >= 20120925)
equipType = msg.readInt32("location");
@@ -374,7 +374,7 @@ void InventoryRecv::processPlayerInventory(Net::MessageIn &msg)
if (packetVersion >= 5)
{
for (int f = 0; f < maxCards; f++)
- cards[f] = msg.readInt16("card");
+ cards[f] = msg.readUInt16("card");
}
else
{
@@ -453,7 +453,7 @@ void InventoryRecv::processPlayerStorage(Net::MessageIn &msg)
if (msg.getVersion() >= 5)
{
for (int f = 0; f < maxCards; f++)
- cards[f] = msg.readInt16("card");
+ cards[f] = msg.readUInt16("card");
}
else
{
@@ -659,7 +659,7 @@ void InventoryRecv::processPlayerStorageEquip(Net::MessageIn &msg)
const uint8_t refine = msg.readUInt8("refine level");
int cards[maxCards];
for (int f = 0; f < maxCards; f++)
- cards[f] = msg.readInt16("card");
+ cards[f] = msg.readUInt16("card");
if (msg.getVersion() >= 20071002)
msg.readInt32("hire expire date");
if (msg.getVersion() >= 20080102)
@@ -717,7 +717,7 @@ void InventoryRecv::processPlayerStorageAdd(Net::MessageIn &msg)
const uint8_t refine = msg.readUInt8("refine");
int cards[maxCards];
for (int f = 0; f < maxCards; f++)
- cards[f] = msg.readInt16("card");
+ cards[f] = msg.readUInt16("card");
if ((serverVersion >= 8 || serverVersion == 0) &&
msg.getVersion() >= 20150226)
{
@@ -924,7 +924,7 @@ void InventoryRecv::processPlayerCartAdd(Net::MessageIn &msg)
const uint8_t refine = msg.readUInt8("refine");
int cards[maxCards];
for (int f = 0; f < maxCards; f++)
- cards[f] = msg.readInt16("card");
+ cards[f] = msg.readUInt16("card");
if ((serverVersion >= 8 || serverVersion == 0) &&
msg.getVersion() >= 20150226)
{
@@ -1016,7 +1016,7 @@ void InventoryRecv::processPlayerCartEquip(Net::MessageIn &msg)
const uint8_t refine = msg.readUInt8("refine level");
int cards[maxCards];
for (int f = 0; f < maxCards; f++)
- cards[f] = msg.readInt16("card");
+ cards[f] = msg.readUInt16("card");
if (msg.getVersion() >= 20071002)
msg.readInt32("hire expire date");
if (msg.getVersion() >= 20080102)
@@ -1088,7 +1088,7 @@ void InventoryRecv::processPlayerCartItems(Net::MessageIn &msg)
if (msg.getVersion() >= 5)
{
for (int f = 0; f < maxCards; f++)
- cards[f] = msg.readInt16("card");
+ cards[f] = msg.readUInt16("card");
}
else
{
@@ -1205,7 +1205,7 @@ void InventoryRecv::processPlayerRepairList(Net::MessageIn &msg)
msg.readInt16("item id");
msg.readUInt8("refine");
for (int d = 0; d < maxCards; d ++)
- msg.readInt16("card");
+ msg.readUInt16("card");
}
menu = MenuType::RepairWespon;
}
@@ -1230,7 +1230,7 @@ void InventoryRecv::processPlayerRefineList(Net::MessageIn &msg)
msg.readInt16("item id");
msg.readUInt8("refine");
for (int d = 0; d < maxCards; d ++)
- msg.readInt16("card");
+ msg.readUInt16("card");
}
menu = MenuType::WeaponeRefine;
}