summaryrefslogtreecommitdiff
path: root/src/commandhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-08 04:54:13 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-08 04:54:13 +0300
commit30b2f0350767d4d0e78d27b9a1fd33e2095171b9 (patch)
tree753a5b2a235ec49deb768f18135d2e6640c9e759 /src/commandhandler.cpp
parent2f34575b834e2c70583af83a17da59750978f15e (diff)
downloadmanaverse-30b2f0350767d4d0e78d27b9a1fd33e2095171b9.tar.gz
manaverse-30b2f0350767d4d0e78d27b9a1fd33e2095171b9.tar.bz2
manaverse-30b2f0350767d4d0e78d27b9a1fd33e2095171b9.tar.xz
manaverse-30b2f0350767d4d0e78d27b9a1fd33e2095171b9.zip
Add chat command /setdrop N to set change drop counter.
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r--src/commandhandler.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index 4022d8d58..9f832c021 100644
--- a/src/commandhandler.cpp
+++ b/src/commandhandler.cpp
@@ -201,6 +201,8 @@ void CommandHandler::handleCommand(const std::string &command, ChatTab *tab)
handleServerIgnoreAll(args, tab);
else if (type == "serverunignoreall")
handleServerUnIgnoreAll(args, tab);
+ else if (type == "setdrop")
+ handleSetDrop(args, tab);
else if (type == "dumpg")
handleDumpGraphics(args, tab);
else if (type == "dumpt")
@@ -1187,6 +1189,13 @@ void CommandHandler::outStringNormal(ChatTab *tab, const std::string &str,
}
}
+void CommandHandler::handleSetDrop(const std::string &args,
+ ChatTab *tab A_UNUSED)
+{
+ if (player_node)
+ player_node->setQuickDropCounter(atoi(args.c_str()));
+}
+
#ifdef DEBUG_DUMP_LEAKS
void showRes(std::string str, ResourceManager::Resources *res);