From a3e61c0e830c46b51c0d135962ad361c02b93243 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 1 Aug 2010 21:32:16 -0600 Subject: Remove isActive methods from buy/sell windows Uses a state variable in PlayerInfo instead. Moves isTalking from Being to PlayerInfo. Also some small cleanups. Reviewed-by: Chuck Miller --- src/gui/sell.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/sell.cpp') diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp index b017983c..83f01d7f 100644 --- a/src/gui/sell.cpp +++ b/src/gui/sell.cpp @@ -21,6 +21,7 @@ #include "gui/sell.h" +#include "playerinfo.h" #include "shopitem.h" #include "units.h" @@ -110,6 +111,8 @@ SellDialog::SellDialog(int npcId): instances.push_back(this); setVisible(true); + + PlayerInfo::setBuySellState(BUYSELL_SELLING); } SellDialog::~SellDialog() @@ -117,6 +120,9 @@ SellDialog::~SellDialog() delete mShopItems; instances.remove(this); + + if (PlayerInfo::getBuySellState() == BUYSELL_SELLING) + PlayerInfo::setBuySellState(BUYSELL_NONE); } void SellDialog::reset() -- cgit v1.2.3-70-g09d2