summaryrefslogtreecommitdiff
path: root/src/resources/monsterinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/monsterinfo.cpp')
-rw-r--r--src/resources/monsterinfo.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/resources/monsterinfo.cpp b/src/resources/monsterinfo.cpp
index 2d788a72..fbb93ec1 100644
--- a/src/resources/monsterinfo.cpp
+++ b/src/resources/monsterinfo.cpp
@@ -62,6 +62,14 @@ const std::string &MonsterInfo::getAttackParticleEffect(int attackType) const
return (i == mMonsterAttacks.end()) ? empty : (*i).second->particleEffect;
}
+const std::string &MonsterInfo::getAttackMissileParticle(int attackType) const
+{
+ static std::string empty("");
+ std::map<int, MonsterAttack*>::const_iterator i =
+ mMonsterAttacks.find(attackType);
+ return (i == mMonsterAttacks.end()) ? empty : (*i).second->missileParticle;
+}
+
SpriteAction MonsterInfo::getAttackAction(int attackType) const
{
std::map<int, MonsterAttack*>::const_iterator i =
@@ -71,10 +79,12 @@ SpriteAction MonsterInfo::getAttackAction(int attackType) const
void MonsterInfo::addMonsterAttack(int id,
const std::string &particleEffect,
- SpriteAction action)
+ SpriteAction action,
+ const std::string &missileParticle)
{
MonsterAttack *a = new MonsterAttack;
a->particleEffect = particleEffect;
+ a->missileParticle = missileParticle;
a->action = action;
mMonsterAttacks[id] = a;
}