summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 35fd376cc..79ed06f3c 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -1895,4 +1895,35 @@ impHandler0(outfitToChat)
return true;
}
+impHandler(moveAttackUp)
+{
+ const std::string args = event.args;
+ const int idx = actorManager->getAttackMobIndex(args);
+ if (idx > 0)
+ {
+ std::list<std::string> mobs
+ = actorManager->getAttackMobs();
+ std::list<std::string>::iterator it = mobs.begin();
+ std::list<std::string>::iterator it2 = it;
+ while (it != mobs.end())
+ {
+ if (*it == args)
+ {
+ -- it2;
+ mobs.splice(it2, mobs, it);
+ actorManager->setAttackMobs(mobs);
+ actorManager->rebuildAttackMobs();
+ break;
+ }
+ ++ it;
+ ++ it2;
+ }
+
+ if (socialWindow)
+ socialWindow->updateAttackFilter();
+ return true;
+ }
+ return false;
+}
+
} // namespace Actions