From 91f54b7fc9c1ad35316575ef10983a0eabafbe83 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Tue, 7 Jun 2011 17:43:55 +0200 Subject: Added defaults to empty attacks. Reviewed-by: Jaxad0127. --- src/resources/beinginfo.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/resources/beinginfo.cpp') diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index e6dc948e..62990392 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -22,6 +22,7 @@ #include "resources/beinginfo.h" #include "log.h" +#include "configuration.h" #include "utils/dtor.h" #include "utils/gettext.h" @@ -90,7 +91,10 @@ const std::string &BeingInfo::getSound(SoundEvent event) const const Attack *BeingInfo::getAttack(int id) const { - static Attack *empty = new Attack(SpriteAction::ATTACK, -1, -1, -1, + static Attack *empty = new Attack(SpriteAction::ATTACK, + -1, // Default strike effect on monster + paths.getIntValue("hitEffectId"), + paths.getIntValue("criticalHitEffectId"), std::string()); Attacks::const_iterator i = mAttacks.find(id); -- cgit v1.2.3-70-g09d2