summaryrefslogtreecommitdiff
path: root/src/commands.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands.h')
-rw-r--r--src/commands.h170
1 files changed, 91 insertions, 79 deletions
diff --git a/src/commands.h b/src/commands.h
index f990ab69a..182faa895 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -24,6 +24,7 @@
#define COMMANDS_H
#include "playerrelations.h"
+#include "keydata.h"
#include <string>
@@ -42,6 +43,7 @@ struct CommandInfo
{
const char *name;
CommandFuncPtr func;
+ int actionId;
};
namespace Commands
@@ -204,91 +206,101 @@ enum
COMMAND_REMOVENAME,
COMMAND_DISABLEAWAY,
COMMAND_ENABLEAWAY,
+ COMMAND_DROP,
+ COMMAND_DROPN,
+ COMMAND_MOVETOTARGET,
+ COMMAND_MOVETOHOME,
+ COMMAND_SETHOME,
COMMAND_HACK,
END_COMMANDS,
};
static const CommandInfo commands[] =
{
- {"closeall", &Commands::closeAll},
- {"ignoreall", &Commands::ignoreAll},
- {"help", &Commands::help},
- {"announce", &Commands::announce},
- {"where", &Commands::where},
- {"who", &Commands::who},
- {"msg", Commands::msg},
- {"whisper", Commands::msg},
- {"w", &Commands::msg},
- {"query", Commands::query},
- {"q", &Commands::query},
- {"ignore", &Commands::ignore},
- {"unignore", &Commands::unignore},
- {"friend", Commands::beFriend},
- {"befriend", &Commands::beFriend},
- {"disregard", &Commands::disregard},
- {"neutral", &Commands::neutral},
- {"blacklist", &Commands::blackList},
- {"enemy", &Commands::enemy},
- {"erase", &Commands::erase},
- {"clear", &Commands::clear},
- {"cleangraphics", &Commands::cleanGraphics},
- {"cleanfonts", &Commands::cleanFonts},
- {"createparty", &Commands::createParty},
- {"createguild", &Commands::createGuild},
- {"party", &Commands::party},
- {"me", &Commands::me},
- {"toggle", &Commands::toggle},
- {"present", &Commands::present},
- {"quit", &Commands::quit},
- {"all", &Commands::showAll},
- {"move", &Commands::move},
- {"target", &Commands::target},
- {"atkhuman", &Commands::attackHuman},
- {"outfit", &Commands::outfit},
- {"emote", &Commands::emote},
- {"away", &Commands::away},
- {"pseudoaway", &Commands::pseudoAway},
- {"follow", &Commands::follow},
- {"heal", &Commands::heal},
- {"navigate", &Commands::navigate},
- {"imitation", &Commands::imitation},
- {"mail", &Commands::mail},
- {"trade", &Commands::trade},
- {"priceload", &Commands::priceLoad},
- {"pricesave", &Commands::priceSave},
- {"cacheinfo", &Commands::cacheInfo},
- {"disconnect", &Commands::disconnect},
- {"undress", &Commands::undress},
- {"attack", &Commands::attack},
- {"dirs", &Commands::dirs},
- {"info", &Commands::info},
- {"wait", &Commands::wait},
- {"uptime", &Commands::uptime},
- {"addpriorityattack", &Commands::addPriorityAttack},
- {"addattack", &Commands::addAttack},
- {"removeattack", Commands::removeAttack},
- {"removeignoreattack", &Commands::removeAttack},
- {"addignoreattack", &Commands::addIgnoreAttack},
- {"dump", &Commands::dump},
- {"serverignoreall", &Commands::serverIgnoreAll},
- {"serverunignoreall", &Commands::serverUnIgnoreAll},
- {"setdrop", &Commands::setDrop},
- {"error", &Commands::error},
- {"dumpg", &Commands::dumpGraphics},
- {"dumpe", &Commands::dumpEnvironment},
- {"dumpt", &Commands::dumpTests},
- {"dumpogl", &Commands::dumpOGL},
- {"url", &Commands::url},
- {"open", &Commands::open},
- {"execute", &Commands::execute},
- {"testsdlfont", &Commands::testsdlfont},
- {"enablehighlight", &Commands::enableHighlight},
- {"disablehighlight", &Commands::disableHighlight},
- {"", &Commands::dontRemoveName},
- {"", &Commands::removeName},
- {"disableaway", &Commands::disableAway},
- {"enableaway", &Commands::enableAway},
- {"hack", &Commands::hack}
+ {"closeall", &Commands::closeAll, -1},
+ {"ignoreall", &Commands::ignoreAll, -1},
+ {"help", &Commands::help, -1},
+ {"announce", &Commands::announce, -1},
+ {"where", &Commands::where, -1},
+ {"who", &Commands::who, -1},
+ {"msg", Commands::msg, -1},
+ {"whisper", Commands::msg, -1},
+ {"w", &Commands::msg, -1},
+ {"query", Commands::query, -1},
+ {"q", &Commands::query, -1},
+ {"ignore", &Commands::ignore, -1},
+ {"unignore", &Commands::unignore, -1},
+ {"friend", Commands::beFriend, -1},
+ {"befriend", &Commands::beFriend, -1},
+ {"disregard", &Commands::disregard, -1},
+ {"neutral", &Commands::neutral, -1},
+ {"blacklist", &Commands::blackList, -1},
+ {"enemy", &Commands::enemy, -1},
+ {"erase", &Commands::erase, -1},
+ {"clear", &Commands::clear, -1},
+ {"cleangraphics", &Commands::cleanGraphics, -1},
+ {"cleanfonts", &Commands::cleanFonts, -1},
+ {"createparty", &Commands::createParty, -1},
+ {"createguild", &Commands::createGuild, -1},
+ {"party", &Commands::party, -1},
+ {"me", &Commands::me, -1},
+ {"toggle", &Commands::toggle, -1},
+ {"present", &Commands::present, -1},
+ {"quit", &Commands::quit, -1},
+ {"all", &Commands::showAll, -1},
+ {"move", &Commands::move, -1},
+ {"target", &Commands::target, -1},
+ {"atkhuman", &Commands::attackHuman, -1},
+ {"outfit", &Commands::outfit, -1},
+ {"emote", &Commands::emote, -1},
+ {"away", &Commands::away, -1},
+ {"pseudoaway", &Commands::pseudoAway, -1},
+ {"follow", &Commands::follow, -1},
+ {"heal", &Commands::heal, -1},
+ {"navigate", &Commands::navigate, -1},
+ {"imitation", &Commands::imitation, -1},
+ {"mail", &Commands::mail, -1},
+ {"trade", &Commands::trade, -1},
+ {"priceload", &Commands::priceLoad, -1},
+ {"pricesave", &Commands::priceSave, -1},
+ {"cacheinfo", &Commands::cacheInfo, -1},
+ {"disconnect", &Commands::disconnect, -1},
+ {"undress", &Commands::undress, -1},
+ {"attack", &Commands::attack, -1},
+ {"dirs", &Commands::dirs, -1},
+ {"info", &Commands::info, -1},
+ {"wait", &Commands::wait, -1},
+ {"uptime", &Commands::uptime, -1},
+ {"addpriorityattack", &Commands::addPriorityAttack, -1},
+ {"addattack", &Commands::addAttack, -1},
+ {"removeattack", Commands::removeAttack, -1},
+ {"removeignoreattack", &Commands::removeAttack, -1},
+ {"addignoreattack", &Commands::addIgnoreAttack, -1},
+ {"dump", &Commands::dump, -1},
+ {"serverignoreall", &Commands::serverIgnoreAll, -1},
+ {"serverunignoreall", &Commands::serverUnIgnoreAll, -1},
+ {"setdrop", &Commands::setDrop, -1},
+ {"error", &Commands::error, -1},
+ {"dumpg", &Commands::dumpGraphics, -1},
+ {"dumpe", &Commands::dumpEnvironment, -1},
+ {"dumpt", &Commands::dumpTests, -1},
+ {"dumpogl", &Commands::dumpOGL, -1},
+ {"url", &Commands::url, -1},
+ {"open", &Commands::open, -1},
+ {"execute", &Commands::execute, -1},
+ {"testsdlfont", &Commands::testsdlfont, -1},
+ {"enablehighlight", &Commands::enableHighlight, -1},
+ {"disablehighlight", &Commands::disableHighlight, -1},
+ {"", &Commands::dontRemoveName, -1},
+ {"", &Commands::removeName, -1},
+ {"disableaway", &Commands::disableAway, -1},
+ {"enableaway", &Commands::enableAway, -1},
+ {"drop", nullptr, Input::KEY_QUICK_DROP},
+ {"dropn", nullptr, Input::KEY_QUICK_DROPN},
+ {"movetotarget", nullptr, Input::KEY_MOVE_TO_TARGET},
+ {"movetohome", nullptr, Input::KEY_MOVE_TO_HOME},
+ {"sethome", nullptr, Input::KEY_SET_HOME},
+ {"hack", &Commands::hack, -1}
};
#undef decHandler