summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-27 14:58:06 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-27 14:58:06 +0300
commit144204fd38ea7388d9ca97922862844636052bfc (patch)
treeb30a4e6f5369a7ebc9bda465ec472956599ce9fc /src/actormanager.cpp
parentc5092e2ce5cd6edecde4339d4d2436d4585b60a6 (diff)
downloadplus-144204fd38ea7388d9ca97922862844636052bfc.tar.gz
plus-144204fd38ea7388d9ca97922862844636052bfc.tar.bz2
plus-144204fd38ea7388d9ca97922862844636052bfc.tar.xz
plus-144204fd38ea7388d9ca97922862844636052bfc.zip
Add option to show/hide badges. By default badges visible.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 8bd4ed638..2161f8f33 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -1578,6 +1578,8 @@ void ActorManager::optionChanged(const std::string &name)
mCycleNPC = config.getBoolValue("cycleNPC");
else if (name == "extMouseTargeting")
mExtMouseTargeting = config.getBoolValue("extMouseTargeting");
+ else if (name == "showBadges")
+ updateBadges();
}
void ActorManager::removeAttackMob(const std::string &name)
@@ -1844,6 +1846,20 @@ Being *ActorManager::cloneBeing(const Being *const srcBeing,
return dstBeing;
}
+void ActorManager::updateBadges()
+{
+ const bool showBadges = config.getBoolValue("showBadges");
+ for_actors
+ {
+ ActorSprite *const actor = *it;
+ if (actor && actor->getType() == ActorType::Player)
+ {
+ Being *const being = static_cast<Being*>(actor);
+ being->showBadges(showBadges);
+ }
+ }
+}
+
#ifdef EATHENA_SUPPORT
void ActorManager::removeRoom(const int chatId)
{