Fixed typo in mail query.

Fixed SMSG_ITEM_TEXT_QUERY_RESPONSE.
Other misc fixes.
This commit is contained in:
tomrus88 2010-03-25 19:46:26 +03:00
parent d4647bbeaa
commit 561c340f95
7 changed files with 40 additions and 34 deletions

View file

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