diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-04 15:19:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-04 15:19:53 +0300 |
commit | a553b3cda91aa095d88e22abcaa81701c2894334 (patch) | |
tree | cb44d56a66896fdbf4eaf9673901ee9cf3a60a73 /src/gui/popups/popupmenu.cpp | |
parent | 343809fe458a08bf96fe4f537db2d81d7523632e (diff) | |
download | manaplus-a553b3cda91aa095d88e22abcaa81701c2894334.tar.gz manaplus-a553b3cda91aa095d88e22abcaa81701c2894334.tar.bz2 manaplus-a553b3cda91aa095d88e22abcaa81701c2894334.tar.xz manaplus-a553b3cda91aa095d88e22abcaa81701c2894334.zip |
move equip/unequip/use calls into playerinfo.
Diffstat (limited to 'src/gui/popups/popupmenu.cpp')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 16 |
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) |