diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-26 00:02:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-26 00:02:45 +0300 |
commit | 1333ccee41e2acca4ecf4a90a6b230e8bbd23f7d (patch) | |
tree | a7b4c4aef5a3e5f03bb0e5ca38c9d7946275a584 /src | |
parent | 3529ae89be2b72e34d119ed4a2aca7b30403032c (diff) | |
download | manaverse-1333ccee41e2acca4ecf4a90a6b230e8bbd23f7d.tar.gz manaverse-1333ccee41e2acca4ecf4a90a6b230e8bbd23f7d.tar.bz2 manaverse-1333ccee41e2acca4ecf4a90a6b230e8bbd23f7d.tar.xz manaverse-1333ccee41e2acca4ecf4a90a6b230e8bbd23f7d.zip |
Move chat command /emotepet into actions.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/commands.cpp | 9 | ||||
-rw-r--r-- | src/actions/commands.h | 1 | ||||
-rw-r--r-- | src/commands.cpp | 7 | ||||
-rw-r--r-- | src/commands.h | 5 | ||||
-rw-r--r-- | src/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 9 |
6 files changed, 21 insertions, 11 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 3a44a58b9..2ee223386 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -69,6 +69,7 @@ #include "gui/widgets/tabs/whispertab.h" #include "net/adminhandler.h" +#include "net/pethandler.h" #include "net/net.h" #include "utils/gettext.h" @@ -338,4 +339,12 @@ impHandler(commandEmote) return false; } +impHandler(commandEmotePet) +{ + // need use actual pet id + Net::getPetHandler()->emote(static_cast<uint8_t>( + atoi(event.args.c_str())), 0); + return true; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index 3577aab36..4b0150d12 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -42,6 +42,7 @@ namespace Actions decHandler(setTarget); decHandler(commandOutfit); decHandler(commandEmote); + decHandler(commandEmotePet); } // namespace Actions #undef decHandler diff --git a/src/commands.cpp b/src/commands.cpp index 9bf94be48..f8e391a41 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -166,13 +166,6 @@ impHandler(navigate) return true; } -impHandler(emotePet) -{ - // need use actual pet id - Net::getPetHandler()->emote(static_cast<uint8_t>(atoi(event.args.c_str())), 0); - return true; -} - impHandler(away) { if (localPlayer) diff --git a/src/commands.h b/src/commands.h index a1e826ee6..e29ea7d2b 100644 --- a/src/commands.h +++ b/src/commands.h @@ -51,7 +51,6 @@ struct CommandInfo final namespace Commands { - decHandler(emotePet); decHandler(away); decHandler(pseudoAway); decHandler(follow); @@ -111,8 +110,7 @@ namespace Commands enum { - COMMAND_EMOTEPET = 0, - COMMAND_AWAY, + COMMAND_AWAY = 0, COMMAND_PSEUDOAWAY, COMMAND_FOLLOW, COMMAND_HEAL, @@ -171,7 +169,6 @@ enum static const CommandInfo commands[] = { - {"emotepet", &Commands::emotePet, -1, true}, {"away", &Commands::away, -1, true}, {"pseudoaway", &Commands::pseudoAway, -1, true}, {"follow", &Commands::follow, -1, true}, diff --git a/src/input/inputaction.h b/src/input/inputaction.h index ef541cbe7..c58de0c58 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -372,6 +372,7 @@ namespace InputAction ATTACK_HUMAN, COMMAMD_OUTFIT, COMMAMD_EMOTE, + COMMAND_EMOTE_PET, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 42d664f66..63dbb622c 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -3117,6 +3117,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputAction::NO_VALUE, 50, InputCondition::INGAME, "emote", + true}, + {"keyEmotePet", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::commandEmotePet, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "emotepet", true} }; |