Core/Spells Allow bosses to receive KnockBack under certain conditions (#19312)

Conditions: Not player, not controlled by player and not hunter's pet
This commit is contained in:
Gustavo
2017-06-14 09:16:12 -03:00
committed by Treeston
parent 132538db1d
commit 3bfe67792d

View File

@@ -4675,9 +4675,10 @@ void Spell::EffectKnockBack(SpellEffIndex effIndex)
if (!unitTarget)
return;
if (Creature* creatureTarget = unitTarget->ToCreature())
if (creatureTarget->isWorldBoss() || creatureTarget->IsDungeonBoss())
return;
if (m_caster->GetTypeId() == TYPEID_PLAYER || m_caster->GetOwnerGUID().IsPlayer() || m_caster->IsHunterPet())
if (Creature* creatureTarget = unitTarget->ToCreature())
if (creatureTarget->isWorldBoss() || creatureTarget->IsDungeonBoss())
return;
// Spells with SPELL_EFFECT_KNOCK_BACK (like Thunderstorm) can't knockback target if target has ROOT/STUN
if (unitTarget->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED))