Fixed bug with professions in trainer list not being marked as known until trainer list re-opened.

This commit is contained in:
tomrus88 2010-03-27 19:41:15 +03:00
parent 112046718a
commit b99f51a984
13 changed files with 108 additions and 91 deletions

View file

@ -11250,12 +11250,17 @@ int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, SpellEffectIndex
int32 randomPoints = int32(spellProto->EffectDieSides[effect_index]);
float comboDamage = spellProto->EffectPointsPerComboPoint[effect_index];
// 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;
int32 value = basePoints + randvalue;
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);
basePoints += randvalue;
}
// random damage
if(comboDamage != 0 && unitPlayer && target && (target->GetGUID() == unitPlayer->GetComboTarget()))