summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-26 21:47:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-26 21:47:16 +0300
commit8c53409bb625415ddc6fe131061c7e540d56a67e (patch)
tree95ba8f651a4d15794c0fdf5aebb86e88f56480ca /src/actions
parent0888773fc1de5cc2aa1d92564e8d05231189e6f9 (diff)
downloadmv-8c53409bb625415ddc6fe131061c7e540d56a67e.tar.gz
mv-8c53409bb625415ddc6fe131061c7e540d56a67e.tar.bz2
mv-8c53409bb625415ddc6fe131061c7e540d56a67e.tar.xz
mv-8c53409bb625415ddc6fe131061c7e540d56a67e.zip
Move chat command /removeattack into actions.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp15
-rw-r--r--src/actions/commands.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 78a2fc0e5..b4ab52ba8 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -496,4 +496,19 @@ impHandler(addAttack)
return true;
}
+impHandler(removeAttack)
+{
+ if (!actorManager || event.args.empty()
+ || !actorManager->isInAttackList(event.args))
+ {
+ return false;
+ }
+
+ actorManager->removeAttackMob(event.args);
+
+ if (socialWindow)
+ socialWindow->updateAttackFilter();
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index a1e7b86f9..9686b59d2 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -53,6 +53,7 @@ namespace Actions
decHandler(wait);
decHandler(addPriorityAttack);
decHandler(addAttack);
+ decHandler(removeAttack);
} // namespace Actions
#undef decHandler