diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-05 22:36:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-05 22:36:53 +0300 |
commit | 69b5220d914fb3b874622dcbf8e0fbd4fd73d1f7 (patch) | |
tree | a1f58e14f61ec924018b32924132ddbd004a4c91 /src/resources/monsterdb.cpp | |
parent | e6d7fca349c28eaf98d643325dc99dd9d3a53568 (diff) | |
download | plus-69b5220d914fb3b874622dcbf8e0fbd4fd73d1f7.tar.gz plus-69b5220d914fb3b874622dcbf8e0fbd4fd73d1f7.tar.bz2 plus-69b5220d914fb3b874622dcbf8e0fbd4fd73d1f7.tar.xz plus-69b5220d914fb3b874622dcbf8e0fbd4fd73d1f7.zip |
Second part adding mob particle effects for attacks.
Base on commit from mana afa134640b2e2c7c0f28a54c8691545848795dd9
by Yohann Ferreira
Diffstat (limited to 'src/resources/monsterdb.cpp')
-rw-r--r-- | src/resources/monsterdb.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp index f6352d8ec..d6aa53809 100644 --- a/src/resources/monsterdb.cpp +++ b/src/resources/monsterdb.cpp @@ -192,13 +192,19 @@ void MonsterDB::load() const int id = XML::getProperty(spriteNode, "id", 0); const int effectId = XML::getProperty( spriteNode, "effect-id", -1); + int hitEffectId = XML::getProperty(spriteNode, + "hit-effect-id", paths.getIntValue("hitEffectId")); + int criticalHitEffectId = XML::getProperty(spriteNode, + "critical-hit-effect-id", + paths.getIntValue("criticalHitEffectId")); + const std::string spriteAction = XML::getProperty( spriteNode, "action", "attack"); const std::string missileParticle = XML::getProperty( spriteNode, "missile-particle", ""); - currentInfo->addAttack(id, spriteAction, - effectId, missileParticle); + currentInfo->addAttack(id, spriteAction, hitEffectId, + criticalHitEffectId, effectId, missileParticle); } else if (xmlNameEqual(spriteNode, "particlefx")) { |