[6921] Fixed level depend spell damage calculation (limit it to spell base - max level)

Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
DiSlord 2008-12-20 03:00:47 +03:00 committed by tomrus88
parent 1f73468131
commit ba868910e2
2 changed files with 7 additions and 4 deletions

View file

@ -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];