Core/Spells: Changed boss knockback immunity

This commit is contained in:
johnholiver
2011-05-07 22:16:30 +02:00
committed by Shauren
parent 61b165648c
commit 8cc4125664
3 changed files with 5 additions and 7 deletions
+1 -1
View File
@@ -16200,7 +16200,7 @@ void Unit::KnockbackFrom(float x, float y, float speedXY, float speedZ)
player = (Player*)this; player = (Player*)this;
else else
{ {
player = dynamic_cast<Player*>(GetCharmer()); player = GetCharmer()->ToPlayer();
if (player && player->m_mover != this) if (player && player->m_mover != this)
player = NULL; player = NULL;
} }
+4
View File
@@ -6074,6 +6074,10 @@ void Spell::EffectKnockBack(SpellEffIndex effIndex)
if (!unitTarget) if (!unitTarget)
return; return;
if (Creature* creatureTarget = unitTarget->ToCreature())
if (creatureTarget->isWorldBoss() || creatureTarget->IsDungeonBoss())
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)
{ {
-6
View File
@@ -3547,12 +3547,6 @@ void SpellMgr::LoadSpellCustomAttr()
} }
break; break;
} }
case SPELL_EFFECT_KNOCK_BACK:
case SPELL_EFFECT_KNOCK_BACK_DEST:
if (spellInfo->EffectMechanic[i] == MECHANIC_NONE)
spellInfo->EffectMechanic[i] = MECHANIC_KNOCKOUT;
++count;
break;
} }
switch (SpellTargetType[spellInfo->EffectImplicitTargetA[j]]) switch (SpellTargetType[spellInfo->EffectImplicitTargetA[j]])