diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-08-23 14:14:51 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-08-23 14:14:51 +0000 |
commit | 5b755a2a6afdba9d07703c3bf5447bf314d842ab (patch) | |
tree | 9c8c1808283d5ecc954668fc53d76d0252eec430 /src/gui | |
parent | 4b8df221acc3bd3e681357df912bdbc7a1ce6c3f (diff) | |
download | mana-client-5b755a2a6afdba9d07703c3bf5447bf314d842ab.tar.gz mana-client-5b755a2a6afdba9d07703c3bf5447bf314d842ab.tar.bz2 mana-client-5b755a2a6afdba9d07703c3bf5447bf314d842ab.tar.xz mana-client-5b755a2a6afdba9d07703c3bf5447bf314d842ab.zip |
Changed XP gaining effect to appear on the player instead.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/ministatus.cpp | 5 | ||||
-rw-r--r-- | src/gui/status.cpp | 15 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp index 932b1f22..694a6f32 100644 --- a/src/gui/ministatus.cpp +++ b/src/gui/ministatus.cpp @@ -98,7 +98,8 @@ void MiniStatusWindow::update() mHpBar->setProgress((float) player_node->mHp / player_node->mMaxHp); // mMpBar->setProgress((float) player_node->mMp / player_node->mMaxMp); - mXpBar->setProgress((float) player_node->mXp / player_node->mXpForNextLevel); + mXpBar->setProgress( + (float) player_node->getXp() / player_node->mXpForNextLevel); // Update labels mHpLabel->setCaption(toString(player_node->mHp)); @@ -106,7 +107,7 @@ void MiniStatusWindow::update() std::stringstream updatedText; updatedText << (int) ( - (float) player_node->mXp / + (float) player_node->getXp() / player_node->mXpForNextLevel * 100) << "%"; // Displays the number of monsters to next lvl diff --git a/src/gui/status.cpp b/src/gui/status.cpp index 117e90de..927b3554 100644 --- a/src/gui/status.cpp +++ b/src/gui/status.cpp @@ -242,7 +242,7 @@ void StatusWindow::update() "/" + toString(mPlayer->mMaxMp)); mMpValueLabel->adjustSize(); - mXpValueLabel->setCaption(toString(mPlayer->mXp) + + mXpValueLabel->setCaption(toString(mPlayer->getXp()) + "/" + toString(mPlayer->mXpForNextLevel)); mXpValueLabel->adjustSize(); @@ -264,13 +264,13 @@ void StatusWindow::update() mHpBar->setColor(0, 171, 34); // Green } - mHpBar->setProgress((float)mPlayer->mHp / (float)mPlayer->mMaxHp); + mHpBar->setProgress((float) mPlayer->mHp / (float) mPlayer->mMaxHp); // mMpBar->setProgress((float)mPlayer->mp / (float)mPlayer->maxMp); mXpBar->setProgress( - (float)mPlayer->mXp / (float)mPlayer->mXpForNextLevel); + (float) mPlayer->getXp() / (float) mPlayer->mXpForNextLevel); mJobXpBar->setProgress( - (float)mPlayer->mJobXp / (float)mPlayer->mJobXpForNextLevel); + (float) mPlayer->mJobXp / (float) mPlayer->mJobXpForNextLevel); // Stats Part // ---------- @@ -285,10 +285,11 @@ void StatusWindow::update() int statusPoints = mPlayer->mStatsPointsToAttribute; // Update labels - for (int i = 0; i < 6; i++) { + for (int i = 0; i < 6; i++) + { mStatsLabel[i]->setCaption(attrNames[i]); - mStatsDisplayLabel[i]->setCaption(toString((int)mPlayer->mAttr[i])); - mPointsLabel[i]->setCaption(toString((int)mPlayer->mAttrUp[i])); + mStatsDisplayLabel[i]->setCaption(toString((int) mPlayer->mAttr[i])); + mPointsLabel[i]->setCaption(toString((int) mPlayer->mAttrUp[i])); mStatsLabel[i]->adjustSize(); mStatsDisplayLabel[i]->adjustSize(); |