diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-26 21:43:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-26 21:43:19 +0300 |
commit | 0888773fc1de5cc2aa1d92564e8d05231189e6f9 (patch) | |
tree | 001209ae09a69d15d29007d8a1762de56c94e362 /src/actions | |
parent | ac2cda962d5fc3e23858527be45a8ae7b9856b84 (diff) | |
download | manaverse-0888773fc1de5cc2aa1d92564e8d05231189e6f9.tar.gz manaverse-0888773fc1de5cc2aa1d92564e8d05231189e6f9.tar.bz2 manaverse-0888773fc1de5cc2aa1d92564e8d05231189e6f9.tar.xz manaverse-0888773fc1de5cc2aa1d92564e8d05231189e6f9.zip |
Move chat command /addattack into actions.
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/commands.cpp | 13 | ||||
-rw-r--r-- | src/actions/commands.h | 1 |
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 |