diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-23 15:02:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-23 15:02:35 +0300 |
commit | e07a6a1cb8cd414f0b0a8de21903cd621582a906 (patch) | |
tree | 5058fbac6ee8d57a794cd32b5e93798d8818b406 /src | |
parent | ab5e3e053a31efdc5799c1239e2bceaacf7cff61 (diff) | |
download | mv-e07a6a1cb8cd414f0b0a8de21903cd621582a906.tar.gz mv-e07a6a1cb8cd414f0b0a8de21903cd621582a906.tar.bz2 mv-e07a6a1cb8cd414f0b0a8de21903cd621582a906.tar.xz mv-e07a6a1cb8cd414f0b0a8de21903cd621582a906.zip |
Add action for targetting pets.
New chat command: targetpet
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/target.cpp | 5 | ||||
-rw-r--r-- | src/actions/target.h | 1 | ||||
-rw-r--r-- | src/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 9 | ||||
-rw-r--r-- | src/input/pages/basic.cpp | 6 |
5 files changed, 22 insertions, 0 deletions
diff --git a/src/actions/target.cpp b/src/actions/target.cpp index 95cb6ebbb..8212a3a97 100644 --- a/src/actions/target.cpp +++ b/src/actions/target.cpp @@ -71,4 +71,9 @@ impHandler0(targetMercenary) return setTarget(ActorType::Mercenary, true); } +impHandler0(targetPet) +{ + return setTarget(ActorType::Pet, true); +} + } // namespace Actions diff --git a/src/actions/target.h b/src/actions/target.h index 0bb760835..50ac1e63e 100644 --- a/src/actions/target.h +++ b/src/actions/target.h @@ -32,6 +32,7 @@ namespace Actions decHandler(targetClosestMonster); decHandler(targetNPC); decHandler(targetMercenary); + decHandler(targetPet); } // namespace Actions #undef decHandler diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 6ca667f76..422a141ae 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -482,6 +482,7 @@ namespace InputAction UNIGNORE_WHISPER, MERCENARY_FIRE, TARGET_MERCENARY, + TARGET_PET, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 58ca20e6a..edd9620be 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -4079,6 +4079,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputAction::NO_VALUE, 50, InputCondition::INGAME | InputCondition::NOTARGET, "targetmercenary", + false}, + {"keyTargetPet", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::targetPet, + InputAction::NO_VALUE, 50, + InputCondition::INGAME | InputCondition::NOTARGET, + "targetpet", false} }; diff --git a/src/input/pages/basic.cpp b/src/input/pages/basic.cpp index dd1efc0bb..df573389d 100644 --- a/src/input/pages/basic.cpp +++ b/src/input/pages/basic.cpp @@ -135,6 +135,12 @@ SetupActionData setupActionDataBasic[] = }, { // TRANSLATORS: input action name + N_("Target pet"), + InputAction::TARGET_PET, + "", + }, + { + // TRANSLATORS: input action name N_("Catch pet"), InputAction::CATCH_PET, "", |