From b2d7d2f28f86955f73b7246a4e14aef0be39d847 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 26 Jan 2011 02:34:03 +0200 Subject: Add option to show/hide job messages. --- src/localplayer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/localplayer.cpp') 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()) { -- cgit v1.2.3-70-g09d2