mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user