aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-07 16:57:33 -0600
committermegamage <none@none>2009-01-07 16:57:33 -0600
commit1595554e58fd1ad484e396ad41c6ddc6733db9ae (patch)
tree2583245960bdc86a7c6a0f6ed00b6bd324adc383 /src
parent80d3cd43f65e4e7cecfdd17e53c6a4542ddc4e40 (diff)
*Allow physical spells gain damage bonus from buff/debuff.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Unit.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 210060982a4..291e1aae367 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8492,8 +8492,8 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
if(!spellProto || !pVictim || damagetype==DIRECT_DAMAGE )
return pdamage;
- if(spellProto->SchoolMask == SPELL_SCHOOL_MASK_NORMAL)
- return pdamage;
+ //if(spellProto->SchoolMask == SPELL_SCHOOL_MASK_NORMAL)
+ // return pdamage;
//damage = CalcArmorReducedDamage(pVictim, damage);
int32 BonusDamage = 0;
@@ -8871,7 +8871,9 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
// Spellmod SpellDamage
//float SpellModSpellDamage = 100.0f;
- float CoefficientPtc = ((float)CastingTime/3500.0f)*DotFactor*100.0f;
+ float CoefficientPtc = DotFactor * 100.0f;
+ if(spellProto->SchoolMask != SPELL_SCHOOL_MASK_NORMAL)
+ CoefficientPtc *= ((float)CastingTime/3500.0f);
if(Player* modOwner = GetSpellModOwner())
//modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_SPELL_BONUS_DAMAGE,SpellModSpellDamage);
@@ -8881,10 +8883,11 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
CoefficientPtc /= 100.0f;
//float DoneActualBenefit = DoneAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * SpellModSpellDamage * LvlPenalty;
+
float DoneActualBenefit = DoneAdvertisedBenefit * CoefficientPtc * LvlPenalty;
- float TakenActualBenefit = TakenAdvertisedBenefit;
- if(spellProto->SpellFamilyName)
- TakenActualBenefit *= (CastingTime / 3500.0f) * DotFactor * LvlPenalty;
+ float TakenActualBenefit = TakenAdvertisedBenefit * DotFactor * LvlPenalty;
+ if(spellProto->SpellFamilyName && spellProto->SchoolMask != SPELL_SCHOOL_MASK_NORMAL)
+ TakenActualBenefit *= ((float)CastingTime / 3500.0f);
float tmpDamage = (float(pdamage)+DoneActualBenefit)*DoneTotalMod;