aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrTenma <dr.tenma@yahoo.com>2011-07-16 22:21:15 +0700
committertobmaps <spambot42@yandex.ru>2011-07-16 22:21:15 +0700
commitcf9ce100edb2a1c514d5a509870fedf1191b7da3 (patch)
treeec9e3c76a3a03e6b418947882e499237f95090a7
parentf35d8c9bc4c06786176fbe6a1fc569d5f523b68f (diff)
Core/Spells: Fix talent Dirty Deeds
Closes #542
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp44
1 files changed, 28 insertions, 16 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index a6b52be756d..e58864ba190 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -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)
{