Core/Auras: Fix SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC for effects mechanics
Port From (https://github.com/TrinityCore/TrinityCore/commit/64e8e11377c9b0bf92e81afb38e0668ba3fdf3f4)
This commit is contained in:
@@ -3655,7 +3655,7 @@ namespace Game.Entities
|
||||
return (uint)Math.Max(damage * (1.0f - mitigation), 0.0f);
|
||||
}
|
||||
|
||||
public uint MeleeDamageBonusDone(Unit victim, uint damage, WeaponAttackType attType, DamageEffectType damagetype, SpellInfo spellProto = null, SpellSchoolMask damageSchoolMask = SpellSchoolMask.Normal)
|
||||
public uint MeleeDamageBonusDone(Unit victim, uint damage, WeaponAttackType attType, DamageEffectType damagetype, SpellInfo spellProto = null, SpellEffectInfo spellEffectInfo = null, SpellSchoolMask damageSchoolMask = SpellSchoolMask.Normal)
|
||||
{
|
||||
if (victim == null || damage == 0)
|
||||
return 0;
|
||||
@@ -3741,7 +3741,9 @@ namespace Game.Entities
|
||||
});
|
||||
|
||||
// Add SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC percent bonus
|
||||
if (spellProto != null)
|
||||
if (spellEffectInfo != null && spellEffectInfo.Mechanic != 0)
|
||||
MathFunctions.AddPct(ref DoneTotalMod, GetTotalAuraModifierByMiscValue(AuraType.ModDamageDoneForMechanic, (int)spellEffectInfo.Mechanic));
|
||||
else if (spellProto != null && spellProto.Mechanic != 0)
|
||||
MathFunctions.AddPct(ref DoneTotalMod, GetTotalAuraModifierByMiscValue(AuraType.ModDamageDoneForMechanic, (int)spellProto.Mechanic));
|
||||
|
||||
float damageF = damage;
|
||||
|
||||
Reference in New Issue
Block a user