From 24902ba328260cb496c62e236a644ebb990e3fd4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 Feb 2017 01:13:14 +0300 Subject: Store interacted npc type before buy or talk and send it to buy dialog. --- src/gui/windows/buyselldialog.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/gui') 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") { -- cgit v1.2.3-70-g09d2