diff options
author | megamage <none@none> | 2009-07-16 10:31:15 +0800 |
---|---|---|
committer | megamage <none@none> | 2009-07-16 10:31:15 +0800 |
commit | 0376f836f9620f0e2fe26de0ea938864d80bc0a0 (patch) | |
tree | 13ea09766af02de6508eac197626564ac4638a37 /src | |
parent | 11c26a969fe2bf6b2b24c3499a87906c7c605fd8 (diff) |
[8175] Add shred in spell_check. Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.cpp | 31 |
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); |