summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorJoshua Langley <joshlangley[at]optusnet.com.au>2007-08-20 07:07:23 +0000
committerJoshua Langley <joshlangley[at]optusnet.com.au>2007-08-20 07:07:23 +0000
commit148b62c05337eaaaf3a1ead212b3792122812cee (patch)
treea56e3e20b635f7f4ab53b55887103ae711558297 /src/localplayer.cpp
parentc322e6eac2373358c04e7bd70c8e0fc1bcfb37db (diff)
downloadmana-148b62c05337eaaaf3a1ead212b3792122812cee.tar.gz
mana-148b62c05337eaaaf3a1ead212b3792122812cee.tar.bz2
mana-148b62c05337eaaaf3a1ead212b3792122812cee.tar.xz
mana-148b62c05337eaaaf3a1ead212b3792122812cee.zip
Added monster killed xp notification effect.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index cc270296..fa8db881 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -40,6 +40,7 @@ LocalPlayer *player_node = NULL;
LocalPlayer::LocalPlayer(Uint32 id, Uint16 job, Map *map):
Player(id, job, map),
+ mXp(0),
mAttackRange(0),
mInventory(new Inventory()),
mTarget(NULL), mPickUpTarget(NULL),
@@ -426,3 +427,12 @@ void LocalPlayer::revive()
outMsg.writeInt16(0x00b2);
outMsg.writeInt8(0);
}
+
+void LocalPlayer::refreshXp(Uint32 xp)
+{
+ if (mTarget && xp > mXp)
+ {
+ mTarget->showXP(xp-mXp);
+ }
+ mXp = xp;
+}