mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +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
|
|
@ -397,7 +397,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
|||
&Aura::HandleNULL, //341 2 spells in 4.3.4 modifies cooldown of hearthstone and cast time of archaeology mining
|
||||
&Aura::HandleNULL, //342 SPELL_AURA_MOD_ATTACKSPEED_2 17 spells in 4.3.4
|
||||
&Aura::HandleNULL, //343 SPELL_AURA_MOD_ALL_DAMAGE_FROM_CASTER 2 spells in 4.3.4
|
||||
&Aura::HandleNULL, //344 SPELL_AURA_MOD_AUTOATTACK_DAMAGE 6 spells in 4.3.4
|
||||
&Aura::HandleNoImmediateEffect, //344 SPELL_AURA_MOD_AUTOATTACK_DAMAGE 6 spells in 4.3.4
|
||||
&Aura::HandleNULL, //345 SPELL_AURA_MOD_IGNORE_ARMOR_PCT 3 spells in 4.3.4
|
||||
&Aura::HandleNULL, //346 32 spells in 4.3.4 shows progressbar-like ui?
|
||||
&Aura::HandleNULL, //347 SPELL_AURA_MOD_CD_FROM_HASTE 2 spells in 4.3.4
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12637"
|
||||
#define REVISION_NR "12638"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue