summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-25 23:42:20 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-25 23:42:20 +0300
commit3529ae89be2b72e34d119ed4a2aca7b30403032c (patch)
tree3b6f795a2f6f9dc68b73daa877dd37c26772082a
parent81b70110b56fb44b913ad58e1640909c9a7a6d3c (diff)
downloadplus-3529ae89be2b72e34d119ed4a2aca7b30403032c.tar.gz
plus-3529ae89be2b72e34d119ed4a2aca7b30403032c.tar.bz2
plus-3529ae89be2b72e34d119ed4a2aca7b30403032c.tar.xz
plus-3529ae89be2b72e34d119ed4a2aca7b30403032c.zip
Move chat command /emote into actions.
-rw-r--r--src/actions/commands.cpp10
-rw-r--r--src/actions/commands.h1
-rw-r--r--src/commands.cpp10
-rw-r--r--src/commands.h5
-rw-r--r--src/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h9
6 files changed, 22 insertions, 14 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index a6d9d56a2..3a44a58b9 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -328,4 +328,14 @@ impHandler(commandOutfit)
return false;
}
+impHandler(commandEmote)
+{
+ if (localPlayer)
+ {
+ localPlayer->emote(static_cast<uint8_t>(atoi(event.args.c_str())));
+ return true;
+ }
+ return false;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index 3face961f..3577aab36 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -41,6 +41,7 @@ namespace Actions
decHandler(move);
decHandler(setTarget);
decHandler(commandOutfit);
+ decHandler(commandEmote);
} // namespace Actions
#undef decHandler
diff --git a/src/commands.cpp b/src/commands.cpp
index c5bc1e75e..9bf94be48 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -166,16 +166,6 @@ impHandler(navigate)
return true;
}
-impHandler(emote)
-{
- if (localPlayer)
- {
- localPlayer->emote(static_cast<uint8_t>(atoi(event.args.c_str())));
- return true;
- }
- return false;
-}
-
impHandler(emotePet)
{
// need use actual pet id
diff --git a/src/commands.h b/src/commands.h
index 60d759050..a1e826ee6 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -51,7 +51,6 @@ struct CommandInfo final
namespace Commands
{
- decHandler(emote);
decHandler(emotePet);
decHandler(away);
decHandler(pseudoAway);
@@ -112,8 +111,7 @@ namespace Commands
enum
{
- COMMAND_EMOTE = 0,
- COMMAND_EMOTEPET,
+ COMMAND_EMOTEPET = 0,
COMMAND_AWAY,
COMMAND_PSEUDOAWAY,
COMMAND_FOLLOW,
@@ -173,7 +171,6 @@ enum
static const CommandInfo commands[] =
{
- {"emote", &Commands::emote, -1, true},
{"emotepet", &Commands::emotePet, -1, true},
{"away", &Commands::away, -1, true},
{"pseudoaway", &Commands::pseudoAway, -1, true},
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index bb150b867..ef541cbe7 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -371,6 +371,7 @@ namespace InputAction
TARGET,
ATTACK_HUMAN,
COMMAMD_OUTFIT,
+ COMMAMD_EMOTE,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 8c76e65d8..42d664f66 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -3108,6 +3108,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputAction::NO_VALUE, 50,
InputCondition::INGAME,
"outfit",
+ true},
+ {"keyEmote",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT,
+ &Actions::commandEmote,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "emote",
true}
};