summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/statuswindow.cpp4
-rw-r--r--src/net/ea/playerhandler.cpp8
2 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index 94c95f68..4db8c751 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -112,7 +112,9 @@ StatusWindow::StatusWindow():
mMpLabel = new Label(_("MP:"));
mMpBar = new ProgressBar((float) player_node->getMaxMP()
/ (float) player_node->getMaxMP(),
- 80, 15, gcn::Color(26, 102, 230));
+ 80, 15, Net::getPlayerHandler()->canUseMagic() ?
+ gcn::Color(26, 102, 230) :
+ gcn::Color(100, 100, 100));
place(0, 0, mLvlLabel, 3);
// 5, 0 Job Level
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 5db4acbe..0592bb55 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -260,10 +260,14 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg)
case 0x002b: player_node->setAttributeEffective(MATK, value
+ ATTR_BONUS(MATK));
player_node->setAttributeBase(MATK, value);
- statusWindow->update(StatusWindow::MP); break;
+ if (statusWindow)
+ statusWindow->update(StatusWindow::MP);
+ break;
case 0x002c: value += player_node->getAttributeBase(MATK);
player_node->setAttributeEffective(MATK, value);
- statusWindow->update(StatusWindow::MP); break;
+ if (statusWindow)
+ statusWindow->update(StatusWindow::MP);
+ break;
case 0x002d: player_node->setAttributeEffective(DEF, value
+ ATTR_BONUS(DEF));
player_node->setAttributeBase(DEF, value); break;