diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-01 01:13:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-01 01:13:14 +0300 |
commit | 24902ba328260cb496c62e236a644ebb990e3fd4 (patch) | |
tree | fd9ee8f2759566f29076eb63689802b40fe13756 /src/gui | |
parent | 2c273a20b2cd3e1628840f2d87df16f0cce9ad33 (diff) | |
download | plus-24902ba328260cb496c62e236a644ebb990e3fd4.tar.gz plus-24902ba328260cb496c62e236a644ebb990e3fd4.tar.bz2 plus-24902ba328260cb496c62e236a644ebb990e3fd4.tar.xz plus-24902ba328260cb496c62e236a644ebb990e3fd4.zip |
Store interacted npc type before buy or talk and send it to buy dialog.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/windows/buyselldialog.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/windows/buyselldialog.cpp b/src/gui/windows/buyselldialog.cpp index 26a8506d2..6969b8fc0 100644 --- a/src/gui/windows/buyselldialog.cpp +++ b/src/gui/windows/buyselldialog.cpp @@ -22,6 +22,8 @@ #include "gui/windows/buyselldialog.h" +#include "actormanager.h" + #include "net/buysellhandler.h" #include "net/npchandler.h" @@ -129,9 +131,14 @@ void BuySellDialog::action(const ActionEvent &event) if (eventId == "Buy") { if (mNpcId != BeingId_negOne) - npcHandler->buy(mNpcId); + { + const Being *const being = actorManager->findBeing(mNpcId); + npcHandler->buy(being); + } else + { buySellHandler->requestSellList(mNick); + } } else if (eventId == "Sell") { |