From 2216a1e5cda198bbd6d97104136054a82ff9f739 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 11 Dec 2014 21:25:00 +0300 Subject: Remove "heal" popup menu handler. --- src/actions/actions.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/actions') diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 03944500d..86191d51c 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -361,10 +361,21 @@ impHandler(heal) { if (actorManager && localPlayer) { - if (!event.args.empty()) + std::string args = event.args; + + if (!args.empty()) { - const Being *const being = actorManager->findBeingByName( - event.args, ActorType::Player); + const Being *being = nullptr; + if (args[0] == ':') + { + being = actorManager->findBeing(atoi(args.substr(1).c_str())); + if (being && being->getType() == ActorType::Monster) + being = nullptr; + } + else + { + being = actorManager->findBeingByName(args, ActorType::Player); + } if (being) actorManager->heal(being); } -- cgit v1.2.3-70-g09d2