summaryrefslogtreecommitdiff
path: root/src/gui/popups
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/popups')
-rw-r--r--src/gui/popups/popupmenu.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 015067a6f..459925bd0 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -1012,21 +1012,7 @@ void PopupMenu::handleLink(const std::string &link,
if (inv)
{
const Item *const item = inv->findItem(mItemId, mItemColor);
- if (item)
- {
- if (item->isEquipment())
- {
- if (item->isEquipped())
- Net::getInventoryHandler()->unequipItem(item);
- else
- Net::getInventoryHandler()->equipItem(item);
- }
- else
- {
- if (!PlayerInfo::isItemProtected(item->getId()))
- Net::getInventoryHandler()->useItem(item);
- }
- }
+ PlayerInfo::useEquipItem(item);
}
}
else if (mItemId < SKILL_MIN_ID && spellManager)