Core/Auras: Implemented SPELL_AURA_ADD_PCT_MODIFIER_BY_SPELL_LABEL and SPELL_AURA_ADD_FLAT_MODIFIER_BY_SPELL_LABEL

Port From (https://github.com/TrinityCore/TrinityCore/commit/ba4fa060d765a35507f1a73287504c3f2e440fdb)
This commit is contained in:
hondacrx
2021-10-17 09:11:00 -04:00
parent 68c4407840
commit 0b64c4a02e
8 changed files with 517 additions and 360 deletions
+16 -3
View File
@@ -660,9 +660,22 @@ namespace Game.Spells
if (affectSpell == null)
return false;
// TEMP: dont use IsAffected - !familyName and !familyFlags are not valid options for spell mods
// TODO: investigate if the !familyName and !familyFlags conditions are even valid for all other (nonmod) uses of SpellInfo::IsAffected
return affectSpell.SpellFamilyName == SpellFamilyName && mod.mask & SpellFamilyFlags;
switch (mod.type)
{
case SpellModType.Flat:
case SpellModType.Pct:
// TEMP: dont use IsAffected - !familyName and !familyFlags are not valid options for spell mods
// TODO: investigate if the !familyName and !familyFlags conditions are even valid for all other (nonmod) uses of SpellInfo::IsAffected
return affectSpell.SpellFamilyName == SpellFamilyName && (mod as SpellModifierByClassMask).mask & SpellFamilyFlags;
case SpellModType.LabelFlat:
return HasLabel((uint)(mod as SpellFlatModifierByLabel).value.LabelID);
case SpellModType.LabelPct:
return HasLabel((uint)(mod as SpellPctModifierByLabel).value.LabelID);
default:
break;
}
return false;
}
public bool CanPierceImmuneAura(SpellInfo auraSpellInfo)