Core/Spells Allow bosses to receive KnockBack under certain conditions

Port From (https://github.com/TrinityCore/TrinityCore/commit/23a113756e65a953e80a3b03d72e3d11bd373a43)
This commit is contained in:
hondacrx
2020-07-24 14:49:26 -04:00
parent 17ebf751c9
commit 0480e5c4d0
+7 -4
View File
@@ -4085,10 +4085,13 @@ namespace Game.Spells
if (!unitTarget)
return;
Creature creatureTarget = unitTarget.ToCreature();
if (creatureTarget)
if (creatureTarget.IsWorldBoss() || creatureTarget.IsDungeonBoss())
return;
if (m_caster.GetTypeId() == TypeId.Player || m_caster.GetOwnerGUID().IsPlayer() || m_caster.IsHunterPet())
{
Creature creatureTarget = unitTarget.ToCreature();
if (creatureTarget != null)
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(UnitState.Root | UnitState.Stunned))