Core/Spells: Spells with SPELL_EFFECT_KNOCK_BACK(like Thunderstorm) can't knoback target if target has ROOT/STUN

Signed-off-by: Chipsi <[email protected]>
This commit is contained in:
Chipsi
2012-07-28 15:37:24 +02:00
parent bf22bc11d3
commit 41f0923f1b
+4
View File
@@ -5204,6 +5204,10 @@ void Spell::EffectKnockBack(SpellEffIndex effIndex)
if (creatureTarget->isWorldBoss() || creatureTarget->IsDungeonBoss()) if (creatureTarget->isWorldBoss() || creatureTarget->IsDungeonBoss())
return; return;
// Spells with SPELL_EFFECT_KNOCK_BACK(like Thunderstorm) can't knoback target if target has ROOT/STUN
if (unitTarget->HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED))
return;
// Typhoon // Typhoon
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && m_spellInfo->SpellFamilyFlags[1] & 0x01000000) if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && m_spellInfo->SpellFamilyFlags[1] & 0x01000000)
{ {