diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-28 22:10:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-28 22:10:30 +0300 |
commit | 15b9391da7ba4c307311d7dae6abc81a4b2bf25c (patch) | |
tree | 22abbcd556824073008de3493a42839848cef969 /src/net/eathena | |
parent | cd0883a1704c1b514b8b7317358949d43e230644 (diff) | |
download | mv-15b9391da7ba4c307311d7dae6abc81a4b2bf25c.tar.gz mv-15b9391da7ba4c307311d7dae6abc81a4b2bf25c.tar.bz2 mv-15b9391da7ba4c307311d7dae6abc81a4b2bf25c.tar.xz mv-15b9391da7ba4c307311d7dae6abc81a4b2bf25c.zip |
Add chat command /npcmove. Also add it to npc context menu.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/adminhandler.cpp | 12 | ||||
-rw-r--r-- | src/net/eathena/adminhandler.h | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp index 1ee373043..cc1465ee0 100644 --- a/src/net/eathena/adminhandler.cpp +++ b/src/net/eathena/adminhandler.cpp @@ -28,6 +28,7 @@ #include "net/eathena/protocolout.h" #include "utils/gmfunctions.h" +#include "utils/stringutils.h" #include "debug.h" @@ -325,4 +326,15 @@ void AdminHandler::unjail(const std::string &name) const Gm::runCommand("unjail", name); } +void AdminHandler::npcMove(const std::string &name, + const int x, + const int y) const +{ + Gm::runCommand("npcmove", + strprintf("%d %d %s", + x, + y, + name.c_str())); +} + } // namespace EAthena diff --git a/src/net/eathena/adminhandler.h b/src/net/eathena/adminhandler.h index 995669f76..60103ea24 100644 --- a/src/net/eathena/adminhandler.h +++ b/src/net/eathena/adminhandler.h @@ -138,6 +138,10 @@ class AdminHandler final : public Ea::AdminHandler void unjail(const std::string &name) const override final; + void npcMove(const std::string &name, + const int x, + const int y) const override final; + protected: static std::string mStatsName; }; |