mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Fix mail, professions, group loot, console spam, and some fixes. Big thx to TOM_RUS.
--HG-- branch : trunk
This commit is contained in:
@@ -12240,17 +12240,22 @@ int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_inde
|
||||
level -= int32(spellProto->spellLevel);
|
||||
|
||||
float basePointsPerLevel = spellProto->EffectRealPointsPerLevel[effect_index];
|
||||
float randomPointsPerLevel = 1;
|
||||
int32 basePoints = int32(effBasePoints + level * basePointsPerLevel);
|
||||
int32 randomPoints = int32(spellProto->EffectDieSides[effect_index] + level * randomPointsPerLevel);
|
||||
int32 randomPoints = int32(spellProto->EffectDieSides[effect_index]);
|
||||
|
||||
// range can have possitive and negative values, so order its for irand
|
||||
int32 randvalue = int32(1) >= randomPoints
|
||||
? irand(randomPoints, int32(1))
|
||||
: irand(int32(1), randomPoints);
|
||||
int32 value = basePoints;
|
||||
|
||||
if (randomPoints != 0)
|
||||
{
|
||||
// range can have positive and negative values, so order its for irand
|
||||
int32 randvalue = (0 > randomPoints)
|
||||
? irand(randomPoints, 0)
|
||||
: irand(0, randomPoints);
|
||||
|
||||
int32 value = basePoints + randvalue;
|
||||
//random damage
|
||||
basePoints += randvalue;
|
||||
}
|
||||
|
||||
// random damage
|
||||
//if (comboDamage != 0 && unitPlayer /*&& target && (target->GetGUID() == unitPlayer->GetComboTarget())*/)
|
||||
if (m_movedPlayer)
|
||||
if (uint8 comboPoints = m_movedPlayer->GetComboPoints())
|
||||
|
||||
Reference in New Issue
Block a user