From e36c735ce6569cd9c0e668632e59bcbe3280d507 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 11 Jul 2013 20:49:20 +0300 Subject: Add chat command for gms for creating items. New command: /createitems It will open creation window. --- src/net/ea/adminhandler.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/net/ea/adminhandler.cpp') diff --git a/src/net/ea/adminhandler.cpp b/src/net/ea/adminhandler.cpp index 0d2245330..9e1956edd 100644 --- a/src/net/ea/adminhandler.cpp +++ b/src/net/ea/adminhandler.cpp @@ -28,6 +28,8 @@ #include "debug.h" +extern int serverVersion; + namespace Ea { @@ -70,4 +72,18 @@ void AdminHandler::warp(const std::string &map, const int x, const int y) const "@warp %s %d %d", map.c_str(), x, y), GENERAL_CHANNEL); } +void AdminHandler::createItems(const int id, const int color, const int amount) +{ + if (serverVersion < 1) + { + Net::getChatHandler()->talk(strprintf("@item %d %d", + id, amount), GENERAL_CHANNEL); + } + else + { + Net::getChatHandler()->talk(strprintf("@item %d %d %d", + id, color, amount), GENERAL_CHANNEL); + } +} + } // namespace Ea -- cgit v1.2.3-60-g2f50