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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user