summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-07-15 14:43:16 -0600
committerJared Adams <jaxad0127@gmail.com>2009-07-15 14:47:24 -0600
commit18aaa873abcaa617bbd296f73138d062423662b8 (patch)
treecfdcf6d3a5750549c01df38cda27f0ea14b47279 /src/localplayer.cpp
parentfa6d39d9f56e09abfb6b48bacdd66ddbad20c641 (diff)
downloadmana-18aaa873abcaa617bbd296f73138d062423662b8.tar.gz
mana-18aaa873abcaa617bbd296f73138d062423662b8.tar.bz2
mana-18aaa873abcaa617bbd296f73138d062423662b8.tar.xz
mana-18aaa873abcaa617bbd296f73138d062423662b8.zip
Merge and cleanup attribute code
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 84fcbe3c..18bc77b0 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -41,6 +41,11 @@
#include "gui/palette.h"
#include "gui/skilldialog.h"
#include "gui/storagewindow.h"
+#ifdef TMWSERV_SUPPORT
+#include "gui/statuswindow.h"
+#else
+#include "gui/status.h"
+#endif
#include "gui/widgets/chattab.h"
@@ -90,8 +95,6 @@ LocalPlayer::LocalPlayer(int id, int job, Map *map):
mXpForNextLevel(0), mJobXpForNextLevel(0),
mMp(0), mMaxMp(0),
mAttackRange(0),
- ATK(0), MATK(0), DEF(0), MDEF(0), HIT(0), FLEE(0),
- ATK_BONUS(0), MATK_BONUS(0), DEF_BONUS(0), MDEF_BONUS(0), FLEE_BONUS(0),
#endif
mEquipment(new Equipment),
mInStorage(false),
@@ -798,6 +801,9 @@ void LocalPlayer::setAttributeBase(int num, int value)
Particle* effect = particleEngine->addEffect("graphics/particles/skillup.particle.xml", 0, 0);
this->controlParticle(effect);
}
+
+ if (statusWindow)
+ statusWindow->update(num);
}
void LocalPlayer::setAttributeEffective(int num, int value)
@@ -805,6 +811,9 @@ void LocalPlayer::setAttributeEffective(int num, int value)
mAttributeEffective[num] = value;
if (skillDialog)
skillDialog->update(num);
+
+ if (statusWindow)
+ statusWindow->update(num);
}
void LocalPlayer::setSkillPoints(int points)
@@ -844,6 +853,9 @@ void LocalPlayer::setLevelProgress(int percent)
addMessageToQueue(toString(percent - mLevelProgress) + " xp");
}
mLevelProgress = percent;
+
+ if (statusWindow)
+ statusWindow->update();
}
void LocalPlayer::pickedUp(const ItemInfo &itemInfo, int amount)