summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/equipmentwindow.cpp8
-rw-r--r--src/gui/windows/inventorywindow.cpp8
-rw-r--r--src/gui/windows/itemamountwindow.cpp2
-rw-r--r--src/gui/windows/outfitwindow.cpp4
-rw-r--r--src/gui/windows/shopwindow.cpp8
-rw-r--r--src/gui/windows/tradewindow.cpp2
6 files changed, 17 insertions, 15 deletions
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index cc2d34991..44cb01bc1 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -292,7 +292,7 @@ void EquipmentWindow::action(const ActionEvent &event)
return;
const Item *const item = mEquipment->getEquipment(mSelected);
- PlayerInfo::unequipItem(item, true);
+ PlayerInfo::unequipItem(item, Sfx_true);
setSelected(-1);
}
else if (!eventId.find("tab_"))
@@ -325,7 +325,7 @@ void EquipmentWindow::action(const ActionEvent &event)
if (item->isEquipment() == Equipm_true)
{
if (item->isEquipped() == Equipped_false)
- PlayerInfo::equipItem(item, true);
+ PlayerInfo::equipItem(item, Sfx_true);
}
}
}
@@ -469,7 +469,7 @@ void EquipmentWindow::mouseReleased(MouseEvent &event)
if (item->isEquipment() == Equipm_true)
{
if (item->isEquipped() == Equipped_false)
- PlayerInfo::equipItem(item, true);
+ PlayerInfo::equipItem(item, Sfx_true);
}
}
else if (dragDrop.getSource() == DRAGDROP_SOURCE_EQUIPMENT)
@@ -493,7 +493,7 @@ void EquipmentWindow::mouseReleased(MouseEvent &event)
}
if (item->isEquipped() == Equipped_true)
- PlayerInfo::unequipItem(item, true);
+ PlayerInfo::unequipItem(item, Sfx_true);
}
}
dragDrop.clear();
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 65e89bbb3..c87fe3ebc 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -461,11 +461,11 @@ void InventoryWindow::action(const ActionEvent &event)
if (eventId == "use")
{
- PlayerInfo::useEquipItem(item, true);
+ PlayerInfo::useEquipItem(item, Sfx_true);
}
if (eventId == "equip")
{
- PlayerInfo::useEquipItem2(item, true);
+ PlayerInfo::useEquipItem2(item, Sfx_true);
}
else if (eventId == "drop")
{
@@ -491,7 +491,7 @@ void InventoryWindow::action(const ActionEvent &event)
if (inputManager.isActionActive(static_cast<int>(
InputAction::STOP_ATTACK)))
{
- PlayerInfo::dropItem(item, item->getQuantity(), true);
+ PlayerInfo::dropItem(item, item->getQuantity(), Sfx_true);
}
else
{
@@ -647,7 +647,7 @@ void InventoryWindow::mouseClicked(MouseEvent &event)
}
else
{
- PlayerInfo::useEquipItem(item, true);
+ PlayerInfo::useEquipItem(item, Sfx_true);
}
}
else
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 2c6280ca7..c3eb60b89 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -65,7 +65,7 @@ void ItemAmountWindow::finish(const Item *const item,
tradeWindow->tradeItem(item, amount);
break;
case ItemDrop:
- PlayerInfo::dropItem(item, amount, true);
+ PlayerInfo::dropItem(item, amount, Sfx_true);
break;
case ItemSplit:
inventoryHandler->splitItem(item, amount);
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index 7080ee133..896136bb3 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -282,7 +282,7 @@ void OutfitWindow::wearOutfit(const int outfit, const bool unwearEmpty,
{
if (item->isEquipment() == Equipm_true)
{
- PlayerInfo::equipItem(item, false);
+ PlayerInfo::equipItem(item, Sfx_false);
isEmpty = false;
}
}
@@ -525,7 +525,7 @@ void OutfitWindow::unequipNotInOutfit(const int outfit) const
}
}
if (!found)
- PlayerInfo::unequipItem(item, false);
+ PlayerInfo::unequipItem(item, Sfx_false);
}
}
}
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 529b8131e..ca82c03c1 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -865,9 +865,11 @@ void ShopWindow::showList(const std::string &nick, std::string data)
void ShopWindow::processRequest(const std::string &nick, std::string data,
const int mode)
{
- if (!localPlayer || !mTradeNick.empty() || PlayerInfo::isTrading()
- || !actorManager
- || !actorManager->findBeingByName(nick, ActorType::Player))
+ if (!localPlayer ||
+ !mTradeNick.empty() ||
+ PlayerInfo::isTrading() == Trading_true ||
+ !actorManager ||
+ !actorManager->findBeingByName(nick, ActorType::Player))
{
return;
}
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 7dadbb18c..dfa5b1339 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -394,7 +394,7 @@ void TradeWindow::action(const ActionEvent &event)
{
setVisible(false);
reset();
- PlayerInfo::setTrading(false);
+ PlayerInfo::setTrading(Trading_false);
tradeHandler->cancel();
}
else if (eventId == "ok")