mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[c12638] Implement SPELL_AURA_MOD_AUTOATTACK_DAMAGE
This commit is contained in:
parent
445a2de485
commit
4e824f5672
3 changed files with 16 additions and 2 deletions
|
|
@ -7774,6 +7774,20 @@ uint32 Unit::MeleeDamageBonusDone(Unit* pVictim, uint32 pdamage, WeaponAttackTyp
|
|||
DonePercent *= GetModifierValue(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT); // no school check required
|
||||
}
|
||||
|
||||
if (!spellProto)
|
||||
{
|
||||
// apply SPELL_AURA_MOD_AUTOATTACK_DAMAGE for white damage
|
||||
AuraList const& mModAutoAttackDamageAuras = GetAurasByType(SPELL_AURA_MOD_AUTOATTACK_DAMAGE);
|
||||
for (AuraList::const_iterator i = mModAutoAttackDamageAuras.begin(); i != mModAutoAttackDamageAuras.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetSpellProto()->GetEquippedItemClass() == -1 || // general, weapon independent
|
||||
pWeapon && pWeapon->IsFitToSpellRequirements((*i)->GetSpellProto())) // OR used weapon fits aura requirements
|
||||
{
|
||||
DonePercent *= ((*i)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ..done pct (by creature type mask)
|
||||
DonePercent *= GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS, creatureTypeMask);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue