diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-08 00:34:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-08 00:34:31 +0300 |
commit | 4f3e6ddeae45b7b04b191533e8f6c456fbc207d8 (patch) | |
tree | 68096e884721900e1bc52ddf1496278ff474c4c5 /src/gui/ministatuswindow.cpp | |
parent | 593cccb16074fe9269dd2f278bd79859769eb1fd (diff) | |
download | mv-4f3e6ddeae45b7b04b191533e8f6c456fbc207d8.tar.gz mv-4f3e6ddeae45b7b04b191533e8f6c456fbc207d8.tar.bz2 mv-4f3e6ddeae45b7b04b191533e8f6c456fbc207d8.tar.xz mv-4f3e6ddeae45b7b04b191533e8f6c456fbc207d8.zip |
Fix issues after last changes.
Diffstat (limited to 'src/gui/ministatuswindow.cpp')
-rw-r--r-- | src/gui/ministatuswindow.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gui/ministatuswindow.cpp b/src/gui/ministatuswindow.cpp index 9f9f63a86..9f89ca97f 100644 --- a/src/gui/ministatuswindow.cpp +++ b/src/gui/ministatuswindow.cpp @@ -54,6 +54,10 @@ MiniStatusWindow::MiniStatusWindow() : Popup("MiniStatus", "ministatus.xml"), InventoryListener(), mHpBar(createBar(0, 100, 20, Theme::PROG_HP, "hp bar", _("health bar"))), + mMpBar(Net::getGameHandler()->canUseMagicBar() + ? createBar(0, 100, 20, Net::getPlayerHandler()->canUseMagic() + ? Theme::PROG_MP : Theme::PROG_NO_MP, "mp bar", _("mana bar")) + : nullptr), mXpBar(createBar(0, 100, 20, Theme::PROG_EXP, "xp bar", _("experience bar"))), mWeightBar(createBar(0, 140, 20, Theme::PROG_WEIGHT, @@ -74,15 +78,7 @@ MiniStatusWindow::MiniStatusWindow() : StatusWindow::updateHPBar(mHpBar); if (Net::getGameHandler()->canUseMagicBar()) - { - mMpBar = createBar(0, 100, 20, Net::getPlayerHandler()->canUseMagic() - ? Theme::PROG_MP : Theme::PROG_NO_MP, "mp bar", _("mana bar")); StatusWindow::updateMPBar(mMpBar); - } - else - { - mMpBar = nullptr; - } const int job = Net::getPlayerHandler()->getJobLocation() && serverConfig.getValueBool("showJob", false); |