summaryrefslogtreecommitdiff
path: root/src/gui/shopwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-15 18:37:00 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-15 18:37:00 +0300
commit65f11a2d85f26932b0e2f0679ddbfc6b6fc4b635 (patch)
tree493d6441dd152419908d28178c26112a4639e89f /src/gui/shopwindow.cpp
parente1e411459e9c9aae819eee474d48d0cc20f6ca07 (diff)
downloadManaVerse-65f11a2d85f26932b0e2f0679ddbfc6b6fc4b635.tar.gz
ManaVerse-65f11a2d85f26932b0e2f0679ddbfc6b6fc4b635.tar.bz2
ManaVerse-65f11a2d85f26932b0e2f0679ddbfc6b6fc4b635.tar.xz
ManaVerse-65f11a2d85f26932b0e2f0679ddbfc6b6fc4b635.zip
Fix code style.
Diffstat (limited to 'src/gui/shopwindow.cpp')
-rw-r--r--src/gui/shopwindow.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp
index 615bbc18b..4daa1c2bb 100644
--- a/src/gui/shopwindow.cpp
+++ b/src/gui/shopwindow.cpp
@@ -577,8 +577,12 @@ void ShopWindow::giveList(const std::string &nick, int mode)
else
{
int amount = item->getQuantity();
- if (item->getPrice() * amount > PlayerInfo::getAttribute(MONEY))
- amount = PlayerInfo::getAttribute(MONEY) / item->getPrice();
+ if (item->getPrice() * amount > PlayerInfo::getAttribute(
+ PlayerInfo::MONEY))
+ {
+ amount = PlayerInfo::getAttribute(PlayerInfo::MONEY)
+ / item->getPrice();
+ }
if (amount > 0)
{
@@ -637,9 +641,9 @@ void ShopWindow::showList(const std::string &nick, std::string data)
return;
if (buyDialog)
- buyDialog->setMoney(PlayerInfo::getAttribute(MONEY));
+ buyDialog->setMoney(PlayerInfo::getAttribute(PlayerInfo::MONEY));
if (sellDialog)
- sellDialog->setMoney(PlayerInfo::getAttribute(MONEY));
+ sellDialog->setMoney(PlayerInfo::getAttribute(PlayerInfo::MONEY));
for (unsigned f = 0; f < data.length(); f += 9)
{