summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-07-18 20:05:32 -0600
committerJared Adams <jaxad0127@gmail.com>2010-07-18 20:11:36 -0600
commit782158dfd719fb6d196f79075f275fb8599d393c (patch)
tree7faf9ea12988a7987106c0bd846154766911665a /src/localplayer.cpp
parente3abb4a771b69f1067d6c7f5e0d4c10828f94167 (diff)
downloadmana-client-782158dfd719fb6d196f79075f275fb8599d393c.tar.gz
mana-client-782158dfd719fb6d196f79075f275fb8599d393c.tar.bz2
mana-client-782158dfd719fb6d196f79075f275fb8599d393c.tar.xz
mana-client-782158dfd719fb6d196f79075f275fb8599d393c.zip
Add old values to stat and attribute events
Reviewed-by: Chuck Miller
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index b2061643..0aa76f51 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -24,6 +24,7 @@
#include "client.h"
#include "configuration.h"
#include "effectmanager.h"
+#include "event.h"
#include "flooritem.h"
#include "graphics.h"
#include "guild.h"
@@ -1144,6 +1145,23 @@ void LocalPlayer::optionChanged(const std::string &value)
}
}
+void LocalPlayer::event(const std::string &channel, const Mana::Event &event)
+{
+ if (channel == "Attributes")
+ {
+ if (event.getName() == "UpdateAttribute")
+ {
+ if (event.getInt("id") == EXP)
+ {
+ int change = event.getInt("newValue")
+ - event.getInt("oldValue");
+
+ addMessageToQueue(toString(change) + " xp");
+ }
+ }
+ }
+}
+
void LocalPlayer::changeAwayMode()
{
mAwayMode = !mAwayMode;