summaryrefslogtreecommitdiff
path: root/src/actions/pets.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-22 01:43:47 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-22 01:43:47 +0300
commit3da7f49e31f018047d6ed5869b5f4cebb9b29717 (patch)
treeab4cfb7685eea64657c13295d6554c322404de71 /src/actions/pets.cpp
parentfa923f929b3f52a18273b5831425b2e3db08e583 (diff)
downloadplus-3da7f49e31f018047d6ed5869b5f4cebb9b29717.tar.gz
plus-3da7f49e31f018047d6ed5869b5f4cebb9b29717.tar.bz2
plus-3da7f49e31f018047d6ed5869b5f4cebb9b29717.tar.xz
plus-3da7f49e31f018047d6ed5869b5f4cebb9b29717.zip
Add chat command for move pet to give position.
New chat command: /movepet x,y Alias: /petmove x,y
Diffstat (limited to 'src/actions/pets.cpp')
-rw-r--r--src/actions/pets.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp
index 109da80cd..2247e0533 100644
--- a/src/actions/pets.cpp
+++ b/src/actions/pets.cpp
@@ -191,4 +191,21 @@ impHandler0(petAiStop)
return true;
}
+impHandler0(petMove)
+{
+ const Being *const pet = getPet();
+ if (!pet)
+ return false;
+
+ int x = 0;
+ int y = 0;
+
+ if (parse2Int(event.args, x, y))
+ {
+ petHandler->move(pet->getId(), x, y);
+ return true;
+ }
+ return false;
+}
+
} // namespace Actions