summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-01 01:13:14 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-01 01:13:14 +0300
commit24902ba328260cb496c62e236a644ebb990e3fd4 (patch)
treefd9ee8f2759566f29076eb63689802b40fe13756 /src/gui/windows
parent2c273a20b2cd3e1628840f2d87df16f0cce9ad33 (diff)
downloadmv-24902ba328260cb496c62e236a644ebb990e3fd4.tar.gz
mv-24902ba328260cb496c62e236a644ebb990e3fd4.tar.bz2
mv-24902ba328260cb496c62e236a644ebb990e3fd4.tar.xz
mv-24902ba328260cb496c62e236a644ebb990e3fd4.zip
Store interacted npc type before buy or talk and send it to buy dialog.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/buyselldialog.cpp9
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")
{