diff options
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/commands.cpp | 31 | ||||
-rw-r--r-- | src/actions/commands.h | 1 |
2 files changed, 32 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 diff --git a/src/actions/commands.h b/src/actions/commands.h index 6295b7264..6b97f295e 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -153,6 +153,7 @@ namespace Actions decHandler(partyExpShare); decHandler(partyAutoItemShare); decHandler(outfitToChat); + decHandler(moveAttackUp); } // namespace Actions #undef decHandler |