summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-21 17:52:18 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-21 18:03:13 +0300
commit94e909f4ae557eea6f2cc7737d14c46968920b18 (patch)
tree76639ed4f19a3c42cdd593f33532b1f7e9ac61fd
parentd26b49843ee33ca927cc46edc8cc0bdfe97a903a (diff)
downloadmv-94e909f4ae557eea6f2cc7737d14c46968920b18.tar.gz
mv-94e909f4ae557eea6f2cc7737d14c46968920b18.tar.bz2
mv-94e909f4ae557eea6f2cc7737d14c46968920b18.tar.xz
mv-94e909f4ae557eea6f2cc7737d14c46968920b18.zip
Add action for targetting mercenaries.
New chat command: targetmercenary
-rw-r--r--src/actions/target.cpp5
-rw-r--r--src/actions/target.h1
-rw-r--r--src/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h9
-rw-r--r--src/input/pages/basic.cpp6
5 files changed, 22 insertions, 0 deletions
diff --git a/src/actions/target.cpp b/src/actions/target.cpp
index c4c314ddb..95cb6ebbb 100644
--- a/src/actions/target.cpp
+++ b/src/actions/target.cpp
@@ -66,4 +66,9 @@ impHandler0(targetNPC)
return setTarget(ActorType::Npc, true);
}
+impHandler0(targetMercenary)
+{
+ return setTarget(ActorType::Mercenary, true);
+}
+
} // namespace Actions
diff --git a/src/actions/target.h b/src/actions/target.h
index 529f339ce..0bb760835 100644
--- a/src/actions/target.h
+++ b/src/actions/target.h
@@ -31,6 +31,7 @@ namespace Actions
decHandler(targetMonster);
decHandler(targetClosestMonster);
decHandler(targetNPC);
+ decHandler(targetMercenary);
} // namespace Actions
#undef decHandler
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index fa9ff9745..6ca667f76 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -481,6 +481,7 @@ namespace InputAction
IGNORE_WHISPER,
UNIGNORE_WHISPER,
MERCENARY_FIRE,
+ TARGET_MERCENARY,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 957c9a36a..58ca20e6a 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -4070,6 +4070,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputAction::NO_VALUE, 50,
InputCondition::INGAME,
"mercenaryfire|firemercenary",
+ false},
+ {"keyTargetMercenary",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT,
+ &Actions::targetMercenary,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME | InputCondition::NOTARGET,
+ "targetmercenary",
false}
};
diff --git a/src/input/pages/basic.cpp b/src/input/pages/basic.cpp
index 8975c23a4..dd1efc0bb 100644
--- a/src/input/pages/basic.cpp
+++ b/src/input/pages/basic.cpp
@@ -129,6 +129,12 @@ SetupActionData setupActionDataBasic[] =
},
{
// TRANSLATORS: input action name
+ N_("Target mercenary"),
+ InputAction::TARGET_MERCENARY,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
N_("Catch pet"),
InputAction::CATCH_PET,
"",