From ae0ade61326aa52df63aeb7742133160b8c78047 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 11 Feb 2015 16:23:03 +0300 Subject: Add typed bool type Equipped. --- src/net/ea/buysellhandler.cpp | 2 +- src/net/ea/equipbackend.h | 6 +++--- src/net/ea/inventoryhandler.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/net/ea') diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp index 11785fec0..537a741ea 100644 --- a/src/net/ea/buysellhandler.cpp +++ b/src/net/ea/buysellhandler.cpp @@ -162,7 +162,7 @@ void BuySellHandler::processNpcSell(Net::MessageIn &msg) const Item *const item = PlayerInfo::getInventory() ->getItem(index); - if (item && !(item->isEquipped())) + if (item && item->isEquipped() == Equipped_false) dialog->addItem(item, value); } } diff --git a/src/net/ea/equipbackend.h b/src/net/ea/equipbackend.h index 6f09e8e9c..3b3297315 100644 --- a/src/net/ea/equipbackend.h +++ b/src/net/ea/equipbackend.h @@ -67,7 +67,7 @@ class EquipBackend final : public Equipment::Backend { Item* item = inv->getItem(i); if (item) - item->setEquipped(false); + item->setEquipped(Equipped_false); } mEquipment[i] = -1; @@ -87,14 +87,14 @@ class EquipBackend final : public Equipment::Backend Item *item = inv->getItem(mEquipment[index]); if (item) - item->setEquipped(false); + item->setEquipped(Equipped_false); // not checking index because it must be safe mEquipment[index] = inventoryIndex; item = inv->getItem(inventoryIndex); if (item) - item->setEquipped(true); + item->setEquipped(Equipped_true); if (inventoryWindow) inventoryWindow->updateButtons(); diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index e81b0a490..026359d76 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -262,7 +262,7 @@ void InventoryHandler::processPlayerStorageStatus(Net::MessageIn &msg) (*it).damaged, (*it).favorite, (*it).equip, - false); + Equipped_false); } mInventoryItems.clear(); -- cgit v1.2.3-70-g09d2