diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-11 00:20:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-11 00:20:57 +0300 |
commit | 067410031057ffc9bdb36b976bc2a658b23acb1b (patch) | |
tree | ca60538b0a1aef7aabcd2d89250efe98961e85cb /src/net | |
parent | 7d9f6bd3984c423b89a9f564342cde74f378f8c9 (diff) | |
download | manaplus-067410031057ffc9bdb36b976bc2a658b23acb1b.tar.gz manaplus-067410031057ffc9bdb36b976bc2a658b23acb1b.tar.bz2 manaplus-067410031057ffc9bdb36b976bc2a658b23acb1b.tar.xz manaplus-067410031057ffc9bdb36b976bc2a658b23acb1b.zip |
Add typed bool type Favorite.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/inventoryitem.h | 4 | ||||
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 21 | ||||
-rw-r--r-- | src/net/eathena/tradehandler.cpp | 3 | ||||
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 36 | ||||
-rw-r--r-- | src/net/tmwa/tradehandler.cpp | 6 |
5 files changed, 44 insertions, 26 deletions
diff --git a/src/net/ea/inventoryitem.h b/src/net/ea/inventoryitem.h index dcd90b336..936e4a4ee 100644 --- a/src/net/ea/inventoryitem.h +++ b/src/net/ea/inventoryitem.h @@ -51,7 +51,7 @@ class InventoryItem final unsigned char color; Identified identified; Damaged damaged; - bool favorite; + Favorite favorite; bool equip; InventoryItem(const int slot0, @@ -63,7 +63,7 @@ class InventoryItem final const unsigned char color0, const Identified identified0, const Damaged damaged0, - const bool favorite0, + const Favorite favorite0, const bool equip0) : slot(slot0), id(id0), diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index f2d22ef14..162b69f2b 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -385,7 +385,7 @@ void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg) 1, fromBool(flags.bits.isIdentified, Identified), fromBool(flags.bits.isDamaged, Damaged), - flags.bits.isFavorite, + fromBool(flags.bits.isFavorite, Favorite), true, false); inventory->setCards(index, cards, 4); } @@ -485,7 +485,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) 1, fromBool(identified, Identified), fromBool(damaged, Damaged), - false, + Favorite_false, equipType != 0, false); inventory->setCards(index, cards, 4); } @@ -533,7 +533,7 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg) 0, 1, fromBool(flags.bits.isIdentified, Identified), fromBool(flags.bits.isDamaged, Damaged), - flags.bits.isFavorite, + fromBool(flags.bits.isFavorite, Favorite), false, false); inventory->setCards(index, cards, 4); } @@ -569,7 +569,8 @@ void InventoryHandler::processPlayerStorage(Net::MessageIn &msg) cards, amount, 0, 1, fromBool(flags.bits.isIdentified, Identified), fromBool(flags.bits.isDamaged, Damaged), - flags.bits.isFavorite, false)); + fromBool(flags.bits.isFavorite, Favorite), + false)); } BLOCK_END("InventoryHandler::processPlayerInventory") } @@ -669,7 +670,7 @@ void InventoryHandler::processPlayerStorageEquip(Net::MessageIn &msg) cards, amount, refine, 1, fromBool(flags.bits.isIdentified, Identified), fromBool(flags.bits.isDamaged, Damaged), - flags.bits.isFavorite, + fromBool(flags.bits.isFavorite, Favorite), false)); } BLOCK_END("InventoryHandler::processPlayerStorageEquip") @@ -703,7 +704,8 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) refine, 1, fromBool(identified, Identified), Damaged_false, - false, false, false); + Favorite_false, + false, false); mStorage->setCards(index, cards, 4); } } @@ -845,7 +847,8 @@ void InventoryHandler::processPlayerCartAdd(Net::MessageIn &msg) 1, fromBool(identified, Identified), Damaged_false, - false, false, false); + Favorite_false, + false, false); inventory->setCards(index, cards, 4); } BLOCK_END("InventoryHandler::processPlayerCartAdd") @@ -878,7 +881,7 @@ void InventoryHandler::processPlayerCartEquip(Net::MessageIn &msg) cards, amount, refine, 1, fromBool(flags.bits.isIdentified, Identified), fromBool(flags.bits.isDamaged, Damaged), - flags.bits.isFavorite, + fromBool(flags.bits.isFavorite, Favorite), false)); } BLOCK_END("InventoryHandler::processPlayerCartEquip") @@ -910,7 +913,7 @@ void InventoryHandler::processPlayerCartItems(Net::MessageIn &msg) cards, amount, 0, 1, fromBool(flags.bits.isIdentified, Identified), fromBool(flags.bits.isDamaged, Damaged), - flags.bits.isFavorite, + fromBool(flags.bits.isFavorite, Favorite), false)); } BLOCK_END("InventoryHandler::processPlayerCartItems") diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp index 16819b802..d6240c580 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -209,7 +209,8 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) refine, 1, fromBool(identify, Identified), Damaged_false, - false, false); + Favorite_false, + false); } } } diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 7c53612eb..45b9d47eb 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -300,7 +300,8 @@ void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg) identified, Identified_true, Damaged_false, - false, true, false); + Favorite_false, + true, false); } else { @@ -308,7 +309,8 @@ void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg) 1, fromBool(identified, Identified), Damaged_false, - false, true, false); + Favorite_false, + true, false); } inventory->setCards(index, cards, 4); } @@ -408,7 +410,8 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) identified, Identified_true, Damaged_false, - false, equipType != 0, false); + Favorite_false, + equipType != 0, false); } else { @@ -416,7 +419,8 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) 1, fromBool(identified, Identified), Damaged_false, - false, equipType != 0, false); + Favorite_false, + equipType != 0, false); } inventory->setCards(index, cards, 4); } @@ -475,7 +479,8 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg) 0, identified, Identified_true, Damaged_false, - false, isEquipment, false); + Favorite_false, + isEquipment, false); } else { @@ -483,7 +488,8 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg) 0, 1, fromBool(identified, Identified), Damaged_false, - false, isEquipment, false); + Favorite_false, + isEquipment, false); } inventory->setCards(index, cards, 4); } @@ -525,7 +531,8 @@ void InventoryHandler::processPlayerStorage(Net::MessageIn &msg) itemType, cards, amount, 0, identified, Identified_true, Damaged_false, - false, false)); + Favorite_false, + false)); } else { @@ -533,7 +540,8 @@ void InventoryHandler::processPlayerStorage(Net::MessageIn &msg) itemType, cards, amount, 0, 1, fromBool(identified, Identified), Damaged_false, - false, false)); + Favorite_false, + false)); } } BLOCK_END("InventoryHandler::processPlayerInventory") @@ -604,7 +612,8 @@ void InventoryHandler::processPlayerStorageEquip(Net::MessageIn &msg) itemType, cards, amount, refine, identified, Identified_true, Damaged_false, - false, false)); + Favorite_false, + false)); } else { @@ -612,7 +621,8 @@ void InventoryHandler::processPlayerStorageEquip(Net::MessageIn &msg) itemType, cards, amount, refine, 1, fromBool(identified, Identified), Damaged_false, - false, false)); + Favorite_false, + false)); } } BLOCK_END("InventoryHandler::processPlayerStorageEquip") @@ -647,7 +657,8 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) refine, identified, Identified_true, Damaged_false, - false, false, false); + Favorite_false, + false, false); } else { @@ -655,7 +666,8 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) refine, 1, fromBool(identified, Identified), Damaged_false, - false, false, false); + Favorite_false, + false, false); } mStorage->setCards(index, cards, 4); } diff --git a/src/net/tmwa/tradehandler.cpp b/src/net/tmwa/tradehandler.cpp index 29575adbc..5411a59f5 100644 --- a/src/net/tmwa/tradehandler.cpp +++ b/src/net/tmwa/tradehandler.cpp @@ -198,7 +198,8 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) identify, Identified_true, Damaged_false, - false, false); + Favorite_false, + false); } else { @@ -208,7 +209,8 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) refine, 1, fromBool(identify, Identified), Damaged_false, - false, false); + Favorite_false, + false); } } } |