diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/inventoryitem.h | 4 | ||||
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 23 | ||||
-rw-r--r-- | src/net/eathena/tradehandler.cpp | 19 | ||||
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 32 | ||||
-rw-r--r-- | src/net/tmwa/tradehandler.cpp | 4 |
5 files changed, 51 insertions, 31 deletions
diff --git a/src/net/ea/inventoryitem.h b/src/net/ea/inventoryitem.h index 936e4a4ee..bd2d115cd 100644 --- a/src/net/ea/inventoryitem.h +++ b/src/net/ea/inventoryitem.h @@ -52,7 +52,7 @@ class InventoryItem final Identified identified; Damaged damaged; Favorite favorite; - bool equip; + Equipm equip; InventoryItem(const int slot0, const int id0, @@ -64,7 +64,7 @@ class InventoryItem final const Identified identified0, const Damaged damaged0, const Favorite favorite0, - const bool equip0) : + Equipm equip0) : slot(slot0), id(id0), type(type0), diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 162b69f2b..835b341a8 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -386,7 +386,8 @@ void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg) fromBool(flags.bits.isIdentified, Identified), fromBool(flags.bits.isDamaged, Damaged), fromBool(flags.bits.isFavorite, Favorite), - true, false); + Equipm_true, + false); inventory->setCards(index, cards, 4); } @@ -486,7 +487,8 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) fromBool(identified, Identified), fromBool(damaged, Damaged), Favorite_false, - equipType != 0, false); + fromBool(equipType, Equipm), + false); inventory->setCards(index, cards, 4); } ArrowsListener::distributeEvent(); @@ -534,7 +536,8 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg) fromBool(flags.bits.isIdentified, Identified), fromBool(flags.bits.isDamaged, Damaged), fromBool(flags.bits.isFavorite, Favorite), - false, false); + Equipm_false, + false); inventory->setCards(index, cards, 4); } } @@ -570,7 +573,7 @@ void InventoryHandler::processPlayerStorage(Net::MessageIn &msg) fromBool(flags.bits.isIdentified, Identified), fromBool(flags.bits.isDamaged, Damaged), fromBool(flags.bits.isFavorite, Favorite), - false)); + Equipm_false)); } BLOCK_END("InventoryHandler::processPlayerInventory") } @@ -671,7 +674,7 @@ void InventoryHandler::processPlayerStorageEquip(Net::MessageIn &msg) fromBool(flags.bits.isIdentified, Identified), fromBool(flags.bits.isDamaged, Damaged), fromBool(flags.bits.isFavorite, Favorite), - false)); + Equipm_false)); } BLOCK_END("InventoryHandler::processPlayerStorageEquip") } @@ -705,7 +708,8 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) fromBool(identified, Identified), Damaged_false, Favorite_false, - false, false); + Equipm_false, + false); mStorage->setCards(index, cards, 4); } } @@ -848,7 +852,8 @@ void InventoryHandler::processPlayerCartAdd(Net::MessageIn &msg) fromBool(identified, Identified), Damaged_false, Favorite_false, - false, false); + Equipm_false, + false); inventory->setCards(index, cards, 4); } BLOCK_END("InventoryHandler::processPlayerCartAdd") @@ -882,7 +887,7 @@ void InventoryHandler::processPlayerCartEquip(Net::MessageIn &msg) fromBool(flags.bits.isIdentified, Identified), fromBool(flags.bits.isDamaged, Damaged), fromBool(flags.bits.isFavorite, Favorite), - false)); + Equipm_false)); } BLOCK_END("InventoryHandler::processPlayerCartEquip") } @@ -914,7 +919,7 @@ void InventoryHandler::processPlayerCartItems(Net::MessageIn &msg) fromBool(flags.bits.isIdentified, Identified), fromBool(flags.bits.isDamaged, Damaged), fromBool(flags.bits.isFavorite, Favorite), - false)); + Equipm_false)); } BLOCK_END("InventoryHandler::processPlayerCartItems") } diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp index d6240c580..c2ff5553c 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -210,7 +210,7 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) fromBool(identify, Identified), Damaged_false, Favorite_false, - false); + Equipm_false); } } } @@ -230,11 +230,18 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg) return; if (tradeWindow) { - tradeWindow->addItem2(item->getId(), item->getType(), - item->getCards(), 4, - true, mQuantity, item->getRefine(), item->getColor(), - item->getIdentified(), item->getDamaged(), - item->getFavorite(), item->isEquipment()); + tradeWindow->addItem2(item->getId(), + item->getType(), + item->getCards(), + 4, + true, + mQuantity, + item->getRefine(), + item->getColor(), + item->getIdentified(), + item->getDamaged(), + item->getFavorite(), + item->isEquipment()); } item->increaseQuantity(-mQuantity); mItemIndex = -1; diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 45b9d47eb..0d0611122 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -301,7 +301,8 @@ void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg) Identified_true, Damaged_false, Favorite_false, - true, false); + Equipm_true, + false); } else { @@ -310,7 +311,8 @@ void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg) fromBool(identified, Identified), Damaged_false, Favorite_false, - true, false); + Equipm_true, + false); } inventory->setCards(index, cards, 4); } @@ -411,7 +413,8 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) Identified_true, Damaged_false, Favorite_false, - equipType != 0, false); + fromBool(equipType, Equipm), + false); } else { @@ -420,7 +423,8 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) fromBool(identified, Identified), Damaged_false, Favorite_false, - equipType != 0, false); + fromBool(equipType, Equipm), + false); } inventory->setCards(index, cards, 4); } @@ -480,7 +484,8 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg) Identified_true, Damaged_false, Favorite_false, - isEquipment, false); + fromBool(isEquipment, Equipm), + false); } else { @@ -489,7 +494,8 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg) fromBool(identified, Identified), Damaged_false, Favorite_false, - isEquipment, false); + fromBool(isEquipment, Equipm), + false); } inventory->setCards(index, cards, 4); } @@ -532,7 +538,7 @@ void InventoryHandler::processPlayerStorage(Net::MessageIn &msg) Identified_true, Damaged_false, Favorite_false, - false)); + Equipm_false)); } else { @@ -541,7 +547,7 @@ void InventoryHandler::processPlayerStorage(Net::MessageIn &msg) fromBool(identified, Identified), Damaged_false, Favorite_false, - false)); + Equipm_false)); } } BLOCK_END("InventoryHandler::processPlayerInventory") @@ -613,7 +619,7 @@ void InventoryHandler::processPlayerStorageEquip(Net::MessageIn &msg) Identified_true, Damaged_false, Favorite_false, - false)); + Equipm_false)); } else { @@ -622,7 +628,7 @@ void InventoryHandler::processPlayerStorageEquip(Net::MessageIn &msg) fromBool(identified, Identified), Damaged_false, Favorite_false, - false)); + Equipm_false)); } } BLOCK_END("InventoryHandler::processPlayerStorageEquip") @@ -658,7 +664,8 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) Identified_true, Damaged_false, Favorite_false, - false, false); + Equipm_false, + false); } else { @@ -667,7 +674,8 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) fromBool(identified, Identified), Damaged_false, Favorite_false, - false, false); + Equipm_false, + false); } mStorage->setCards(index, cards, 4); } diff --git a/src/net/tmwa/tradehandler.cpp b/src/net/tmwa/tradehandler.cpp index 5411a59f5..2ec2c90d7 100644 --- a/src/net/tmwa/tradehandler.cpp +++ b/src/net/tmwa/tradehandler.cpp @@ -199,7 +199,7 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) Identified_true, Damaged_false, Favorite_false, - false); + Equipm_false); } else { @@ -210,7 +210,7 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) fromBool(identify, Identified), Damaged_false, Favorite_false, - false); + Equipm_false); } } } |