* 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
This commit is contained in:
Machiavelli
2009-08-17 06:02:01 +02:00
parent 7fb33c8bf5
commit 43dc0c97d1
+4
View File
@@ -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) 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 if (target->reflectResult == SPELL_MISS_NONE) // If reflected spell hit caster -> do all effect on him
{
spellHitTarget = m_caster; spellHitTarget = m_caster;
if(m_caster->GetTypeId() == TYPEID_UNIT)
((Creature*)m_caster)->LowerPlayerDamageReq(target->damage);
}
} }
if(spellHitTarget) if(spellHitTarget)