summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-11 21:25:00 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-11 21:25:00 +0300
commit2216a1e5cda198bbd6d97104136054a82ff9f739 (patch)
treec804057fcbf0863dad3656f95b2aeaa412e7b00a /src/actions
parentc5eb5667a14c59eba9590e8f0eff0f58da421046 (diff)
downloadmv-2216a1e5cda198bbd6d97104136054a82ff9f739.tar.gz
mv-2216a1e5cda198bbd6d97104136054a82ff9f739.tar.bz2
mv-2216a1e5cda198bbd6d97104136054a82ff9f739.tar.xz
mv-2216a1e5cda198bbd6d97104136054a82ff9f739.zip
Remove "heal" popup menu handler.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/actions.cpp17
1 files changed, 14 insertions, 3 deletions
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);
}