summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-14 23:21:39 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-14 23:21:39 +0300
commit02f688326716e1f9a193f6f139021242241ad014 (patch)
tree6d2614374e1a70b2a1e077ff1e29bb2e98e72d94 /src/actions
parent949ff15ab6e7b841b996f8cb1a3bebb957cd4a85 (diff)
downloadManaVerse-02f688326716e1f9a193f6f139021242241ad014.tar.gz
ManaVerse-02f688326716e1f9a193f6f139021242241ad014.tar.bz2
ManaVerse-02f688326716e1f9a193f6f139021242241ad014.tar.xz
ManaVerse-02f688326716e1f9a193f6f139021242241ad014.zip
Add chat command for warp to location at same map.
New chat command: /warp X Y
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp14
-rw-r--r--src/actions/commands.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 07cd0c64e..b90a801d1 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -23,6 +23,7 @@
#include "actormanager.h"
#include "configuration.h"
#include "flooritem.h"
+#include "game.h"
#include "inventory.h"
#include "item.h"
#include "party.h"
@@ -821,4 +822,17 @@ impHandler0(leaveParty)
return true;
}
+impHandler(warp)
+{
+ int x = 0;
+ int y = 0;
+
+ if (Game::instance() && parse2Int(event.args, x, y))
+ {
+ adminHandler->warp(Game::instance()->getCurrentMapName(),
+ x, y);
+ }
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index 3b69535a3..245b514a2 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -81,6 +81,7 @@ namespace Actions
decHandler(setHomunculusName);
decHandler(fireHomunculus);
decHandler(leaveParty);
+ decHandler(warp);
} // namespace Actions
#undef decHandler