From f7d11d6734940c509bcc676e464b939edc7f84a6 Mon Sep 17 00:00:00 2001 From: Freeyorp Date: Mon, 31 Aug 2009 21:26:06 +1200 Subject: Fixes NPC names on the popup menu. Mantis-issue: 861 --- src/gui/popupmenu.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 0f0df756..6795f29d 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -73,9 +73,7 @@ void PopupMenu::showPopup(int x, int y, Being *being) mBeingId = being->getId(); mBrowserBox->clearRows(); - const std::string &name = being->getType() == Being::NPC ? - being->getName().substr(0, being->getName().size() - - 6) : being->getName(); + const std::string &name = being->getName(); switch (being->getType()) { @@ -343,9 +341,7 @@ void PopupMenu::handleLink(const std::string &link) else if (link == "name" && being) { - const std::string &name = being->getType() == Being::NPC ? - being->getName().substr(0, - being->getName().size() - 6) : being->getName(); + const std::string &name = being->getName(); chatWindow->addInputText(name); } -- cgit v1.2.3-70-g09d2