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:
@@ -256,7 +256,7 @@ namespace Framework.Constants
|
||||
ModAuraDurationByDispelNotStack = 246,
|
||||
CloneCaster = 247,
|
||||
ModCombatResultChance = 248,
|
||||
ConvertRune = 249,
|
||||
ModDamagePercentDoneByTargetAuraMechanic = 249,
|
||||
ModIncreaseHealth2 = 250,
|
||||
ModEnemyDodge = 251,
|
||||
ModSpeedSlowAll = 252,
|
||||
|
||||
@@ -200,6 +200,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.Mechanic != 0)
|
||||
MathFunctions.AddPct(ref DoneTotalMod, GetTotalAuraModifierByMiscValue(AuraType.ModDamageDoneForMechanic, (int)spellEffectInfo.Mechanic));
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user