diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-21 17:22:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-21 17:24:16 +0300 |
commit | d26b49843ee33ca927cc46edc8cc0bdfe97a903a (patch) | |
tree | 3edffa15445a159d0533fa86568adfb576bbb32d | |
parent | 5b907fc3c1c21f69f1b86d4e3c16990dd2bff757 (diff) | |
download | plus-d26b49843ee33ca927cc46edc8cc0bdfe97a903a.tar.gz plus-d26b49843ee33ca927cc46edc8cc0bdfe97a903a.tar.bz2 plus-d26b49843ee33ca927cc46edc8cc0bdfe97a903a.tar.xz plus-d26b49843ee33ca927cc46edc8cc0bdfe97a903a.zip |
Add chat command and action for fire mercenary.
New chat command: /firemercenary.
-rw-r--r-- | src/actions/actions.cpp | 7 | ||||
-rw-r--r-- | src/actions/actions.h | 1 | ||||
-rw-r--r-- | src/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 9 | ||||
-rw-r--r-- | src/input/pages/other.cpp | 6 |
5 files changed, 24 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 1c6fc3194..f1c62441d 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -66,6 +66,7 @@ #include "net/download.h" #include "net/gamehandler.h" #include "net/ipc.h" +#include "net/mercenaryhandler.h" #include "net/net.h" #include "net/pethandler.h" #include "net/playerhandler.h" @@ -1174,4 +1175,10 @@ impHandler(catchPet) return true; } +impHandler0(mercenaryFire) +{ + mercenaryHandler->fire(); + return true; +} + } // namespace Actions diff --git a/src/actions/actions.h b/src/actions/actions.h index d03c8b8ac..ed8cf980c 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -89,6 +89,7 @@ namespace Actions decHandler(uploadServerConfig); decHandler(uploadLog); decHandler(catchPet); + decHandler(mercenaryFire); } // namespace Actions #undef decHandler diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 2ce0518cc..fa9ff9745 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -480,6 +480,7 @@ namespace InputAction CATCH_PET, IGNORE_WHISPER, UNIGNORE_WHISPER, + MERCENARY_FIRE, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 3e95f4291..957c9a36a 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -4062,6 +4062,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputCondition::INGAME, "serverunignore", false}, + {"keyMercenaryFire", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::mercenaryFire, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "mercenaryfire|firemercenary", + false} }; #endif // INPUT_INPUTACTIONMAP_H diff --git a/src/input/pages/other.cpp b/src/input/pages/other.cpp index 3994b00f5..4077b13bc 100644 --- a/src/input/pages/other.cpp +++ b/src/input/pages/other.cpp @@ -364,6 +364,12 @@ SetupActionData setupActionDataOther[] = "", }, { + // TRANSLATORS: input action name + N_("Fire your mercenary"), + InputAction::MERCENARY_FIRE, + "", + }, + { "", InputAction::NO_VALUE, "" |