mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
Fixed bug with professions in trainer list not being marked as known until trainer list re-opened.
This commit is contained in:
parent
112046718a
commit
b99f51a984
13 changed files with 108 additions and 91 deletions
|
|
@ -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()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue