[8175] Add shred in spell_check. Author: VladimirMangos
--HG-- branch : trunk
This commit is contained in:
+16
-15
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user