aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorXanadu <none@none>2010-03-18 17:22:11 +0100
committerXanadu <none@none>2010-03-18 17:22:11 +0100
commit72833e158440dc8f411a75a386861f936bfe108b (patch)
treea66fe0a49ff59f8ef2bda345edb9ad1ffe5db1ec /src/game/Unit.cpp
parent793a22669273eceffef2c39b17623f8254588b48 (diff)
Identified a new spell attribute forbidding some spells to use caster's done dmg mods (spellpower etc).
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 423345196d1..18a16d12ec4 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -10169,6 +10169,13 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
DoneTotal += DoneAdvertisedBenefit * coeff * coeff2;
}
+ // Some spells don't benefit from done mods
+ if (spellProto->AttributesEx3 & SPELL_ATTR_EX3_NO_DONE_BONUS)
+ {
+ DoneTotal = 0;
+ DoneTotalMod = 1.0f;
+ }
+
float tmpDamage = (int32(pdamage) + DoneTotal) * DoneTotalMod;
// apply spellmod to Done damage (flat and pct)
if (Player* modOwner = GetSpellModOwner())