diff options
Diffstat (limited to 'src/gui/buyselldialog.cpp')
-rw-r--r-- | src/gui/buyselldialog.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/buyselldialog.cpp b/src/gui/buyselldialog.cpp index 973df6182..e84982737 100644 --- a/src/gui/buyselldialog.cpp +++ b/src/gui/buyselldialog.cpp @@ -112,14 +112,15 @@ void BuySellDialog::setVisible(bool visible) void BuySellDialog::action(const gcn::ActionEvent &event) { - if (event.getId() == "Buy") + const std::string &eventId = event.getId(); + if (eventId == "Buy") { if (mNpcId != -1) Net::getNpcHandler()->buy(mNpcId); else Net::getBuySellHandler()->requestSellList(mNick); } - else if (event.getId() == "Sell") + else if (eventId == "Sell") { if (mNpcId != -1) Net::getNpcHandler()->sell(mNpcId); |