Core/Spells: Fixed spells using SPELL_EFFECT_POWER_BURN not working when combined with other effect types that hit other units and power burn hits caster

Port From (https://github.com/TrinityCore/TrinityCore/commit/23aa13257a0af0143651f48ac3af65435ba9f346)
This commit is contained in:
hondacrx
2021-02-24 18:49:18 -05:00
parent 8fbaa61086
commit d1485ad482
-13
View File
@@ -4960,19 +4960,6 @@ namespace Game.Spells
break;
}
case SpellEffectName.PowerBurn:
case SpellEffectName.PowerDrain:
{
// Can be area effect, Check only for players and not check if target - caster (spell can have multiply drain/burn effects)
if (m_caster.IsTypeId(TypeId.Player))
{
Unit target = m_targets.GetUnitTarget();
if (target != null)
if (target != m_caster && unitTarget.GetPowerType() != (PowerType)effect.MiscValue)
return SpellCastResult.BadTargets;
}
break;
}
case SpellEffectName.Charge:
{
if (!_triggeredCastFlags.HasAnyFlag(TriggerCastFlags.IgnoreCasterAuras) && m_caster.HasUnitState(UnitState.Root))