mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[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:
parent
1f73468131
commit
ba868910e2
2 changed files with 7 additions and 4 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue