aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-02 10:26:05 -0600
committermegamage <none@none>2009-02-02 10:26:05 -0600
commitea159d59bf9d872fdc3a5d0b3cf020bff996632d (patch)
tree81523c81dfe74d6f6efc140f1ce1c8c13a98e7f9 /src
parentc3783c80d9b4f9b752e6e1f49c0f3ecbf3ddba75 (diff)
*Fix the bug that delayed spell still deals damage to stealth/immune target.
--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 8da44046679..417afad7c41 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1129,6 +1129,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
unit->IsImmunedToSpell(m_spellInfo,true) ))
{
m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_IMMUNE);
+ m_damage = 0;
return;
}
@@ -1139,6 +1140,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
if (unit->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
{
m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_EVADE);
+ m_damage = 0;
return;
}
}
@@ -1148,6 +1150,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
if(m_spellInfo->speed > 0.0f && unit==m_targets.getUnitTarget() && !unit->isVisibleForOrDetect(m_caster,false))
{
m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_EVADE);
+ m_damage = 0;
return;
}
@@ -1162,6 +1165,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
if(m_spellInfo->speed > 0.0f && unit->GetTypeId() == TYPEID_PLAYER && !IsPositiveSpell(m_spellInfo->Id))
{
m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_EVADE);
+ m_damage = 0;
return;
}