From 34f5e856fa1f1213487c08e61bd884b0198b14fc Mon Sep 17 00:00:00 2001 From: DiSlord Date: Sat, 20 Dec 2008 03:00:47 +0300 Subject: [PATCH] [6921] Fixed level depend spell damage calculation (limit it to spell base - max level) Signed-off-by: DiSlord --- src/game/Unit.cpp | 9 ++++++--- src/shared/revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index c6a43788..5905df7c 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9250,9 +9250,12 @@ int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_inde uint8 comboPoints = unitPlayer ? unitPlayer->GetComboPoints() : 0; - int32 level = int32(getLevel()) - int32(spellProto->spellLevel); - if (level > spellProto->maxLevel && spellProto->maxLevel > 0) - level = spellProto->maxLevel; + int32 level = int32(getLevel()); + if (level > (int32)spellProto->maxLevel && spellProto->maxLevel > 0) + level = (int32)spellProto->maxLevel; + else if (level < (int32)spellProto->baseLevel) + level = (int32)spellProto->baseLevel; + level-= (int32)spellProto->spellLevel; float basePointsPerLevel = spellProto->EffectRealPointsPerLevel[effect_index]; float randomPointsPerLevel = spellProto->EffectDicePerLevel[effect_index]; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c05428b3..056d7d99 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "6920" + #define REVISION_NR "6921" #endif // __REVISION_NR_H__ -- 2.11.4.GIT