diff options
| author | n0n4m3 <none@none> | 2010-04-11 11:11:32 +0400 |
|---|---|---|
| committer | n0n4m3 <none@none> | 2010-04-11 11:11:32 +0400 |
| commit | 8db7c06e6b16728eca499d29bb136980d714313b (patch) | |
| tree | a06f96173df6f3f23aa2c5a51effa1fd69bd3dcd /src/game/Unit.cpp | |
| parent | 36e13c1d1c615d89c1e18add73411c0525ecbf08 (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.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 |
