diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-13 13:02:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-13 13:02:11 +0300 |
commit | 541874a24b10ce5db77a6ef2d952c0c4481af92a (patch) | |
tree | 70ba38399a0b73e47261ca27afbc2f85006e7b71 /src | |
parent | be1dd6434f993fba9e944cda9e83e0fae32e8c14 (diff) | |
download | manaplus-541874a24b10ce5db77a6ef2d952c0c4481af92a.tar.gz manaplus-541874a24b10ce5db77a6ef2d952c0c4481af92a.tar.bz2 manaplus-541874a24b10ce5db77a6ef2d952c0c4481af92a.tar.xz manaplus-541874a24b10ce5db77a6ef2d952c0c4481af92a.zip |
Use command /dropinv in popup menu.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 0e357a94f..0327914fa 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -1742,6 +1742,10 @@ void PopupMenu::handleLink(const std::string &link, replaceAll(cmd, "'ITEMCOLOR'", toString(mItemColor)); replaceAll(cmd, "'BEINGTYPEID'", toString(mType)); replaceAll(cmd, "'PLAYER'", localPlayer->getName()); + if (mItem) + replaceAll(cmd, "'INVINDEX'", toString(mItem->getInvIndex())); + else + replaceAll(cmd, "'INVINDEX'", "0"); const size_t pos = cmd.find(' '); const std::string type(cmd, 0, pos); @@ -2720,7 +2724,7 @@ void PopupMenu::addUseDrop(const Item *const item, const bool isProtected) { // TRANSLATORS: popup menu item // TRANSLATORS: drop item - mBrowserBox->addRow("/dropitem 'ITEMID'", _("Drop...")); + mBrowserBox->addRow("/dropinv 'INVINDEX'", _("Drop...")); // TRANSLATORS: popup menu item // TRANSLATORS: drop all item amount mBrowserBox->addRow("/dropitemall 'ITEMID'", _("Drop all")); @@ -2729,7 +2733,7 @@ void PopupMenu::addUseDrop(const Item *const item, const bool isProtected) { // TRANSLATORS: popup menu item // TRANSLATORS: drop item - mBrowserBox->addRow("/dropitem 'ITEMID'", _("Drop")); + mBrowserBox->addRow("/dropinv 'INVINDEX'", _("Drop")); } } } |