Core/Spells: Rename SpellAttr4 to use official attribute names

Port From (https://github.com/TrinityCore/TrinityCore/commit/8d16a79dea4c0100d36e13b068c42499a3a48154)
This commit is contained in:
hondacrx
2022-06-01 13:37:39 -04:00
parent c5ed815f84
commit 62c2d34f1a
12 changed files with 154 additions and 134 deletions
+2 -9
View File
@@ -2440,7 +2440,7 @@ namespace Game.Entities
// interrupting auras with SpellAuraInterruptFlags.Damage before checking !damage (absorbed damage breaks that type of auras)
if (spellProto != null)
{
if (!spellProto.HasAttribute(SpellAttr4.DamageDoesntBreakAuras))
if (!spellProto.HasAttribute(SpellAttr4.ReactiveDamageProc))
victim.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Damage, spellProto);
}
else
@@ -2657,7 +2657,7 @@ namespace Game.Entities
if (damagetype != DamageEffectType.DOT && damage > 0 && !victim.GetOwnerGUID().IsPlayer() && (spellProto == null || !spellProto.HasAura(AuraType.DamageShield)))
victim.ToCreature().SetLastDamagedTime(GameTime.GetGameTime() + SharedConst.MaxAggroResetTime);
if (attacker != null)
if (attacker != null && (spellProto == null || !spellProto.HasAttribute(SpellAttr4.NoHarmfulThreat)))
victim.GetThreatManager().AddThreat(attacker, damage, spellProto);
}
else // victim is a player
@@ -3245,13 +3245,6 @@ namespace Game.Entities
if (schoolMask.HasAnyFlag(SpellSchoolMask.Holy) && victim.GetTypeId() != TypeId.Unit)
return 0;
// Ignore spells that can't be resisted
if (spellInfo != null)
{
if (spellInfo.HasAttribute(SpellAttr4.IgnoreResistances))
return 0;
}
float averageResist = CalculateAverageResistReduction(attacker, schoolMask, victim, spellInfo);
float[] discreteResistProbability = new float[11];