diff options
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 18 |
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; |