summaryrefslogtreecommitdiff
path: root/src/monster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/monster.cpp')
-rw-r--r--src/monster.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/monster.cpp b/src/monster.cpp
index abc7946f..1561b2ea 100644
--- a/src/monster.cpp
+++ b/src/monster.cpp
@@ -36,12 +36,21 @@
Monster::Monster(Uint16 id, Uint16 job, Map *map):
Being(id, job, map)
{
- std::string filename = getInfo().getSprite();
+ const MonsterInfo& info = getInfo();
+ std::string filename = info.getSprite();
if (filename.empty())
filename = "error.xml";
mSprites[BASE_SPRITE] =
AnimatedSprite::load("graphics/sprites/" + filename);
+
+ const std::list<std::string> &particleEffects = info.getParticleEffects();
+ for (std::list<std::string>::const_iterator i = particleEffects.begin();
+ i != particleEffects.end();
+ i++)
+ {
+ controlParticle(particleEngine->addEffect((*i), 0, 0));
+ }
}
Monster::~Monster()