From 3bfe67792dbf66f83eae0cfbaff0cff3c14b4d0b Mon Sep 17 00:00:00 2001 From: Gustavo Date: Wed, 14 Jun 2017 09:16:12 -0300 Subject: Core/Spells Allow bosses to receive KnockBack under certain conditions (#19312) Conditions: Not player, not controlled by player and not hunter's pet --- src/server/game/Spells/SpellEffects.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index c20799d391b..721586a0fe4 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -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)) -- cgit v1.2.3