Core/Auras: Implement SPELL_AURA_MOD_DAMAGE_PERCENT_DONE_BY_TARGET_AURA_MECHANIC

Port From (https://github.com/TrinityCore/TrinityCore/commit/6a760de79b6dc9d821bd6dd2c362301c307991f0)
This commit is contained in:
hondacrx
2023-09-04 07:55:44 -04:00
parent fb44221203
commit 54c6d05de0
3 changed files with 17 additions and 1 deletions
+8
View File
@@ -3966,6 +3966,14 @@ namespace Game.Entities
return false;
});
// bonus against target aura mechanic
DoneTotalMod *= GetTotalAuraMultiplier(AuraType.ModDamagePercentDoneByTargetAuraMechanic, aurEff =>
{
if (victim.HasAuraWithMechanic(1ul << aurEff.GetMiscValue()))
return true;
return false;
});
// Add SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC percent bonus
if (spellEffectInfo != null && spellEffectInfo.Mechanic != 0)
MathFunctions.AddPct(ref DoneTotalMod, GetTotalAuraModifierByMiscValue(AuraType.ModDamageDoneForMechanic, (int)spellEffectInfo.Mechanic));