diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-10 13:44:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-10 22:49:59 +0300 |
commit | f3f7879c48fe8e202c3519cd465225645949167e (patch) | |
tree | 898a86c3446d988e86d7c3f160036533bdfd6475 /src/net/eathena | |
parent | 37d7bd3163ad58391df36363b6f0135c638fbeb8 (diff) | |
download | mv-f3f7879c48fe8e202c3519cd465225645949167e.tar.gz mv-f3f7879c48fe8e202c3519cd465225645949167e.tar.bz2 mv-f3f7879c48fe8e202c3519cd465225645949167e.tar.xz mv-f3f7879c48fe8e202c3519cd465225645949167e.zip |
Add typed bool type Identified.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 35 | ||||
-rw-r--r-- | src/net/eathena/tradehandler.cpp | 5 |
2 files changed, 29 insertions, 11 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index bcf5806a5..0c6ef7141 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -25,6 +25,7 @@ #include "notifymanager.h" #include "enums/equipslot.h" +#include "enums/simpletypes.h" #include "enums/being/attributes.h" @@ -381,7 +382,9 @@ void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg) if (inventory) { inventory->setItem(index, itemId, itemType, 1, refine, - 1, flags.bits.isIdentified, flags.bits.isDamaged, + 1, + fromBool(flags.bits.isIdentified, Identified), + flags.bits.isDamaged, flags.bits.isFavorite, true, false); inventory->setCards(index, cards, 4); @@ -479,7 +482,9 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) amount += item->getQuantity(); inventory->setItem(index, itemId, itemType, amount, refine, - 1, identified != 0, damaged != 0, false, + 1, + fromBool(identified, Identified), + damaged != 0, false, equipType != 0, false); inventory->setCards(index, cards, 4); } @@ -524,8 +529,10 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg) if (inventory) { inventory->setItem(index, itemId, itemType, amount, - 0, 1, flags.bits.isIdentified, - flags.bits.isDamaged, flags.bits.isFavorite, + 0, 1, + fromBool(flags.bits.isIdentified, Identified), + flags.bits.isDamaged, + flags.bits.isFavorite, false, false); inventory->setCards(index, cards, 4); } @@ -558,7 +565,8 @@ void InventoryHandler::processPlayerStorage(Net::MessageIn &msg) flags.byte = msg.readUInt8("flags"); mInventoryItems.push_back(Ea::InventoryItem(index, itemId, itemType, - cards, amount, 0, 1, flags.bits.isIdentified, + cards, amount, 0, 1, + fromBool(flags.bits.isIdentified, Identified), flags.bits.isDamaged, flags.bits.isFavorite, false)); } BLOCK_END("InventoryHandler::processPlayerInventory") @@ -656,7 +664,8 @@ void InventoryHandler::processPlayerStorageEquip(Net::MessageIn &msg) flags.byte = msg.readUInt8("flags"); mInventoryItems.push_back(Ea::InventoryItem(index, itemId, itemType, - cards, amount, refine, 1, flags.bits.isIdentified, + cards, amount, refine, 1, + fromBool(flags.bits.isIdentified, Identified), flags.bits.isDamaged, flags.bits.isFavorite, false)); } BLOCK_END("InventoryHandler::processPlayerStorageEquip") @@ -687,7 +696,9 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) if (mStorage) { mStorage->setItem(index, itemId, itemType, amount, - refine, 1, identified != 0, false, false, false, false); + refine, 1, + fromBool(identified, Identified), + false, false, false, false); mStorage->setCards(index, cards, 4); } } @@ -826,7 +837,9 @@ void InventoryHandler::processPlayerCartAdd(Net::MessageIn &msg) amount += item->getQuantity(); inventory->setItem(index, itemId, itemType, amount, refine, - 1, identified != 0, false, false, false, false); + 1, + fromBool(identified, Identified), + false, false, false, false); inventory->setCards(index, cards, 4); } BLOCK_END("InventoryHandler::processPlayerCartAdd") @@ -856,7 +869,8 @@ void InventoryHandler::processPlayerCartEquip(Net::MessageIn &msg) flags.byte = msg.readUInt8("flags"); mCartItems.push_back(Ea::InventoryItem(index, itemId, itemType, - cards, amount, refine, 1, flags.bits.isIdentified, + cards, amount, refine, 1, + fromBool(flags.bits.isIdentified, Identified), flags.bits.isDamaged, flags.bits.isFavorite, false)); } BLOCK_END("InventoryHandler::processPlayerCartEquip") @@ -885,7 +899,8 @@ void InventoryHandler::processPlayerCartItems(Net::MessageIn &msg) flags.byte = msg.readUInt8("flags"); mCartItems.push_back(Ea::InventoryItem(index, itemId, itemType, - cards, amount, 0, 1, flags.bits.isIdentified, + cards, amount, 0, 1, + fromBool(flags.bits.isIdentified, Identified), flags.bits.isDamaged, flags.bits.isFavorite, false)); } BLOCK_END("InventoryHandler::processPlayerCartItems") diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp index 5e1a95986..303ebd7c9 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -28,6 +28,8 @@ #include "being/playerinfo.h" +#include "enums/simpletypes.h" + #include "gui/windows/tradewindow.h" #include "net/eathena/messageout.h" @@ -204,7 +206,8 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) tradeWindow->addItem2(type, itemType, cards, 4, false, amount, - refine, 1, identify != 0, + refine, 1, + fromBool(identify, Identified), false, false, false); } } |