Core/Auras: Implemented SPELL_AURA_PERIODIC_WEAPON_PERCENT_DAMAGE

Port From (https://github.com/TrinityCore/TrinityCore/commit/5ed75bb2d3fdc5bd2ee4dddb748db291fe3b1541)
This commit is contained in:
hondacrx
2021-02-22 15:29:14 -05:00
parent 253fd8b976
commit f15cc130fa
7 changed files with 100 additions and 46 deletions
+8
View File
@@ -1425,6 +1425,14 @@ namespace Game.Entities
return true;
}
public bool HasAuraTypeWithFamilyFlags(AuraType auraType, uint familyName, FlagArray128 familyFlags)
{
foreach (AuraEffect aura in GetAuraEffectsByType(auraType))
if (aura.GetSpellInfo().SpellFamilyName == (SpellFamilyNames)familyName && aura.GetSpellInfo().SpellFamilyFlags & familyFlags)
return true;
return false;
}
bool HasBreakableByDamageAuraType(AuraType type, uint excludeAura)
{
var auras = GetAuraEffectsByType(type);