Core/Spells: Rename SpellAttr3 to use official attribute names
Port From (https://github.com/TrinityCore/TrinityCore/commit/88d7b58a3dd8b0eb95c233a20c1608ddce73d9ea)
This commit is contained in:
@@ -1914,7 +1914,7 @@ namespace Game.Entities
|
||||
if (!unitCaster)
|
||||
return;
|
||||
|
||||
if (!(spellInfo.HasAttribute(SpellAttr0.IsAbility) || spellInfo.HasAttribute(SpellAttr0.IsTradeskill) || spellInfo.HasAttribute(SpellAttr3.NoDoneBonus)) &&
|
||||
if (!(spellInfo.HasAttribute(SpellAttr0.IsAbility) || spellInfo.HasAttribute(SpellAttr0.IsTradeskill) || spellInfo.HasAttribute(SpellAttr3.IgnoreCasterModifiers)) &&
|
||||
((IsPlayer() && spellInfo.SpellFamilyName != 0) || IsCreature()))
|
||||
castTime = unitCaster.CanInstantCast() ? 0 : (int)(castTime * unitCaster.m_unitData.ModCastingSpeed);
|
||||
else if (spellInfo.HasAttribute(SpellAttr0.UsesRangedSlot) && !spellInfo.HasAttribute(SpellAttr2.AutoRepeat))
|
||||
@@ -1940,7 +1940,7 @@ namespace Game.Entities
|
||||
if (!unitCaster)
|
||||
return;
|
||||
|
||||
if (!(spellInfo.HasAttribute(SpellAttr0.IsAbility) || spellInfo.HasAttribute(SpellAttr0.IsTradeskill) || spellInfo.HasAttribute(SpellAttr3.NoDoneBonus)) &&
|
||||
if (!(spellInfo.HasAttribute(SpellAttr0.IsAbility) || spellInfo.HasAttribute(SpellAttr0.IsTradeskill) || spellInfo.HasAttribute(SpellAttr3.IgnoreCasterModifiers)) &&
|
||||
((IsPlayer() && spellInfo.SpellFamilyName != 0) || IsCreature()))
|
||||
duration = (int)(duration * unitCaster.m_unitData.ModCastingSpeed);
|
||||
else if (spellInfo.HasAttribute(SpellAttr0.UsesRangedSlot) && !spellInfo.HasAttribute(SpellAttr2.AutoRepeat))
|
||||
@@ -1963,6 +1963,9 @@ namespace Game.Entities
|
||||
if (!victim.IsAlive() && !victim.IsPlayer())
|
||||
return SpellMissInfo.None;
|
||||
|
||||
if (spellInfo.HasAttribute(SpellAttr3.NoAvoidance))
|
||||
return SpellMissInfo.None;
|
||||
|
||||
float missChance;
|
||||
if (spellInfo.HasAttribute(SpellAttr7.NoAttackMiss))
|
||||
{
|
||||
@@ -2005,7 +2008,7 @@ namespace Game.Entities
|
||||
modOwner.ApplySpellMod(spellInfo, SpellModOp.HitChance, ref modHitChance);
|
||||
|
||||
// Spells with SPELL_ATTR3_IGNORE_HIT_RESULT will ignore target's avoidance effects
|
||||
if (!spellInfo.HasAttribute(SpellAttr3.IgnoreHitResult))
|
||||
if (!spellInfo.HasAttribute(SpellAttr3.AlwaysHit))
|
||||
{
|
||||
// Chance hit from victim SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE auras
|
||||
modHitChance += victim.GetTotalAuraModifierByMiscMask(AuraType.ModAttackerSpellHitChance, (int)schoolMask);
|
||||
@@ -2087,7 +2090,7 @@ namespace Game.Entities
|
||||
return SpellMissInfo.Reflect;
|
||||
}
|
||||
|
||||
if (spellInfo.HasAttribute(SpellAttr3.IgnoreHitResult))
|
||||
if (spellInfo.HasAttribute(SpellAttr3.AlwaysHit))
|
||||
return SpellMissInfo.None;
|
||||
|
||||
switch (spellInfo.DmgClass)
|
||||
|
||||
Reference in New Issue
Block a user