diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-01-26 02:34:03 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-01-26 02:34:03 +0200 |
commit | b2d7d2f28f86955f73b7246a4e14aef0be39d847 (patch) | |
tree | dd373211f8c033f3040aeed8aa8e55f0998a5951 /src/localplayer.cpp | |
parent | 88d896d9bc248bc518fe447e43a95cb36a635446 (diff) | |
download | manaplus-b2d7d2f28f86955f73b7246a4e14aef0be39d847.tar.gz manaplus-b2d7d2f28f86955f73b7246a4e14aef0be39d847.tar.bz2 manaplus-b2d7d2f28f86955f73b7246a4e14aef0be39d847.tar.xz manaplus-b2d7d2f28f86955f73b7246a4e14aef0be39d847.zip |
Add option to show/hide job messages.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 438d978c4..29507c685 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -154,6 +154,7 @@ LocalPlayer::LocalPlayer(int id, int subtype): mDrawPath = config.getBoolValue("drawPath"); mServerAttack = config.getBoolValue("serverAttack"); mAttackMoving = config.getBoolValue("attackMoving"); + mShowJobExp = config.getBoolValue("showJobExp"); mPingSendTick = 0; mWaitPing = false; @@ -172,6 +173,7 @@ LocalPlayer::LocalPlayer(int id, int subtype): config.addListener("drawPath", this); config.addListener("serverAttack", this); config.addListener("attackMoving", this); + config.addListener("showJobExp", this); setShowName(config.getBoolValue("showownname")); beingInfoCache.clear(); } @@ -187,6 +189,7 @@ LocalPlayer::~LocalPlayer() config.removeListener("drawPath", this); config.removeListener("serverAttack", this); config.removeListener("attackMoving", this); + config.removeListener("showJobExp", this); delete mAwayDialog; mAwayDialog = 0; @@ -1476,6 +1479,8 @@ void LocalPlayer::optionChanged(const std::string &value) mServerAttack = config.getBoolValue("serverAttack"); else if (value == "attackMoving") mAttackMoving = config.getBoolValue("attackMoving"); + else if (value == "showJobExp") + mShowJobExp = config.getBoolValue("showJobExp"); } void LocalPlayer::event(Channels channel, const Mana::Event &event) @@ -1507,6 +1512,9 @@ void LocalPlayer::event(Channels channel, const Mana::Event &event) } else if (event.getName() == EVENT_UPDATESTAT) { + if (!mShowJobExp) + return; + int id = event.getInt("id"); if (id == Net::getPlayerHandler()->getJobLocation()) { |