Core/Auras: Improvements in SPELL_AURA_MOD_DAMAGE_PERCENT_DONE handling:
*prevent apply mods from weapon specific case to non weapon specific spells
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);
|
AuraEffectList const& mModDamagePercentDone = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
|
||||||
for (AuraEffectList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
|
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)->GetMiscValue() & spellProto->GetSchoolMask())
|
||||||
{
|
{
|
||||||
if ((*i)->GetSpellInfo()->EquippedItemClass == -1)
|
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()))
|
else if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*i)->GetSpellInfo()))
|
||||||
AddPctN(DoneTotalMod, (*i)->GetAmount());
|
AddPctN(DoneTotalMod, (*i)->GetAmount());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint32 creatureTypeMask = victim->GetCreatureTypeMask();
|
uint32 creatureTypeMask = victim->GetCreatureTypeMask();
|
||||||
// Add flat bonus from spell damage versus
|
// Add flat bonus from spell damage versus
|
||||||
|
|||||||
Reference in New Issue
Block a user