diff options
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ef4d0994b70..4b57fcbb76e 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -12240,14 +12240,14 @@ int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_inde level -= int32(spellProto->spellLevel); float basePointsPerLevel = spellProto->EffectRealPointsPerLevel[effect_index]; - float randomPointsPerLevel = spellProto->EffectDicePerLevel[effect_index]; + float randomPointsPerLevel = 1; int32 basePoints = int32(effBasePoints + level * basePointsPerLevel); int32 randomPoints = int32(spellProto->EffectDieSides[effect_index] + level * randomPointsPerLevel); // range can have possitive and negative values, so order its for irand - int32 randvalue = int32(spellProto->EffectBaseDice[effect_index]) >= randomPoints - ? irand(randomPoints, int32(spellProto->EffectBaseDice[effect_index])) - : irand(int32(spellProto->EffectBaseDice[effect_index]), randomPoints); + int32 randvalue = int32(1) >= randomPoints + ? irand(randomPoints, int32(1)) + : irand(int32(1), randomPoints); int32 value = basePoints + randvalue; //random damage |