Core/Spells: Implemented SPELL_ATTR8_CAN_HIT_AOE_UNTARGETABLE
Port From (https://github.com/TrinityCore/TrinityCore/commit/877ae5b47d56a754b56f1326990f5ae41aa989c9)
This commit is contained in:
@@ -2616,7 +2616,7 @@ namespace Game.Entities
|
||||
if (!unitTarget.HasUnitFlag(UnitFlags.PlayerControlled) && unitOrOwner.IsImmuneToNPC())
|
||||
return false;
|
||||
|
||||
if (bySpell == null || !bySpell.HasAttribute(SpellAttr8.AttackIgnoreImmuneToPcFlag))
|
||||
if (bySpell == null || !bySpell.HasAttribute(SpellAttr8.CanAttackImmunePC))
|
||||
{
|
||||
if (unitOrOwner.HasUnitFlag(UnitFlags.PlayerControlled) && unitTarget.IsImmuneToPC())
|
||||
return false;
|
||||
@@ -2761,7 +2761,7 @@ namespace Game.Entities
|
||||
{
|
||||
if (unit != null && unit.HasUnitFlag(UnitFlags.PlayerControlled))
|
||||
{
|
||||
if (bySpell == null || !bySpell.HasAttribute(SpellAttr8.AttackIgnoreImmuneToPcFlag))
|
||||
if (bySpell == null || !bySpell.HasAttribute(SpellAttr8.CanAttackImmunePC))
|
||||
if (unitTarget != null && unitTarget.IsImmuneToPC())
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -9191,7 +9191,7 @@ namespace Game.Spells
|
||||
switch (_searchReason)
|
||||
{
|
||||
case WorldObjectSpellAreaTargetSearchReason.Area:
|
||||
if (unitTarget.GetSpellOtherImmunityMask().HasFlag(SpellOtherImmunity.AoETarget))
|
||||
if (!_spellInfo.HasAttribute(SpellAttr8.CanHitAoeUntargetable) && unitTarget.GetSpellOtherImmunityMask().HasFlag(SpellOtherImmunity.AoETarget))
|
||||
return false;
|
||||
break;
|
||||
case WorldObjectSpellAreaTargetSearchReason.Chain:
|
||||
|
||||
Reference in New Issue
Block a user