Fix mail, professions, group loot, console spam, and some fixes. Big thx to TOM_RUS.

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2010-04-11 11:16:42 +04:00
parent 457df07bd4
commit be95faff23
34 changed files with 302 additions and 299 deletions

View File

@@ -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())