From 3da7f49e31f018047d6ed5869b5f4cebb9b29717 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 22 Feb 2015 01:43:47 +0300 Subject: Add chat command for move pet to give position. New chat command: /movepet x,y Alias: /petmove x,y --- src/actions/pets.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/actions/pets.cpp') 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 -- cgit v1.2.3-70-g09d2