aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 67cd87db8a5..77c8e619c19 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -10249,6 +10249,22 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
if((*i)->GetMiscValue() & GetMeleeDamageSchoolMask())
TakenTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f;
+ // .. taken pct (special attacks)
+ 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;
+ }
+ }
+
// .. taken pct: dummy auras
AuraEffectList const& mDummyAuras = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
for(AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
@@ -10293,21 +10309,6 @@ 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)
{
AuraEffectList const& mModMeleeDamageTakenPercent = pVictim->GetAurasByType(SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT);