Core/Spells: Implement SPELL_AURA_MOD_AUTOATTACK_DAMAGE
This commit is contained in:
1 parent
5d6b2739bb
commit
d26b7210fb
2 files changed
+17
-1
No files matched your search
@@ -11617,6 +11617,22 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT
|
||||
float TakenTotalMod = 1.0f;
|
||||
|
||||
// ..done
|
||||
// SPELL_AURA_MOD_AUTOATTACK_DAMAGE
|
||||
if (!spellProto)
|
||||
{
|
||||
AuraEffectList const & autoattackDamage = GetAuraEffectsByType(SPELL_AURA_MOD_AUTOATTACK_DAMAGE);
|
||||
for (AuraEffectList::const_iterator i = autoattackDamage.begin(); i != autoattackDamage.end(); ++i)
|
||||
{
|
||||
int32 amount = (*i)->GetAmount();
|
||||
if ((*i)->GetSpellInfo()->EquippedItemClass == -1)
|
||||
AddPctN(DoneTotalMod, amount);
|
||||
else if (!((*i)->GetSpellInfo()->AttributesEx5 & SPELL_ATTR5_SPECIAL_ITEM_CLASS_CHECK) && ((*i)->GetSpellInfo()->EquippedItemSubClassMask == 0))
|
||||
AddPctN(DoneTotalMod, amount);
|
||||
else if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*i)->GetSpellInfo()))
|
||||
AddPctN(DoneTotalMod, amount);
|
||||
}
|
||||
}
|
||||
|
||||
AuraEffectList const& mModDamagePercentDone = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
|
||||
for (AuraEffectList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user