diff options
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r-- | src/gui/popupmenu.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 77f74f4c..29b599aa 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -86,7 +86,7 @@ void PopupMenu::showPopup(int x, int y, Being *being) const std::string &name = being->getName(); browserBox->addRow("@@trade|Trade With " + name + "@@"); - //browserBox->addRow("@@attack|Attack " + name + "@@"); + browserBox->addRow("@@attack|Attack " + name + "@@"); //browserBox->addRow("@@follow|Follow " + name + "@@"); //browserBox->addRow("@@buddy|Add " + name + " to Buddy List@@"); } @@ -151,6 +151,15 @@ void PopupMenu::handleLink(const std::string& link) //tradePartner << "Trade: You and " << being->name<< ""; tradePartnerName = being->getName(); } + + // Attack action + else if ((link == "attack") && being && being->getType() == Being::PLAYER) + { + + autoTarget = being; + attack(being); + } + /* // Follow Player action else if (link == "follow") |