Core/Spells: Fix talent Dirty Deeds

Closes #542
This commit is contained in:
DrTenma
2011-07-16 22:21:15 +07:00
committed by tobmaps
parent f35d8c9bc4
commit cf9ce100ed
+28 -16
View File
@@ -10548,6 +10548,20 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellEntry const* spellProto, uint32
AddPctN(DoneTotalMod, (*i)->GetAmount());
break;
}
// Dirty Deeds
case 6427:
case 6428:
case 6579:
case 6580:
{
if (victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellProto, this))
{
// effect 0 have expected value but in negative state
int32 bonus = -(*i)->GetBase()->GetEffect(0)->GetAmount();
AddPctN(DoneTotalMod, bonus);
}
break;
}
}
}
@@ -11847,6 +11861,18 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT
AddPctN(DoneTotalMod, (*i)->GetAmount());
break;
}
// Dirty Deeds
case 6427:
case 6428:
{
if (victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellProto, this))
{
// effect 0 have expected value but in negative state
int32 bonus = -(*i)->GetBase()->GetEffect(0)->GetAmount();
AddPctN(DoneTotalMod, bonus);
}
break;
}
}
}
@@ -11931,27 +11957,13 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT
}
// .. taken pct: class scripts
AuraEffectList const& mclassScritAuras = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
/*AuraEffectList const& mclassScritAuras = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
for (AuraEffectList::const_iterator i = mclassScritAuras.begin(); i != mclassScritAuras.end(); ++i)
{
switch((*i)->GetMiscValue())
{
case 6427: case 6428: // Dirty Deeds
if (victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellProto, this))
{
AuraEffect* eff0 = (*i)->GetBase()->GetEffect(EFFECT_0);
if (!eff0 || (*i)->GetEffIndex() != 1)
{
sLog->outError("Spell structure of DD (%u) changed.", (*i)->GetId());
continue;
}
// effect 0 have expected value but in negative state
AddPctN(TakenTotalMod, -eff0->GetAmount());
}
break;
}
}
}*/
if (attType != RANGED_ATTACK)
{