From 65f11a2d85f26932b0e2f0679ddbfc6b6fc4b635 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 15 Jul 2012 18:37:00 +0300 Subject: Fix code style. --- src/gui/shopwindow.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/gui/shopwindow.cpp') 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) { -- cgit v1.2.3-60-g2f50