diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-07 13:15:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-07 13:15:22 +0300 |
commit | 6f86c11e0ecee3c980cd7e3cfca8ef72e7aa8a02 (patch) | |
tree | 2d1923e799a43754b15728c8e6a23f9c283bd825 /src/actions | |
parent | d9732855666b402c0a492d6618ce9ab930089219 (diff) | |
download | plus-6f86c11e0ecee3c980cd7e3cfca8ef72e7aa8a02.tar.gz plus-6f86c11e0ecee3c980cd7e3cfca8ef72e7aa8a02.tar.bz2 plus-6f86c11e0ecee3c980cd7e3cfca8ef72e7aa8a02.tar.xz plus-6f86c11e0ecee3c980cd7e3cfca8ef72e7aa8a02.zip |
Add into mobs and foring pets context menu item for timing pet.
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/pets.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp index 84b3d412d..f0e9cbb15 100644 --- a/src/actions/pets.cpp +++ b/src/actions/pets.cpp @@ -143,8 +143,20 @@ impHandler(catchPet) return false; Being *target = nullptr; - if (!event.args.empty()) - target = actorManager->findNearestByName(event.args); + const std::string args = event.args; + if (!args.empty()) + { + if (args[0] == ':') + { + target = actorManager->findBeing(fromInt(atoi( + args.substr(1).c_str()), BeingId)); + } + else + { + target = actorManager->findNearestByName(args); + } + } + if (!target) target = localPlayer->getTarget(); else |