summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-24 20:15:18 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-24 20:15:18 +0300
commite0b4a2665505279e58f2a618272db5245f275518 (patch)
treee973687cba28b78f27e9527743e0c57d6f9619f5 /src/net/ea
parent61de258859b600011284a49d54bca1f31ecb6d3d (diff)
downloadplus-e0b4a2665505279e58f2a618272db5245f275518.tar.gz
plus-e0b4a2665505279e58f2a618272db5245f275518.tar.bz2
plus-e0b4a2665505279e58f2a618272db5245f275518.tar.xz
plus-e0b4a2665505279e58f2a618272db5245f275518.zip
Add chat command /spawn. Also add it to monster context menu.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/adminhandler.cpp5
-rw-r--r--src/net/ea/adminhandler.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/net/ea/adminhandler.cpp b/src/net/ea/adminhandler.cpp
index 8aa0fc041..d209cc47f 100644
--- a/src/net/ea/adminhandler.cpp
+++ b/src/net/ea/adminhandler.cpp
@@ -92,4 +92,9 @@ void AdminHandler::slide(const int x, const int y) const
}
}
+void AdminHandler::spawn(const std::string &name) const
+{
+ chatHandler->talk("@spawn " + name, GENERAL_CHANNEL);
+}
+
} // namespace Ea
diff --git a/src/net/ea/adminhandler.h b/src/net/ea/adminhandler.h
index 9acb1c8f3..3d6adf433 100644
--- a/src/net/ea/adminhandler.h
+++ b/src/net/ea/adminhandler.h
@@ -60,6 +60,8 @@ class AdminHandler notfinal : public Net::AdminHandler
void createItems(const int id,
const ItemColor color,
const int amount) const override final;
+
+ void spawn(const std::string &name) const override final;
};
} // namespace Ea