*Allow aura type SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT to mod weapon damage effects.
--HG-- branch : trunk
This commit is contained in:
+16
-3
@@ -9380,9 +9380,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||||||
{
|
{
|
||||||
AuraEffectList const& mDamageDoneMechanic = pVictim->GetAurasByType(SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT);
|
AuraEffectList const& mDamageDoneMechanic = pVictim->GetAurasByType(SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT);
|
||||||
for(AuraEffectList::const_iterator i = mDamageDoneMechanic.begin();i != mDamageDoneMechanic.end(); ++i)
|
for(AuraEffectList::const_iterator i = mDamageDoneMechanic.begin();i != mDamageDoneMechanic.end(); ++i)
|
||||||
if((mechanicMask & uint32(1<<((*i)->GetMiscValue())))
|
if(mechanicMask & uint32(1<<((*i)->GetMiscValue())))
|
||||||
// Shred - "Effects which increase Bleed damage also increase Shred damage"
|
|
||||||
|| ((*i)->GetMiscValue() == MECHANIC_BLEED && spellProto->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags[0] & 0x8000))
|
|
||||||
TakenTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f;
|
TakenTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10333,6 +10331,21 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (spellProto)
|
||||||
|
{
|
||||||
|
// Mod damage from spell mechanic
|
||||||
|
uint32 mechanicMask = GetAllSpellMechanicMask(spellProto);
|
||||||
|
if (mechanicMask)
|
||||||
|
{
|
||||||
|
AuraEffectList const& mDamageDoneMechanic = pVictim->GetAurasByType(SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT);
|
||||||
|
for(AuraEffectList::const_iterator i = mDamageDoneMechanic.begin();i != mDamageDoneMechanic.end(); ++i)
|
||||||
|
if((mechanicMask & uint32(1<<((*i)->GetMiscValue())))
|
||||||
|
// Shred - "Effects which increase Bleed damage also increase Shred damage"
|
||||||
|
|| ((*i)->GetMiscValue() == MECHANIC_BLEED && spellProto->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags[0] & 0x8000))
|
||||||
|
TakenTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(attType != RANGED_ATTACK)
|
if(attType != RANGED_ATTACK)
|
||||||
{
|
{
|
||||||
AuraEffectList const& mModMeleeDamageTakenPercent = pVictim->GetAurasByType(SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT);
|
AuraEffectList const& mModMeleeDamageTakenPercent = pVictim->GetAurasByType(SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT);
|
||||||
|
|||||||
Reference in New Issue
Block a user