summaryrefslogtreecommitdiff
path: root/src/resources/beinginfo.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-06-04 00:50:23 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-06-07 18:51:22 +0200
commitafa134640b2e2c7c0f28a54c8691545848795dd9 (patch)
treeb8c9f03debebc9a15de2a21f4d4a377247615c1d /src/resources/beinginfo.cpp
parent9b1c970c70f30733d5d851b834a860365819409c (diff)
downloadmana-afa134640b2e2c7c0f28a54c8691545848795dd9.tar.gz
mana-afa134640b2e2c7c0f28a54c8691545848795dd9.tar.bz2
mana-afa134640b2e2c7c0f28a54c8691545848795dd9.tar.xz
mana-afa134640b2e2c7c0f28a54c8691545848795dd9.zip
Added hit effects on victims from monsters attacks.
Resolves: Mana-Mantis #336. Reviewed-by: Jaxad0127.
Diffstat (limited to 'src/resources/beinginfo.cpp')
-rw-r--r--src/resources/beinginfo.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp
index 22651f6f..e6dc948e 100644
--- a/src/resources/beinginfo.cpp
+++ b/src/resources/beinginfo.cpp
@@ -90,17 +90,20 @@ const std::string &BeingInfo::getSound(SoundEvent event) const
const Attack *BeingInfo::getAttack(int id) const
{
- static Attack *empty = new Attack(SpriteAction::ATTACK, -1, std::string());
+ static Attack *empty = new Attack(SpriteAction::ATTACK, -1, -1, -1,
+ std::string());
Attacks::const_iterator i = mAttacks.find(id);
return (i == mAttacks.end()) ? empty : (*i).second;
}
void BeingInfo::addAttack(int id, std::string action, int effectId,
+ int hitEffectId, int criticalHitEffectId,
const std::string &missileParticleFilename)
{
if (mAttacks[id])
delete mAttacks[id];
- mAttacks[id] = new Attack(action, effectId, missileParticleFilename);
+ mAttacks[id] = new Attack(action, effectId, hitEffectId,
+ criticalHitEffectId, missileParticleFilename);
}