diff options
author | Chuck Miller <shadowmil@gmail.com> | 2010-02-10 23:46:49 -0500 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2010-02-10 23:50:23 -0500 |
commit | 85e7f2a79477712bf3082cb82e6a73c51361abb0 (patch) | |
tree | c8a42adb06e0c5ba416bd30fcd1808c1e4f26ddc /src/resources/monsterdb.cpp | |
parent | 3a761a242436e521c7fa8ef3746551ac7b746308 (diff) | |
download | mana-client-85e7f2a79477712bf3082cb82e6a73c51361abb0.tar.gz mana-client-85e7f2a79477712bf3082cb82e6a73c51361abb0.tar.bz2 mana-client-85e7f2a79477712bf3082cb82e6a73c51361abb0.tar.xz mana-client-85e7f2a79477712bf3082cb82e6a73c51361abb0.zip |
Adds missile-particle attribute to items and monster attacks
To use simply add something like: missile-particle="graphics/particles/arrow.particle.xml"
to the item's or monster's xml entry
This will only work on equipped weapons, and on specified monster attacks.
This patch also fixes a memory leak with target particles
Diffstat (limited to 'src/resources/monsterdb.cpp')
-rw-r--r-- | src/resources/monsterdb.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp index 5ccb5dd1..dffac5f5 100644 --- a/src/resources/monsterdb.cpp +++ b/src/resources/monsterdb.cpp @@ -133,7 +133,9 @@ void MonsterDB::load() spriteNode, "particle-effect", ""); SpriteAction spriteAction = SpriteDef::makeSpriteAction( XML::getProperty(spriteNode, "action", "attack")); - currentInfo->addMonsterAttack(id, particleEffect, spriteAction); + const std::string missileParticle = XML::getProperty( + spriteNode, "missile-particle", ""); + currentInfo->addMonsterAttack(id, particleEffect, spriteAction, missileParticle); } else if (xmlStrEqual(spriteNode->name, BAD_CAST "particlefx")) { |