summaryrefslogtreecommitdiff
path: root/src/gui/popups
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-10 01:21:18 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-10 01:21:18 +0300
commit5ac88f3197be965804827751e8679cc6dd59b188 (patch)
treeb1b1852ba9c386029cdcc4128826d1bea4f955a9 /src/gui/popups
parent8ca5407776fa9c3038b608f9caf401952c2631d6 (diff)
downloadplus-5ac88f3197be965804827751e8679cc6dd59b188.tar.gz
plus-5ac88f3197be965804827751e8679cc6dd59b188.tar.bz2
plus-5ac88f3197be965804827751e8679cc6dd59b188.tar.xz
plus-5ac88f3197be965804827751e8679cc6dd59b188.zip
Add chat command for move monster in priority attack list into one position up.
Diffstat (limited to 'src/gui/popups')
-rw-r--r--src/gui/popups/popupmenu.cpp38
1 files changed, 4 insertions, 34 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index d1d5ddd8a..aa5a05625 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -1239,37 +1239,6 @@ void PopupMenu::handleLink(const std::string &link,
dialog->setActionEventId("ok");
dialog->addActionListener(&mPlayerListener);
}
- else if (link == "priority moveup")
- {
- if (actorManager)
- {
- const int idx = actorManager->
- getPriorityAttackMobIndex(mName);
- if (idx > 0)
- {
- 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;
- mobs.splice(it2, mobs, it);
- actorManager->setPriorityAttackMobs(mobs);
- actorManager->rebuildPriorityAttackMobs();
- break;
- }
- ++ it;
- ++ it2;
- }
-
- if (socialWindow)
- socialWindow->updateAttackFilter();
- }
- }
- }
else if (link == "priority movedown")
{
if (localPlayer && actorManager)
@@ -2099,9 +2068,10 @@ void PopupMenu::showAttackMonsterPopup(const int x, const int y,
const int size = actorManager->getPriorityAttackMobsSize();
if (idx > 0)
{
- // TRANSLATORS: popup menu item
- // TRANSLATORS: move attack target up
- mBrowserBox->addRow("priority moveup", _("Move up"));
+ mBrowserBox->addRow("/movepriorityattackup 'NAME'",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: move attack target up
+ _("Move up"));
}
if (idx + 1 < size)
{