mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +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;
|
uint8 comboPoints = unitPlayer ? unitPlayer->GetComboPoints() : 0;
|
||||||
|
|
||||||
int32 level = int32(getLevel()) - int32(spellProto->spellLevel);
|
int32 level = int32(getLevel());
|
||||||
if (level > spellProto->maxLevel && spellProto->maxLevel > 0)
|
if (level > (int32)spellProto->maxLevel && spellProto->maxLevel > 0)
|
||||||
level = spellProto->maxLevel;
|
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 basePointsPerLevel = spellProto->EffectRealPointsPerLevel[effect_index];
|
||||||
float randomPointsPerLevel = spellProto->EffectDicePerLevel[effect_index];
|
float randomPointsPerLevel = spellProto->EffectDicePerLevel[effect_index];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "6920"
|
#define REVISION_NR "6921"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue