summaryrefslogtreecommitdiff
path: root/src/gui/buy.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-08-01 21:32:16 -0600
committerJared Adams <jaxad0127@gmail.com>2010-08-01 21:35:09 -0600
commita3e61c0e830c46b51c0d135962ad361c02b93243 (patch)
tree3b94948be5750c8f968ea89723799eb4f119c063 /src/gui/buy.cpp
parent0e189bbe81c88283438aabb4fec3ba30920d3a36 (diff)
downloadmana-a3e61c0e830c46b51c0d135962ad361c02b93243.tar.gz
mana-a3e61c0e830c46b51c0d135962ad361c02b93243.tar.bz2
mana-a3e61c0e830c46b51c0d135962ad361c02b93243.tar.xz
mana-a3e61c0e830c46b51c0d135962ad361c02b93243.zip
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
Diffstat (limited to 'src/gui/buy.cpp')
-rw-r--r--src/gui/buy.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index a214c075..cc135e07 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -21,6 +21,7 @@
#include "gui/buy.h"
+#include "playerinfo.h"
#include "shopitem.h"
#include "units.h"
@@ -111,6 +112,8 @@ BuyDialog::BuyDialog(int npcId):
instances.push_back(this);
setVisible(true);
+
+ PlayerInfo::setBuySellState(BUYSELL_BUYING);
}
BuyDialog::~BuyDialog()
@@ -118,6 +121,9 @@ BuyDialog::~BuyDialog()
delete mShopItems;
instances.remove(this);
+
+ if (PlayerInfo::getBuySellState() == BUYSELL_BUYING)
+ PlayerInfo::setBuySellState(BUYSELL_NONE);
}
void BuyDialog::setMoney(int amount)