summaryrefslogtreecommitdiff
path: root/src/gui/windows/shopwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-30 12:25:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-30 12:25:16 +0300
commit1680d159ecbf75591d2dab1416ff8144c27d4de5 (patch)
treecd34ad27487036265f08d7aa63476c160280d899 /src/gui/windows/shopwindow.cpp
parent9913b4b481ddcaf0fa8499f3554c85bb588be7f0 (diff)
downloadmv-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.gz
mv-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.bz2
mv-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.xz
mv-1680d159ecbf75591d2dab1416ff8144c27d4de5.zip
Rename player_node variable into localPlayer.
Diffstat (limited to 'src/gui/windows/shopwindow.cpp')
-rw-r--r--src/gui/windows/shopwindow.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index eac966fa8..96ac002fa 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -238,15 +238,15 @@ void ShopWindow::action(const ActionEvent &event)
&& mBuyShopItemList->getSelected() >= 0)
{
mBuyShopItems->del(mBuyShopItemList->getSelected());
- if (isShopEmpty() && player_node)
- player_node->updateStatus();
+ if (isShopEmpty() && localPlayer)
+ localPlayer->updateStatus();
}
else if (eventId == "delete sell" && mSellShopItemList
&& mSellShopItemList->getSelected() >= 0)
{
mSellShopItems->del(mSellShopItemList->getSelected());
- if (isShopEmpty() && player_node)
- player_node->updateStatus();
+ if (isShopEmpty() && localPlayer)
+ localPlayer->updateStatus();
}
else if (eventId == "announce buy" && mBuyShopItems
&& mBuyShopItems->getNumberOfElements() > 0)
@@ -345,8 +345,8 @@ void ShopWindow::addBuyItem(const Item *const item, const int amount,
const bool emp = isShopEmpty();
mBuyShopItems->addItemNoDup(item->getId(),
item->getColor(), amount, price);
- if (emp && player_node)
- player_node->updateStatus();
+ if (emp && localPlayer)
+ localPlayer->updateStatus();
updateButtonsAndLabels();
}
@@ -359,8 +359,8 @@ void ShopWindow::addSellItem(const Item *const item, const int amount,
const bool emp = isShopEmpty();
mSellShopItems->addItemNoDup(item->getId(),
item->getColor(), amount, price);
- if (emp && player_node)
- player_node->updateStatus();
+ if (emp && localPlayer)
+ localPlayer->updateStatus();
updateButtonsAndLabels();
}
@@ -701,7 +701,7 @@ void ShopWindow::showList(const std::string &nick, std::string data)
void ShopWindow::processRequest(const std::string &nick, std::string data,
const int mode)
{
- if (!player_node || !mTradeNick.empty() || PlayerInfo::isTrading()
+ if (!localPlayer || !mTradeNick.empty() || PlayerInfo::isTrading()
|| !actorManager
|| !actorManager->findBeingByName(nick, ActorType::PLAYER))
{
@@ -857,7 +857,7 @@ bool ShopWindow::findShopItem(const ShopItem *const shopItem,
int ShopWindow::sumAmount(const Item *const shopItem)
{
- if (!player_node || !shopItem)
+ if (!localPlayer || !shopItem)
return 0;
const Inventory *const inv = PlayerInfo::getInventory();