Merge pull request #2966 from Chaplain/cleanup
Core/Auras: Improvements in SPELL_AURA_MOD_DAMAGE_PERCENT_DONE handling:
This commit is contained in:
@@ -10382,6 +10382,10 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32
|
||||
|
||||
AuraEffectList const& mModDamagePercentDone = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
|
||||
for (AuraEffectList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
|
||||
{
|
||||
if (spellProto->EquippedItemClass == -1 && (*i)->GetSpellInfo()->EquippedItemClass != -1) //prevent apply mods from weapon specific case to non weapon specific spells (Example: thunder clap and two-handed weapon specialization)
|
||||
continue;
|
||||
|
||||
if ((*i)->GetMiscValue() & spellProto->GetSchoolMask())
|
||||
{
|
||||
if ((*i)->GetSpellInfo()->EquippedItemClass == -1)
|
||||
@@ -10391,6 +10395,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32
|
||||
else if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*i)->GetSpellInfo()))
|
||||
AddPctN(DoneTotalMod, (*i)->GetAmount());
|
||||
}
|
||||
}
|
||||
|
||||
uint32 creatureTypeMask = victim->GetCreatureTypeMask();
|
||||
// Add flat bonus from spell damage versus
|
||||
|
||||
Reference in New Issue
Block a user