diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-11 16:23:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-11 16:23:03 +0300 |
commit | ae0ade61326aa52df63aeb7742133160b8c78047 (patch) | |
tree | b04c09807058b593949fe634098e73474a58589d /src/gui/windows/outfitwindow.cpp | |
parent | 4a337b7a42d0c92bc2ed26b7e206188dc04c569d (diff) | |
download | manaplus-ae0ade61326aa52df63aeb7742133160b8c78047.tar.gz manaplus-ae0ade61326aa52df63aeb7742133160b8c78047.tar.bz2 manaplus-ae0ade61326aa52df63aeb7742133160b8c78047.tar.xz manaplus-ae0ade61326aa52df63aeb7742133160b8c78047.zip |
Add typed bool type Equipped.
Diffstat (limited to 'src/gui/windows/outfitwindow.cpp')
-rw-r--r-- | src/gui/windows/outfitwindow.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp index d73f86a05..3a0f26d64 100644 --- a/src/gui/windows/outfitwindow.cpp +++ b/src/gui/windows/outfitwindow.cpp @@ -281,7 +281,9 @@ void OutfitWindow::wearOutfit(const int outfit, const bool unwearEmpty, { const Item *const item = PlayerInfo::getInventory()->findItem( mItems[outfit][i], mItemColors[outfit][i]); - if (item && !item->isEquipped() && item->getQuantity()) + if (item + && item->isEquipped() == Equipped_false + && item->getQuantity()) { if (item->isEquipment() == Equipm_true) { @@ -516,7 +518,7 @@ void OutfitWindow::unequipNotInOutfit(const int outfit) const for (unsigned i = 0; i < invSize; i++) { const Item *const item = inventory->getItem(i); - if (item && item->isEquipped()) + if (item && item->isEquipped() == Equipped_true) { bool found = false; for (unsigned f = 0; f < OUTFIT_ITEM_COUNT; f++) @@ -632,7 +634,7 @@ void OutfitWindow::copyFromEquiped(const int dst) for (unsigned i = 0, sz = inventory->getSize(); i < sz; i++) { const Item *const item = inventory->getItem(i); - if (item && item->isEquipped()) + if (item && item->isEquipped() == Equipped_true) { mItems[dst][outfitCell] = item->getId(); mItemColors[dst][outfitCell++] = item->getColor(); |