diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-26 22:12:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-26 22:12:34 +0300 |
commit | f2849928b3eca83581ba77be8bf3b002085fdc9a (patch) | |
tree | 8e9acff94a1f17726828fabd28e40543535c15dd /src/actions | |
parent | 8c53409bb625415ddc6fe131061c7e540d56a67e (diff) | |
download | mv-f2849928b3eca83581ba77be8bf3b002085fdc9a.tar.gz mv-f2849928b3eca83581ba77be8bf3b002085fdc9a.tar.bz2 mv-f2849928b3eca83581ba77be8bf3b002085fdc9a.tar.xz mv-f2849928b3eca83581ba77be8bf3b002085fdc9a.zip |
Move chat command /addignoreattack 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 b4ab52ba8..80e7493da 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -511,4 +511,17 @@ impHandler(removeAttack) return true; } +impHandler(addIgnoreAttack) +{ + if (!actorManager || actorManager->isInIgnoreAttackList(event.args)) + return false; + + actorManager->removeAttackMob(event.args); + actorManager->addIgnoreAttackMob(event.args); + + if (socialWindow) + socialWindow->updateAttackFilter(); + return true; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index 9686b59d2..8b02a7322 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -54,6 +54,7 @@ namespace Actions decHandler(addPriorityAttack); decHandler(addAttack); decHandler(removeAttack); + decHandler(addIgnoreAttack); } // namespace Actions #undef decHandler |