[8175] Add shred in spell_check. Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-07-16 10:31:15 +08:00
parent 11c26a969f
commit 0376f836f9
2 changed files with 17 additions and 15 deletions
+16 -15
View File
@@ -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);