summaryrefslogtreecommitdiff
path: root/src/actorspritemanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-04 02:58:12 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-04 22:00:41 +0300
commit46106e962bee32271ee644224c5ac525eb32f888 (patch)
treec098cb2aa421bff026e499b35f88b7185e995099 /src/actorspritemanager.cpp
parent28e10f7225551b1dc2e1f35b8d4d145db528e4c7 (diff)
downloadmanaplus-46106e962bee32271ee644224c5ac525eb32f888.tar.gz
manaplus-46106e962bee32271ee644224c5ac525eb32f888.tar.bz2
manaplus-46106e962bee32271ee644224c5ac525eb32f888.tar.xz
manaplus-46106e962bee32271ee644224c5ac525eb32f888.zip
Add different effects to npc depend on qests status (evol only)
Diffstat (limited to 'src/actorspritemanager.cpp')
-rw-r--r--src/actorspritemanager.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/actorspritemanager.cpp b/src/actorspritemanager.cpp
index f87f84a50..a9897872b 100644
--- a/src/actorspritemanager.cpp
+++ b/src/actorspritemanager.cpp
@@ -1651,3 +1651,20 @@ bool ActorSpriteManager::checkForPickup(const FloorItem *const item) const
}
return false;
}
+
+void ActorSpriteManager::updateEffects(const std::map<int, int> &addEffects,
+ const std::set<int> removeEffects)
+{
+ for_actors
+ {
+ if (!*it || (*it)->getType() != ActorSprite::NPC)
+ continue;
+ Being *const being = static_cast<Being*>(*it);
+ const int type = being->getSubType();
+ if (removeEffects.find(type) != removeEffects.end())
+ being->removeSpecialEffect();
+ const std::map<int, int>::const_iterator idAdd = addEffects.find(type);
+ if (idAdd != addEffects.end())
+ being->addSpecialEffect((*idAdd).second);
+ }
+}