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 authored and Aokromes committed 2017-06-15 07:28:59 +02:00
1 parent 234adeaafd
commit 288aca3d15
1 file changed
+4 -3
+4 -3
View File
@@ -4462,9 +4462,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))