summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/equipmentwindow.cpp6
-rw-r--r--src/gui/windows/inventorywindow.cpp4
-rw-r--r--src/gui/windows/itemamountwindow.cpp2
-rw-r--r--src/gui/windows/npcdialog.cpp2
-rw-r--r--src/gui/windows/outfitwindow.cpp8
-rw-r--r--src/gui/windows/tradewindow.cpp4
6 files changed, 14 insertions, 12 deletions
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 74bcaaafb..f26a877cf 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -324,7 +324,7 @@ void EquipmentWindow::action(const ActionEvent &event)
{
if (item->isEquipment() == Equipm_true)
{
- if (!item->isEquipped())
+ if (item->isEquipped() == Equipped_false)
PlayerInfo::equipItem(item, true);
}
}
@@ -468,7 +468,7 @@ void EquipmentWindow::mouseReleased(MouseEvent &event)
{
if (item->isEquipment() == Equipm_true)
{
- if (!item->isEquipped())
+ if (item->isEquipped() == Equipped_false)
PlayerInfo::equipItem(item, true);
}
}
@@ -492,7 +492,7 @@ void EquipmentWindow::mouseReleased(MouseEvent &event)
return;
}
- if (item->isEquipped())
+ if (item->isEquipped() == Equipped_true)
PlayerInfo::unequipItem(item, true);
}
}
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index b788039a9..0124152ee 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -741,8 +741,8 @@ void InventoryWindow::updateButtons(const Item *item)
if (mUseButton)
{
const ItemInfo &info = item->getInfo();
- const std::string &str
- = (item->isEquipment() == Equipm_true && item->isEquipped())
+ const std::string &str = (item->isEquipment() == Equipm_true
+ && item->isEquipped() == Equipped_true)
? info.getUseButton2() : info.getUseButton();
if (str.empty())
{
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 6ffd857bc..1369a0686 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -339,7 +339,7 @@ void ItemAmountWindow::action(const ActionEvent &event)
Damaged_true,
Favorite_false,
Equipm_false,
- false);
+ Equipped_false);
if (mUsage == ShopBuyAdd)
mMax = 10000;
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 9c93b7474..096ab1c39 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -479,7 +479,7 @@ void NpcDialog::action(const ActionEvent &event)
item->getDamaged(),
item->getFavorite(),
Equipm_false,
- false);
+ Equipped_false);
}
}
}
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();
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 1dc1a9882..ef2897ccd 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -214,7 +214,7 @@ void TradeWindow::addItem(const int id,
damaged,
favorite,
Equipm_false,
- false);
+ Equipped_false);
}
void TradeWindow::addItem2(const int id,
@@ -240,7 +240,7 @@ void TradeWindow::addItem2(const int id,
damaged,
favorite,
equipment,
- false);
+ Equipped_false);
if (slot >= 0)
inv->setCards(slot, cards, sz);
}