aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorn0n4m3 <none@none>2010-04-11 11:11:32 +0400
committern0n4m3 <none@none>2010-04-11 11:11:32 +0400
commit8db7c06e6b16728eca499d29bb136980d714313b (patch)
treea06f96173df6f3f23aa2c5a51effa1fd69bd3dcd /src/game/Unit.cpp
parent36e13c1d1c615d89c1e18add73411c0525ecbf08 (diff)
Fix Auth on server also some fixes and cleanups. Big thx to TOM_RUS.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp8
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