aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorthenecromancer <none@none>2010-01-14 17:47:38 +0100
committerthenecromancer <none@none>2010-01-14 17:47:38 +0100
commita428293dae905f7c3730277ac15fe5f5cba70aa5 (patch)
tree531fc68e8d3ad61a78964461f25a675016aefb1d /src
parent97576c68c4d70f6ce803fb6db436c3b9ca616d1a (diff)
Issue 62: DK talent Impurity
Note that there are probably more of things having just "dummy effect". This way to get them is quite slow (auras are at least sorted by their type) and probably some sort of modifier could be stored for them --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Unit.cpp31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 3e918396c0e..f1e799ea43d 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -9847,9 +9847,29 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
if (pVictim->GetDiseasesByCaster(owner->GetGUID()) > 0)
DoneTotalMod *= (100.0f + aurEff->GetAmount()) / 100.0f;
- // This is not a typo - Impurity has SPELLFAMILY_DRUID
- if (AuraEffect * aurEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 1986, 0))
- ApCoeffMod *= (100.0f + aurEff->GetAmount()) / 100.0f;
+ // Impurity (dummy effect)
+ if (GetTypeId() == TYPEID_PLAYER)
+ {
+ PlayerSpellMap playerSpells = ((Player*)this)->GetSpellMap();
+ for (PlayerSpellMap::const_iterator itr = playerSpells.begin(); itr != playerSpells.end(); ++itr)
+ {
+ if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->disabled)
+ continue;
+ switch (itr->first)
+ {
+ case 49220:
+ case 49633:
+ case 49635:
+ case 49636:
+ case 49638:
+ {
+ if (const SpellEntry *proto=sSpellStore.LookupEntry(itr->first))
+ ApCoeffMod *= (100.0f + proto->CalculateSimpleValue(0)) / 100.0f;
+ }
+ break;
+ }
+ }
+ }
break;
}
@@ -10815,11 +10835,6 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage, WeaponAttackType att
normalized = true;
break;
}
-
- // This is not a typo - Impurity has SPELLFAMILY_DRUID
- if (AuraEffect const * aurEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 1986, 0))
- APbonus *= (100.0f + aurEff->GetAmount()) / 100.0f;
-
DoneFlatBenefit += int32(APbonus/14.0f * GetAPMultiplier(attType,normalized));
}