summaryrefslogtreecommitdiff
path: root/src/gui/ministatuswindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/ministatuswindow.cpp')
-rw-r--r--src/gui/ministatuswindow.cpp12
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);