summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-07 18:20:26 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-07 18:20:26 +0100
commit719e2b02bc6833198d6af2d3c95de96ef95f876d (patch)
tree553c77d8d6d2519b6f4612781a371a1d505f7bb4 /src/localplayer.cpp
parentca366e65e331ac9416a8198131e743a7a8bdf146 (diff)
downloadmana-719e2b02bc6833198d6af2d3c95de96ef95f876d.tar.gz
mana-719e2b02bc6833198d6af2d3c95de96ef95f876d.tar.bz2
mana-719e2b02bc6833198d6af2d3c95de96ef95f876d.tar.xz
mana-719e2b02bc6833198d6af2d3c95de96ef95f876d.zip
Added some initialization and removed ChargeDialog
Many member variables of LocalPlayer were not being initialized properly. In general this shouldn't have caused any problems, but it's bad style. The ChargeDialog was removed. This class was long dead anyway. Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 3df80f0b..910de119 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -44,9 +44,19 @@ LocalPlayer *player_node = NULL;
LocalPlayer::LocalPlayer(Uint32 id, Uint16 job, Map *map):
Player(id, job, map),
- mXpForNextLevel(0),
+ mCharId(0),
+ mJobXp(0),
+ mLevel(0),
+ mJobLevel(0),
+ mXpForNextLevel(0), mJobXpForNextLevel(0),
+ mHp(0), mMaxHp(0), mMp(0), mMaxMp(0),
+ mGp(0),
mAttackRange(0),
- mSkillPoint(0),
+ mTotalWeight(0), mMaxWeight(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),
+ mStatPoint(0), mSkillPoint(0),
+ mStatsPointsToAttribute(0),
mXp(0), mNetwork(0),
mTarget(NULL), mPickUpTarget(NULL),
mTrading(false), mGoingToTarget(false),
@@ -411,9 +421,6 @@ void LocalPlayer::attack(Being *target, bool keep)
setDirection(LEFT);
}
- // Implement charging attacks here
- mLastAttackTime = 0;
-
setAction(ATTACK);
mWalkTime = tick_time;