summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-26 21:43:19 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-26 21:43:19 +0300
commit0888773fc1de5cc2aa1d92564e8d05231189e6f9 (patch)
tree001209ae09a69d15d29007d8a1762de56c94e362 /src/actions
parentac2cda962d5fc3e23858527be45a8ae7b9856b84 (diff)
downloadmanaplus-0888773fc1de5cc2aa1d92564e8d05231189e6f9.tar.gz
manaplus-0888773fc1de5cc2aa1d92564e8d05231189e6f9.tar.bz2
manaplus-0888773fc1de5cc2aa1d92564e8d05231189e6f9.tar.xz
manaplus-0888773fc1de5cc2aa1d92564e8d05231189e6f9.zip
Move chat command /addattack into actions.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp13
-rw-r--r--src/actions/commands.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index ab45786e1..78a2fc0e5 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -483,4 +483,17 @@ impHandler(addPriorityAttack)
return true;
}
+impHandler(addAttack)
+{
+ if (!actorManager || actorManager->isInAttackList(event.args))
+ return false;
+
+ actorManager->removeAttackMob(event.args);
+ actorManager->addAttackMob(event.args);
+
+ if (socialWindow)
+ socialWindow->updateAttackFilter();
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index 2008f865b..a1e7b86f9 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -52,6 +52,7 @@ namespace Actions
decHandler(info);
decHandler(wait);
decHandler(addPriorityAttack);
+ decHandler(addAttack);
} // namespace Actions
#undef decHandler