From 43dc0c97d19b132f6b1fd19d5c8cdf8566320173 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Mon, 17 Aug 2009 06:02:01 +0200 Subject: * Fix bug that player cannot receive credit for killing a creature if damage done to the creature by spell reflect >=49% of the creatures HP. --HG-- branch : trunk --- src/game/Spell.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index d997955710f..845c816e986 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1058,7 +1058,11 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) else if (missInfo == SPELL_MISS_REFLECT) // In case spell reflect from target, do all effect on caster (if hit) { if (target->reflectResult == SPELL_MISS_NONE) // If reflected spell hit caster -> do all effect on him + { spellHitTarget = m_caster; + if(m_caster->GetTypeId() == TYPEID_UNIT) + ((Creature*)m_caster)->LowerPlayerDamageReq(target->damage); + } } if(spellHitTarget) -- cgit v1.2.3