Adjust maximum sizes of some healthcalculations over to utilize 64-bit uint

--HG--
branch : trunk
This commit is contained in:
click
2010-08-06 05:11:28 +02:00
parent 9a21459c9d
commit 1565fe4ff4
2 changed files with 2 additions and 2 deletions
@@ -4626,7 +4626,7 @@ void AuraEffect::HandleModTotalPercentStat(AuraApplication const * aurApp, uint8
if ((GetMiscValue() == STAT_STAMINA) && (maxHPValue > 0) && (m_spellProto->Attributes & 0x10))
{
// newHP = (curHP / maxHP) * newMaxHP = (newMaxHP * curHP) / maxHP -> which is better because no int -> double -> int conversion is needed
uint32 newHPValue = (target->GetMaxHealth() * curHPValue) / maxHPValue;
uint64 newHPValue = (target->GetMaxHealth() * curHPValue) / maxHPValue;
target->SetHealth(newHPValue);
}
}