diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-24 23:29:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-24 23:29:04 +0300 |
commit | 4e97da8e138b21a5f5bea75e6a8d3211e4f28594 (patch) | |
tree | c10d3cad963066a908ebd42041723e110a0c9bf0 /src/net | |
parent | ca0ca278d0c4aed9a6d50bb9a8982f5261151ab8 (diff) | |
download | plus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.gz plus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.bz2 plus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.tar.xz plus-4e97da8e138b21a5f5bea75e6a8d3211e4f28594.zip |
Add enum for item types.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/inventoryitem.h | 6 | ||||
-rw-r--r-- | src/net/eathena/buyingstorerecv.cpp | 4 | ||||
-rw-r--r-- | src/net/eathena/buysellrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/cashshoprecv.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/inventoryrecv.cpp | 30 | ||||
-rw-r--r-- | src/net/eathena/itemrecv.cpp | 10 | ||||
-rw-r--r-- | src/net/eathena/markethandler.cpp | 25 | ||||
-rw-r--r-- | src/net/eathena/markethandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/marketrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/npchandler.cpp | 18 | ||||
-rw-r--r-- | src/net/eathena/traderecv.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/vendingrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/markethandler.h | 4 | ||||
-rw-r--r-- | src/net/tmwa/buysellrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/inventoryrecv.cpp | 30 | ||||
-rw-r--r-- | src/net/tmwa/itemrecv.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/markethandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/markethandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/traderecv.cpp | 2 |
19 files changed, 100 insertions, 51 deletions
diff --git a/src/net/ea/inventoryitem.h b/src/net/ea/inventoryitem.h index 7971c9584..212ee98dc 100644 --- a/src/net/ea/inventoryitem.h +++ b/src/net/ea/inventoryitem.h @@ -25,6 +25,8 @@ #include "const/resources/item/cards.h" +#include "enums/resources/itemtype.h" + #include "enums/simpletypes/damaged.h" #include "enums/simpletypes/equipm.h" #include "enums/simpletypes/favorite.h" @@ -52,7 +54,7 @@ class InventoryItem final public: int slot; int id; - int type; + ItemTypeT type; int cards[maxCards]; int quantity; uint8_t refine; @@ -64,7 +66,7 @@ class InventoryItem final InventoryItem(const int slot0, const int id0, - const int type0, + const ItemTypeT type0, const int *const cards0, const int quantity0, const uint8_t refine0, diff --git a/src/net/eathena/buyingstorerecv.cpp b/src/net/eathena/buyingstorerecv.cpp index 3596638b6..89a756ad3 100644 --- a/src/net/eathena/buyingstorerecv.cpp +++ b/src/net/eathena/buyingstorerecv.cpp @@ -134,7 +134,9 @@ void BuyingStoreRecv::processBuyingStoreItemsList(Net::MessageIn &msg) { const int price = msg.readInt32("price"); const int amount = msg.readInt16("amount"); - const int itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt( + msg.readUInt8("item type"), + ItemTypeT); const int itemId = msg.readInt16("item id"); if (!inv) diff --git a/src/net/eathena/buysellrecv.cpp b/src/net/eathena/buysellrecv.cpp index e59eb47a7..8fa02d185 100644 --- a/src/net/eathena/buysellrecv.cpp +++ b/src/net/eathena/buysellrecv.cpp @@ -55,7 +55,7 @@ void BuySellRecv::processNpcBuy(Net::MessageIn &msg) { const int value = msg.readInt32("price"); msg.readInt32("dc value?"); - const int type = msg.readUInt8("type"); + const ItemTypeT type = fromInt(msg.readUInt8("type"), ItemTypeT); const int itemId = msg.readInt16("item id"); const ItemColor color = ItemColor_one; Ea::BuySellRecv::mBuyDialog->addItem(itemId, type, color, 0, value); diff --git a/src/net/eathena/cashshoprecv.cpp b/src/net/eathena/cashshoprecv.cpp index 45f48eadc..4da1edcf3 100644 --- a/src/net/eathena/cashshoprecv.cpp +++ b/src/net/eathena/cashshoprecv.cpp @@ -51,7 +51,7 @@ void CashShopRecv::processCashShopOpen(Net::MessageIn &msg) { msg.readInt32("price"); const int value = msg.readInt32("discount price"); - const int type = msg.readUInt8("item type"); + const ItemTypeT type = fromInt(msg.readUInt8("item type"), ItemTypeT); const int itemId = msg.readInt16("item id"); const ItemColor color = ItemColor_one; mBuyDialog->addItem(itemId, type, color, 0, value); diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp index 4d5565d1b..967c74978 100644 --- a/src/net/eathena/inventoryrecv.cpp +++ b/src/net/eathena/inventoryrecv.cpp @@ -127,7 +127,9 @@ void InventoryRecv::processPlayerEquipment(Net::MessageIn &msg) { const int index = msg.readInt16("index") - INVENTORY_OFFSET; const int itemId = msg.readInt16("item id"); - const int itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt( + msg.readUInt8("item type"), + ItemTypeT); msg.readInt32("location"); const int equipType = msg.readInt32("wear state"); const uint8_t refine = CAST_U8(msg.readInt8("refine")); @@ -198,7 +200,7 @@ void InventoryRecv::processPlayerInventoryAdd(Net::MessageIn &msg) for (int f = 0; f < maxCards; f++) cards[f] = msg.readInt16("card"); const int equipType = msg.readInt32("location"); - const int itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt(msg.readUInt8("item type"), ItemTypeT); const unsigned char err = msg.readUInt8("result"); msg.readInt32("hire expire date"); msg.readInt16("bind on equip"); @@ -322,7 +324,9 @@ void InventoryRecv::processPlayerInventory(Net::MessageIn &msg) { const int index = msg.readInt16("item index") - INVENTORY_OFFSET; const int itemId = msg.readInt16("item id"); - const int itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt( + msg.readUInt8("item type"), + ItemType); const int amount = msg.readInt16("count"); msg.readInt32("wear state / equip"); int cards[maxCards]; @@ -365,7 +369,9 @@ void InventoryRecv::processPlayerStorage(Net::MessageIn &msg) { const int index = msg.readInt16("item index") - STORAGE_OFFSET; const int itemId = msg.readInt16("item id"); - const int itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt( + msg.readUInt8("item type"), + ItemTypeT); const int amount = msg.readInt16("count"); msg.readInt32("wear state / equip"); int cards[maxCards]; @@ -526,7 +532,9 @@ void InventoryRecv::processPlayerStorageEquip(Net::MessageIn &msg) { const int index = msg.readInt16("index") - STORAGE_OFFSET; const int itemId = msg.readInt16("item id"); - const int itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt( + msg.readUInt8("item type"), + ItemTypeT); const int amount = 1; msg.readInt32("location"); msg.readInt32("wear state"); @@ -575,7 +583,7 @@ void InventoryRecv::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"); - const int itemType = msg.readUInt8("type"); + const ItemTypeT itemType = fromInt(msg.readUInt8("type"), ItemTypeT); const unsigned char identified = msg.readUInt8("identify"); const Damaged damaged = fromBool(msg.readUInt8("attribute"), Damaged); const uint8_t refine = msg.readUInt8("refine"); @@ -777,7 +785,7 @@ void InventoryRecv::processPlayerCartAdd(Net::MessageIn &msg) const int index = msg.readInt16("index") - INVENTORY_OFFSET; int amount = msg.readInt32("count"); const int itemId = msg.readInt16("item id"); - const int itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt(msg.readUInt8("item type"), ItemTypeT); const uint8_t identified = msg.readUInt8("identified"); const Damaged damaged = fromBool(msg.readUInt8("attribute"), Damaged); const uint8_t refine = msg.readUInt8("refine"); @@ -853,7 +861,9 @@ void InventoryRecv::processPlayerCartEquip(Net::MessageIn &msg) { const int index = msg.readInt16("index") - INVENTORY_OFFSET; const int itemId = msg.readInt16("item id"); - const int itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt( + msg.readUInt8("item type"), + ItemTypeT); const int amount = 1; msg.readInt32("location"); msg.readInt32("wear state"); @@ -905,7 +915,9 @@ void InventoryRecv::processPlayerCartItems(Net::MessageIn &msg) { const int index = msg.readInt16("item index") - INVENTORY_OFFSET; const int itemId = msg.readInt16("item id"); - const int itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt( + msg.readUInt8("item type"), + ItemTypeT); const int amount = msg.readInt16("count"); msg.readInt32("wear state / equip"); int cards[maxCards]; diff --git a/src/net/eathena/itemrecv.cpp b/src/net/eathena/itemrecv.cpp index 822b4684d..80b0bd7a2 100644 --- a/src/net/eathena/itemrecv.cpp +++ b/src/net/eathena/itemrecv.cpp @@ -28,6 +28,8 @@ #include "const/resources/item/cards.h" +#include "enums/resources/itemtype.h" + #include "net/messagein.h" #include "debug.h" @@ -39,7 +41,7 @@ void ItemRecv::processItemDropped(Net::MessageIn &msg) { const BeingId id = msg.readBeingId("id"); const int itemId = msg.readInt16("item id"); - const int itemType = msg.readInt16("type"); + const ItemTypeT itemType = fromInt(msg.readInt16("type"), ItemTypeT); const Identified identified = fromInt( msg.readUInt8("identify"), Identified); const int x = msg.readInt16("x"); @@ -68,7 +70,7 @@ void ItemRecv::processItemDropped2(Net::MessageIn &msg) { const BeingId id = msg.readBeingId("id"); const int itemId = msg.readInt16("item id"); - const int itemType = msg.readUInt8("type"); + const ItemTypeT itemType = fromInt(msg.readUInt8("type"), ItemTypeT); const Identified identified = fromInt( msg.readUInt8("identify"), Identified); const Damaged damaged = fromBool(msg.readUInt8("attribute"), Damaged); @@ -127,7 +129,7 @@ void ItemRecv::processItemVisible(Net::MessageIn &msg) actorManager->createItem(id, itemId, x, y, - 0, + ItemType::Unknown, amount, 0, ItemColor_one, @@ -142,7 +144,7 @@ void ItemRecv::processItemVisible2(Net::MessageIn &msg) { const BeingId id = msg.readBeingId("item object id"); const int itemId = msg.readInt16("item id"); - const int itemType = msg.readUInt8("type"); + const ItemTypeT itemType = fromInt(msg.readUInt8("type"), ItemTypeT); const Identified identified = fromInt( msg.readUInt8("identify"), Identified); const Damaged damaged = fromBool(msg.readUInt8("attribute"), Damaged); diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp index 6c69664ea..15370d91c 100644 --- a/src/net/eathena/markethandler.cpp +++ b/src/net/eathena/markethandler.cpp @@ -45,11 +45,14 @@ void MarketHandler::close() const } void MarketHandler::buyItem(const int itemId, - const int type, + const ItemTypeT type, const ItemColor color A_UNUSED, const int amount) const { - const bool nonStack = type == 4 || type == 5 || type == 7 || type == 8; + const bool nonStack = type == ItemType::Weapon || + type == ItemType::Armor || + type == ItemType::PetEgg || + type == ItemType::PetArmor; int cnt = nonStack ? amount : 1; const int amount2 = nonStack ? 1 : amount; if (cnt > 100) @@ -73,13 +76,20 @@ void MarketHandler::buyItems(const std::vector<ShopItem*> &items) const { const ShopItem *const item = *it; const int usedQuantity = item->getUsedQuantity(); - const int type = item->getType(); + const ItemTypeT type = item->getType(); if (!usedQuantity) continue; - if (type == 4 || type == 5 || type == 7 || type == 8) + if (type == ItemType::Weapon || + type == ItemType::Armor || + type == ItemType::PetEgg || + type == ItemType::PetArmor) + { cnt += item->getUsedQuantity(); + } else + { cnt ++; + } } if (cnt > 100) @@ -96,8 +106,11 @@ void MarketHandler::buyItems(const std::vector<ShopItem*> &items) const item->increaseQuantity(usedQuantity); item->increaseUsedQuantity(-usedQuantity); item->update(); - const int type = item->getType(); - if (type == 4 || type == 5 || type == 7 || type == 8) + const ItemTypeT type = fromInt(item->getType(), ItemTypeT); + if (type == ItemType::Weapon || + type == ItemType::Armor || + type == ItemType::PetEgg || + type == ItemType::PetArmor) { for (int f = 0; f < usedQuantity; f ++) { diff --git a/src/net/eathena/markethandler.h b/src/net/eathena/markethandler.h index 8ba0be922..fd0d4aea5 100644 --- a/src/net/eathena/markethandler.h +++ b/src/net/eathena/markethandler.h @@ -36,7 +36,7 @@ class MarketHandler final : public Net::MarketHandler void close() const override final; void buyItem(const int itemId, - const int type, + const ItemTypeT type, const ItemColor color, const int amount) const override final; diff --git a/src/net/eathena/marketrecv.cpp b/src/net/eathena/marketrecv.cpp index 2f8d5aaae..66cab540a 100644 --- a/src/net/eathena/marketrecv.cpp +++ b/src/net/eathena/marketrecv.cpp @@ -53,7 +53,7 @@ void MarketRecv::processMarketOpen(Net::MessageIn &msg) for (int f = 0; f < len; f ++) { const int itemId = msg.readInt16("item id"); - const int type = msg.readUInt8("type"); + const ItemTypeT type = fromInt(msg.readUInt8("type"), ItemTypeT); const int value = msg.readInt32("price"); const int amount = msg.readInt32("amount"); msg.readInt16("view"); diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index 7d0a65abc..2e5175253 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -142,13 +142,20 @@ void NpcHandler::buyItems(std::vector<ShopItem*> &items) const { ShopItem *const item = *it; const int usedQuantity = item->getUsedQuantity(); - const int type = item->getType(); + const ItemTypeT type = item->getType(); if (!usedQuantity) continue; - if (type == 4 || type == 5 || type == 7 || type == 8) + if (type == ItemType::Weapon || + type == ItemType::Armor || + type == ItemType::PetEgg || + type == ItemType::PetArmor) + { cnt += item->getUsedQuantity(); + } else + { cnt ++; + } } if (cnt > 100) @@ -164,8 +171,11 @@ void NpcHandler::buyItems(std::vector<ShopItem*> &items) const continue; item->increaseUsedQuantity(-usedQuantity); item->update(); - const int type = item->getType(); - if (type == 4 || type == 5 || type == 7 || type == 8) + const ItemTypeT type = item->getType(); + if (type == ItemType::Weapon || + type == ItemType::Armor || + type == ItemType::PetEgg || + type == ItemType::PetArmor) { for (int f = 0; f < usedQuantity; f ++) { diff --git a/src/net/eathena/traderecv.cpp b/src/net/eathena/traderecv.cpp index b77c8af87..edac5d21e 100644 --- a/src/net/eathena/traderecv.cpp +++ b/src/net/eathena/traderecv.cpp @@ -72,7 +72,7 @@ void TradeRecv::processTradeResponse(Net::MessageIn &msg) void TradeRecv::processTradeItemAdd(Net::MessageIn &msg) { const int type = msg.readInt16("type"); - const int itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt(msg.readUInt8("item type"), ItemTypeT); const int amount = msg.readInt32("amount"); const uint8_t identify = msg.readUInt8("identify"); const Damaged damaged = fromBool(msg.readUInt8("attribute"), Damaged); diff --git a/src/net/eathena/vendingrecv.cpp b/src/net/eathena/vendingrecv.cpp index 7e088a2b0..06cdfa44c 100644 --- a/src/net/eathena/vendingrecv.cpp +++ b/src/net/eathena/vendingrecv.cpp @@ -93,7 +93,7 @@ void VendingRecv::processItemsList(Net::MessageIn &msg) const int value = msg.readInt32("price"); const int amount = msg.readInt16("amount"); const int index = msg.readInt16("inv index"); - const int type = msg.readUInt8("item type"); + const ItemTypeT type = fromInt(msg.readUInt8("item type"), ItemTypeT); const int itemId = msg.readInt16("item id"); msg.readUInt8("identify"); msg.readUInt8("attribute"); diff --git a/src/net/markethandler.h b/src/net/markethandler.h index 856014686..f571237a8 100644 --- a/src/net/markethandler.h +++ b/src/net/markethandler.h @@ -23,6 +23,8 @@ #ifdef EATHENA_SUPPORT +#include "enums/resources/itemtype.h" + #include "enums/simpletypes/itemcolor.h" #include <string> @@ -44,7 +46,7 @@ class MarketHandler notfinal virtual void close() const = 0; virtual void buyItem(const int itemId, - const int type, + const ItemTypeT type, const ItemColor color, const int amount) const = 0; diff --git a/src/net/tmwa/buysellrecv.cpp b/src/net/tmwa/buysellrecv.cpp index 13027d1f2..625cb2a14 100644 --- a/src/net/tmwa/buysellrecv.cpp +++ b/src/net/tmwa/buysellrecv.cpp @@ -54,7 +54,7 @@ void BuySellRecv::processNpcBuy(Net::MessageIn &msg) { const int value = msg.readInt32("price"); msg.readInt32("dc value?"); - const int type = msg.readUInt8("type"); + const ItemTypeT type = fromInt(msg.readUInt8("type"), ItemTypeT); const int itemId = msg.readInt16("item id"); const ItemColor color = ItemColor_one; Ea::BuySellRecv::mBuyDialog->addItem(itemId, type, color, 0, value); diff --git a/src/net/tmwa/inventoryrecv.cpp b/src/net/tmwa/inventoryrecv.cpp index 6e1fe0cfe..605f08bbe 100644 --- a/src/net/tmwa/inventoryrecv.cpp +++ b/src/net/tmwa/inventoryrecv.cpp @@ -93,9 +93,10 @@ void InventoryRecv::processPlayerEquipment(Net::MessageIn &msg) { const int index = msg.readInt16("index") - INVENTORY_OFFSET; const int itemId = msg.readInt16("item id"); - const uint8_t itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt( + msg.readUInt8("item type"), + ItemTypeT); const uint8_t identified = msg.readUInt8("identify"); - msg.readInt16("equip type?"); const int equipType = msg.readInt16("equip type"); msg.readUInt8("attribute"); @@ -107,7 +108,7 @@ void InventoryRecv::processPlayerEquipment(Net::MessageIn &msg) if (Ea::InventoryRecv::mDebugInventory) { logger->log("Index: %d, ID: %d, Type: %d, Identified: %d", - index, itemId, itemType, identified); + index, itemId, CAST_S32(itemType), identified); } if (inventory) @@ -158,8 +159,7 @@ void InventoryRecv::processPlayerInventoryAdd(Net::MessageIn &msg) for (int f = 0; f < maxCards; f++) cards[f] = msg.readInt16("card"); const int equipType = msg.readInt16("equip type"); - const int type = msg.readUInt8("item type"); - + const ItemTypeT type = fromInt(msg.readUInt8("item type"), ItemTypeT); const ItemInfo &itemInfo = ItemDB::get(itemId); const unsigned char err = msg.readUInt8("status"); BeingId floorId; @@ -270,7 +270,9 @@ void InventoryRecv::processPlayerInventory(Net::MessageIn &msg) int cards[maxCards]; const int index = msg.readInt16("index") - INVENTORY_OFFSET; const int itemId = msg.readInt16("item id"); - const uint8_t itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt( + msg.readUInt8("item type"), + ItemTypeT); const uint8_t identified = msg.readUInt8("identified"); const int amount = msg.readInt16("amount"); const int arrow = msg.readInt16("arrow"); @@ -281,7 +283,7 @@ void InventoryRecv::processPlayerInventory(Net::MessageIn &msg) { logger->log("Index: %d, ID: %d, Type: %d, Identified: %d, " "Qty: %d, Cards: %d, %d, %d, %d", - index, itemId, itemType, identified, amount, + index, itemId, CAST_S32(itemType), identified, amount, cards[0], cards[1], cards[2], cards[3]); } @@ -320,7 +322,9 @@ void InventoryRecv::processPlayerStorage(Net::MessageIn &msg) int cards[maxCards]; const int index = msg.readInt16("index") - STORAGE_OFFSET; const int itemId = msg.readInt16("item id"); - const uint8_t itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt( + msg.readUInt8("item type"), + ItemTypeT); const uint8_t identified = msg.readUInt8("identified"); const int amount = msg.readInt16("amount"); msg.readInt16("arrow"); @@ -331,7 +335,7 @@ void InventoryRecv::processPlayerStorage(Net::MessageIn &msg) { logger->log("Index: %d, ID: %d, Type: %d, Identified: %d, " "Qty: %d, Cards: %d, %d, %d, %d", - index, itemId, itemType, identified, amount, + index, itemId, CAST_S32(itemType), identified, amount, cards[0], cards[1], cards[2], cards[3]); } @@ -400,7 +404,9 @@ void InventoryRecv::processPlayerStorageEquip(Net::MessageIn &msg) int cards[maxCards]; const int index = msg.readInt16("index") - STORAGE_OFFSET; const int itemId = msg.readInt16("item id"); - const uint8_t itemType = msg.readUInt8("item type"); + const ItemTypeT itemType = fromInt( + msg.readUInt8("item type"), + ItemTypeT); const uint8_t identified = msg.readUInt8("identified"); const int amount = 1; msg.readInt16("equip point?"); @@ -414,7 +420,7 @@ void InventoryRecv::processPlayerStorageEquip(Net::MessageIn &msg) { logger->log("Index: %d, ID: %d, Type: %d, Identified: %u, " "Qty: %d, Cards: %d, %d, %d, %d, Refine: %u", - index, itemId, itemType, + index, itemId, CAST_S32(itemType), CAST_U32(identified), amount, cards[0], cards[1], cards[2], cards[3], CAST_U32(refine)); @@ -461,7 +467,7 @@ void InventoryRecv::processPlayerStorageAdd(Net::MessageIn &msg) { Ea::InventoryRecv::mStorage->setItem(index, itemId, - 0, + ItemType::Unknown, amount, refine, ItemColor_one, diff --git a/src/net/tmwa/itemrecv.cpp b/src/net/tmwa/itemrecv.cpp index d7038942d..041bf5af7 100644 --- a/src/net/tmwa/itemrecv.cpp +++ b/src/net/tmwa/itemrecv.cpp @@ -47,7 +47,7 @@ void ItemRecv::processItemDropped(Net::MessageIn &msg) actorManager->createItem(id, itemId, x, y, - 0, + ItemType::Unknown, amount, 0, ItemColor_one, @@ -75,7 +75,7 @@ void ItemRecv::processItemVisible(Net::MessageIn &msg) actorManager->createItem(id, itemId, x, y, - 0, + ItemType::Unknown, amount, 0, ItemColor_one, diff --git a/src/net/tmwa/markethandler.cpp b/src/net/tmwa/markethandler.cpp index ecab3790e..7c29d042d 100644 --- a/src/net/tmwa/markethandler.cpp +++ b/src/net/tmwa/markethandler.cpp @@ -37,7 +37,7 @@ void MarketHandler::close() const } void MarketHandler::buyItem(const int itemId A_UNUSED, - const int type A_UNUSED, + const ItemTypeT type A_UNUSED, const ItemColor color A_UNUSED, const int amount A_UNUSED) const { diff --git a/src/net/tmwa/markethandler.h b/src/net/tmwa/markethandler.h index 7c99bd164..a9dac7519 100644 --- a/src/net/tmwa/markethandler.h +++ b/src/net/tmwa/markethandler.h @@ -37,7 +37,7 @@ class MarketHandler final : public Net::MarketHandler void close() const override final A_CONST; void buyItem(const int itemId, - const int type, + const ItemTypeT type, const ItemColor color, const int amount) const override final A_CONST; diff --git a/src/net/tmwa/traderecv.cpp b/src/net/tmwa/traderecv.cpp index 393502273..f68bee9f5 100644 --- a/src/net/tmwa/traderecv.cpp +++ b/src/net/tmwa/traderecv.cpp @@ -77,7 +77,7 @@ void TradeRecv::processTradeItemAdd(Net::MessageIn &msg) else { tradeWindow->addItem2(type, - 0, + ItemType::Unknown, cards, 4, false, |