Core/Auras: Fixed displaying SPELL_AURA_MOD_DAMAGE_PERCENT_DONE damage bonus in character stats

This commit is contained in:
Shauren
2011-01-28 20:41:03 +01:00
parent e41e3544ff
commit c3c2a807f0
2 changed files with 23 additions and 8 deletions
@@ -5552,10 +5552,17 @@ void AuraEffect::HandleModDamageDone(AuraApplication const * aurApp, uint8 mode,
}
}
void AuraEffect::HandleModDamagePercentDone(AuraApplication const * /*aurApp*/, uint8 mode, bool /*apply*/) const
void AuraEffect::HandleModDamagePercentDone(AuraApplication const * aurApp, uint8 mode, bool apply) const
{
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
if (!(mode & AURA_EFFECT_HANDLE_REAL))
return;
Player* target = aurApp->GetTarget()->ToPlayer();
if (!target)
return;
if (target->HasItemFitToSpellRequirements(GetSpellProto()))
aurApp->GetTarget()->ApplyModSignedFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, GetAmount()/100.0f, apply);
}
void AuraEffect::HandleModOffhandDamagePercent(AuraApplication const * aurApp, uint8 mode, bool apply) const