Core/Spells: Rename SpellAttr6 to use official attribute names

Port From (https://github.com/TrinityCore/TrinityCore/commit/94aac14b4da2d6d2b7565dfdb91313f09a87f168)
This commit is contained in:
hondacrx
2022-06-01 15:55:27 -04:00
parent 399d39a4b9
commit 7bc70c02ad
7 changed files with 50 additions and 54 deletions
+2 -6
View File
@@ -40,7 +40,7 @@ namespace Game.Spells
public Spell(WorldObject caster, SpellInfo info, TriggerCastFlags triggerFlags, ObjectGuid originalCasterGUID = default, ObjectGuid originalCastId = default)
{
m_spellInfo = info;
m_caster = (info.HasAttribute(SpellAttr6.CastByCharmer) && caster.GetCharmerOrOwner() != null ? caster.GetCharmerOrOwner() : caster);
m_caster = (info.HasAttribute(SpellAttr6.OriginateFromController) && caster.GetCharmerOrOwner() != null ? caster.GetCharmerOrOwner() : caster);
m_spellValue = new SpellValue(m_spellInfo, caster);
m_castItemLevel = -1;
@@ -5861,10 +5861,6 @@ namespace Game.Spells
if (unitCaster == null)
return SpellCastResult.SpellCastOk;
// spells totally immuned to caster auras (wsg flag drop, give marks etc)
if (m_spellInfo.HasAttribute(SpellAttr6.IgnoreCasterAuras))
return SpellCastResult.SpellCastOk;
// these attributes only show the spell as usable on the client when it has related aura applied
// still they need to be checked against certain mechanics
@@ -7156,7 +7152,7 @@ namespace Game.Spells
if (IsTriggered())
return false;
if (m_casttime == 0 && m_spellInfo.HasAttribute(SpellAttr6.NotResetSwingIfInstant))
if (m_casttime == 0 && m_spellInfo.HasAttribute(SpellAttr6.DoesntResetSwingTimerIfInstant))
return false;
return true;