diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-10 01:53:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-10 01:53:49 +0300 |
commit | 2291f18b6366312916903de6cfe973379ebd536d (patch) | |
tree | 4d3f8ea4fa31f19dd402fc44089b129583a81a4e /src/gui | |
parent | 5ac88f3197be965804827751e8679cc6dd59b188 (diff) | |
download | manaplus-2291f18b6366312916903de6cfe973379ebd536d.tar.gz manaplus-2291f18b6366312916903de6cfe973379ebd536d.tar.bz2 manaplus-2291f18b6366312916903de6cfe973379ebd536d.tar.xz manaplus-2291f18b6366312916903de6cfe973379ebd536d.zip |
Add chat command for move monster in priority attack list into one position down.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 42 |
1 files changed, 4 insertions, 38 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index aa5a05625..47ef604be 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -1239,41 +1239,6 @@ void PopupMenu::handleLink(const std::string &link, dialog->setActionEventId("ok"); dialog->addActionListener(&mPlayerListener); } - else if (link == "priority movedown") - { - if (localPlayer && actorManager) - { - const int idx = actorManager - ->getPriorityAttackMobIndex(mName); - const int size = actorManager->getPriorityAttackMobsSize(); - if (idx + 1 < size) - { - std::list<std::string> mobs - = actorManager->getPriorityAttackMobs(); - std::list<std::string>::iterator it = mobs.begin(); - std::list<std::string>::iterator it2 = it; - while (it != mobs.end()) - { - if (*it == mName) - { - ++ it2; - if (it2 == mobs.end()) - break; - - mobs.splice(it, mobs, it2); - actorManager->setPriorityAttackMobs(mobs); - actorManager->rebuildPriorityAttackMobs(); - break; - } - ++ it; - ++ it2; - } - - if (socialWindow) - socialWindow->updateAttackFilter(); - } - } - } else if (link == "items" && being) { if (being == localPlayer) @@ -2075,9 +2040,10 @@ void PopupMenu::showAttackMonsterPopup(const int x, const int y, } if (idx + 1 < size) { - // TRANSLATORS: popup menu item - // TRANSLATORS: move attack target down - mBrowserBox->addRow("priority movedown", _("Move down")); + mBrowserBox->addRow("/movepriorityattackdown 'NAME'", + // TRANSLATORS: popup menu item + // TRANSLATORS: move attack target down + _("Move down")); } break; } |