summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/buysellhandler.cpp4
-rw-r--r--src/net/eathena/inventoryhandler.cpp24
-rw-r--r--src/net/eathena/markethandler.cpp4
-rw-r--r--src/net/eathena/tradehandler.cpp9
4 files changed, 21 insertions, 20 deletions
diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp
index d4f7dfbaa..9f879e53b 100644
--- a/src/net/eathena/buysellhandler.cpp
+++ b/src/net/eathena/buysellhandler.cpp
@@ -99,10 +99,10 @@ void BuySellHandler::processNpcBuy(Net::MessageIn &msg)
{
const int value = msg.readInt32("price");
msg.readInt32("dc value?");
- msg.readUInt8("type");
+ const int type = msg.readUInt8("type");
const int itemId = msg.readInt16("item id");
const unsigned char color = 1;
- mBuyDialog->addItem(itemId, color, 0, value);
+ mBuyDialog->addItem(itemId, type, color, 0, value);
}
mBuyDialog->sort();
}
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 0623bfd54..0a5f49966 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -328,7 +328,7 @@ void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg)
{
const int index = msg.readInt16("index") - INVENTORY_OFFSET;
const int itemId = msg.readInt16("item id");
- msg.readUInt8("item type");
+ const int itemType = msg.readUInt8("item type");
msg.readInt32("location");
const int equipType = msg.readInt32("wear state");
const uint8_t refine = static_cast<uint8_t>(msg.readInt8("refine"));
@@ -342,7 +342,7 @@ void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg)
flags.byte = msg.readUInt8("flags");
if (inventory)
{
- inventory->setItem(index, itemId, 1, refine,
+ inventory->setItem(index, itemId, itemType, 1, refine,
1, flags.bits.isIdentified, flags.bits.isDamaged,
flags.bits.isFavorite,
true, false);
@@ -377,7 +377,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg)
for (int f = 0; f < 4; f++)
cards[f] = msg.readInt16("card");
const int equipType = msg.readInt32("location");
- msg.readUInt8("item type");
+ const int itemType = msg.readUInt8("item type");
const unsigned char err = msg.readUInt8("result");
msg.readInt32("hire expire date");
msg.readInt16("bind on equip");
@@ -440,7 +440,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg)
if (item && item->getId() == itemId)
amount += item->getQuantity();
- inventory->setItem(index, itemId, amount, refine,
+ inventory->setItem(index, itemId, itemType, amount, refine,
1, identified != 0, damaged != 0, false,
equipType != 0, false);
inventory->setCards(index, cards, 4);
@@ -473,7 +473,7 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg)
{
const int index = msg.readInt16("item index") - INVENTORY_OFFSET;
const int itemId = msg.readInt16("item id");
- msg.readUInt8("item type");
+ const int itemType = msg.readUInt8("item type");
const int amount = msg.readInt16("count");
msg.readInt32("wear state / equip");
int cards[4];
@@ -485,7 +485,7 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg)
if (inventory)
{
- inventory->setItem(index, itemId, amount,
+ inventory->setItem(index, itemId, itemType, amount,
0, 1, flags.bits.isIdentified,
flags.bits.isDamaged, flags.bits.isFavorite,
false, false);
@@ -509,7 +509,7 @@ void InventoryHandler::processPlayerStorage(Net::MessageIn &msg)
{
const int index = msg.readInt16("item index") - STORAGE_OFFSET;
const int itemId = msg.readInt16("item id");
- msg.readUInt8("item type");
+ const int itemType = msg.readUInt8("item type");
const int amount = msg.readInt16("count");
msg.readInt32("wear state / equip");
int cards[4];
@@ -519,7 +519,7 @@ void InventoryHandler::processPlayerStorage(Net::MessageIn &msg)
ItemFlags flags;
flags.byte = msg.readUInt8("flags");
- mInventoryItems.push_back(Ea::InventoryItem(index, itemId,
+ mInventoryItems.push_back(Ea::InventoryItem(index, itemId, itemType,
cards, amount, 0, 1, flags.bits.isIdentified,
flags.bits.isDamaged, flags.bits.isFavorite, false));
}
@@ -603,7 +603,7 @@ void InventoryHandler::processPlayerStorageEquip(Net::MessageIn &msg)
{
const int index = msg.readInt16("index") - STORAGE_OFFSET;
const int itemId = msg.readInt16("item id");
- msg.readUInt8("item type");
+ const int itemType = msg.readUInt8("item type");
const int amount = 1;
msg.readInt32("location");
msg.readInt32("wear state");
@@ -617,7 +617,7 @@ void InventoryHandler::processPlayerStorageEquip(Net::MessageIn &msg)
ItemFlags flags;
flags.byte = msg.readUInt8("flags");
- mInventoryItems.push_back(Ea::InventoryItem(index, itemId,
+ mInventoryItems.push_back(Ea::InventoryItem(index, itemId, itemType,
cards, amount, refine, 1, flags.bits.isIdentified,
flags.bits.isDamaged, flags.bits.isFavorite, false));
}
@@ -631,7 +631,7 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg)
const int index = msg.readInt16("index") - STORAGE_OFFSET;
const int amount = msg.readInt32("amount");
const int itemId = msg.readInt16("item id");
- msg.readUInt8("type");
+ const int itemType = msg.readUInt8("type");
const unsigned char identified = msg.readUInt8("identify");
msg.readUInt8("attribute");
const uint8_t refine = msg.readUInt8("refine");
@@ -648,7 +648,7 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg)
{
if (mStorage)
{
- mStorage->setItem(index, itemId, amount,
+ mStorage->setItem(index, itemId, itemType, amount,
refine, 1, identified != 0, false, false, false, false);
mStorage->setCards(index, cards, 4);
}
diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp
index fbd0e0987..d7ceeabe4 100644
--- a/src/net/eathena/markethandler.cpp
+++ b/src/net/eathena/markethandler.cpp
@@ -82,12 +82,12 @@ void MarketHandler::processMarketOpen(Net::MessageIn &msg)
for (int f = 0; f < len; f ++)
{
const int itemId = msg.readInt16("item id");
- msg.readUInt8("type");
+ const int type = msg.readUInt8("type");
const int value = msg.readInt32("price");
const int amount = msg.readInt32("amount");
msg.readInt16("view");
const unsigned char color = 1;
- mBuyDialog->addItem(itemId, color, amount, value);
+ mBuyDialog->addItem(itemId, type, color, amount, value);
}
}
diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp
index 88bcceb10..457bb0fe4 100644
--- a/src/net/eathena/tradehandler.cpp
+++ b/src/net/eathena/tradehandler.cpp
@@ -184,7 +184,7 @@ void TradeHandler::processTradeResponse(Net::MessageIn &msg)
void TradeHandler::processTradeItemAdd(Net::MessageIn &msg)
{
const int type = msg.readInt16("type");
- msg.readUInt8("item type");
+ const int itemType = msg.readUInt8("item type");
const int amount = msg.readInt32("amount");
const uint8_t identify = msg.readUInt8("identify");
msg.readUInt8("attribute");
@@ -201,10 +201,11 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg)
}
else
{
- tradeWindow->addItem2(type,
+ tradeWindow->addItem2(type, itemType,
cards, 4,
false, amount,
- refine, 1, identify != 0, false, false, false);
+ refine, 1, identify != 0,
+ false, false, false);
}
}
}
@@ -224,7 +225,7 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg)
return;
if (tradeWindow)
{
- tradeWindow->addItem2(item->getId(),
+ tradeWindow->addItem2(item->getId(), item->getType(),
item->getCards(), 4,
true, mQuantity, item->getRefine(), item->getColor(),
item->getIdentified(), item->getDamaged(),