Core/Spells: implement SPELL_AURA_MOD_AUTOATTACK_DAMAGE

This commit is contained in:
Ovahlord committed 2019-07-26 00:01:45 +02:00
1 parent 462e1e6ac9
commit 41e88fe548
3 files changed
+7 -2

No files matched your search

+5
View File
@@ -8037,6 +8037,11 @@ uint32 Unit::MeleeDamageBonusDone(Unit* victim, uint32 pdamage, WeaponAttackType
if (spellProto)
AddPct(DoneTotalMod, GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC, spellProto->Mechanic));
// Add SPELL_AURA_MOD_AUTOATTACK_DAMAGE percent bonus
if (!spellProto)
for (AuraEffect const* meleeBonusEff : GetAuraEffectsByType(SPELL_AURA_MOD_AUTOATTACK_DAMAGE))
AddPct(DoneTotalMod, meleeBonusEff->GetAmount());
// done scripted mod (take it from owner)
// Unit* owner = GetOwner() ? GetOwner() : this;
// AuraEffectList const& mOverrideClassScript = owner->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);