aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMachiavelli <none@none>2009-08-17 06:02:01 +0200
committerMachiavelli <none@none>2009-08-17 06:02:01 +0200
commit43dc0c97d19b132f6b1fd19d5c8cdf8566320173 (patch)
treebe9e39e97b6ed14c28b645afbe810af055a7cb99 /src
parent7fb33c8bf502ee0e63e175485275af2b1872e7dc (diff)
* 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
Diffstat (limited to 'src')
-rw-r--r--src/game/Spell.cpp4
1 files changed, 4 insertions, 0 deletions
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)