summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-26 00:34:50 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-26 00:34:50 +0300
commit6e99f459bf4895e41118dbcf00ed3ba027b5b952 (patch)
treebfec435226b3f51509449a2fa7c606be9f2f2f65 /src
parent369dccecf7540c8ea3c050116c2fde5914e75a40 (diff)
downloadmv-6e99f459bf4895e41118dbcf00ed3ba027b5b952.tar.gz
mv-6e99f459bf4895e41118dbcf00ed3ba027b5b952.tar.bz2
mv-6e99f459bf4895e41118dbcf00ed3ba027b5b952.tar.xz
mv-6e99f459bf4895e41118dbcf00ed3ba027b5b952.zip
Move chat command /pseudoaway into actions.
Diffstat (limited to 'src')
-rw-r--r--src/actions/commands.cpp11
-rw-r--r--src/actions/commands.h1
-rw-r--r--src/commands.cpp11
-rw-r--r--src/commands.h5
-rw-r--r--src/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h9
6 files changed, 23 insertions, 15 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 84e093a40..e32aee7a3 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -357,4 +357,15 @@ impHandler(awayMessage)
return false;
}
+impHandler(pseudoAway)
+{
+ if (localPlayer)
+ {
+ localPlayer->setPseudoAway(event.args);
+ localPlayer->updateStatus();
+ return true;
+ }
+ return false;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index 961029002..8f6813210 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -44,6 +44,7 @@ namespace Actions
decHandler(commandEmote);
decHandler(commandEmotePet);
decHandler(awayMessage);
+ decHandler(pseudoAway);
} // namespace Actions
#undef decHandler
diff --git a/src/commands.cpp b/src/commands.cpp
index 279027306..68a40bbcc 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -166,17 +166,6 @@ impHandler(navigate)
return true;
}
-impHandler(pseudoAway)
-{
- if (localPlayer)
- {
- localPlayer->setPseudoAway(event.args);
- localPlayer->updateStatus();
- return true;
- }
- return false;
-}
-
impHandler(follow)
{
if (!localPlayer)
diff --git a/src/commands.h b/src/commands.h
index d14d47dab..761af598a 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -51,7 +51,6 @@ struct CommandInfo final
namespace Commands
{
- decHandler(pseudoAway);
decHandler(follow);
decHandler(imitation);
decHandler(heal);
@@ -109,8 +108,7 @@ namespace Commands
enum
{
- COMMAND_PSEUDOAWAY = 0,
- COMMAND_FOLLOW,
+ COMMAND_FOLLOW = 0,
COMMAND_HEAL,
COMMAND_NAVIGATE,
COMMAND_IMITATION,
@@ -167,7 +165,6 @@ enum
static const CommandInfo commands[] =
{
- {"pseudoaway", &Commands::pseudoAway, -1, true},
{"follow", &Commands::follow, -1, true},
{"heal", &Commands::heal, -1, true},
{"navigate", &Commands::navigate, -1, true},
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index 44cb67704..007d03d66 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -374,6 +374,7 @@ namespace InputAction
COMMAMD_EMOTE,
COMMAND_EMOTE_PET,
AWAY_MESSAGE,
+ PSEUDO_AWAY,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 1a67b32c0..08b8b7c40 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -3136,6 +3136,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputCondition::INGAME,
"away",
true},
+ {"keyPseudoAway",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT,
+ &Actions::pseudoAway,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "pseudoaway",
+ true}
};
#endif // INPUT_INPUTACTIONMAP_H