diff options
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 2 | ||||
-rw-r--r-- | src/progs/manaplus/actions/actions.cpp | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 9e9e9d5d8..03398c6b5 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -329,7 +329,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) { // TRANSLATORS: popup menu item // TRANSLATORS: talk with npc - mBrowserBox->addRow("/talk 'NAME'", _("Talk")); + mBrowserBox->addRow("/talk :'BEINGID'", _("Talk")); #ifdef TMWA_SUPPORT if (Net::getNetworkType() != ServerType::TMWATHENA) #endif 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; |