From 2291f18b6366312916903de6cfe973379ebd536d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 10 May 2017 01:53:49 +0300 Subject: Add chat command for move monster in priority attack list into one position down. --- src/gui/popups/popupmenu.cpp | 42 ++++-------------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) (limited to 'src/gui') 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 mobs - = actorManager->getPriorityAttackMobs(); - std::list::iterator it = mobs.begin(); - std::list::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; } -- cgit v1.2.3-70-g09d2