summaryrefslogtreecommitdiff
path: root/src/progs/manaplus/actions/actions.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-27 22:59:31 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-27 22:59:31 +0300
commit00083cc82fdd40870f517d6954fe3b28cea72f65 (patch)
treed7abdbe970d784498a9ce87416d145074ab34332 /src/progs/manaplus/actions/actions.cpp
parent437586e9dad478fd63a96d442ab77b744ce6fec3 (diff)
downloadplus-00083cc82fdd40870f517d6954fe3b28cea72f65.tar.gz
plus-00083cc82fdd40870f517d6954fe3b28cea72f65.tar.bz2
plus-00083cc82fdd40870f517d6954fe3b28cea72f65.tar.xz
plus-00083cc82fdd40870f517d6954fe3b28cea72f65.zip
Send talk request from context menu by being id.
Diffstat (limited to 'src/progs/manaplus/actions/actions.cpp')
-rw-r--r--src/progs/manaplus/actions/actions.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/progs/manaplus/actions/actions.cpp b/src/progs/manaplus/actions/actions.cpp
index 5b5a00a05..9c0188d20 100644
--- a/src/progs/manaplus/actions/actions.cpp
+++ b/src/progs/manaplus/actions/actions.cpp
@@ -825,7 +825,19 @@ impHandler(sell)
impHandler(talk)
{
- Being *being = findBeing(event.args, true);
+ const std::string args = event.args;
+ Being *being = nullptr;
+
+ if (!args.empty() && args[0] == ':')
+ {
+ being = actorManager->findBeing(fromInt(atoi(
+ args.substr(1).c_str()), BeingId));
+ }
+ else
+ {
+ being = findBeing(args, true);
+ }
+
if (being == nullptr)
return false;