Warning fix

This commit is contained in:
Shauren
2016-09-24 01:19:18 +02:00
parent 55d2c19f07
commit 8abf6da2ea

View File

@@ -1843,7 +1843,7 @@ void Player::Regenerate(Powers power)
if (HasAuraTypeWithValue(SPELL_AURA_PREVENT_REGENERATE_POWER, power))
return;
uint32 curValue = GetPower(power);
int32 curValue = GetPower(power);
// TODO: updating haste should update UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER for certain power types
PowerTypeEntry const* powerType = sDB2Manager.GetPowerTypeEntry(power);
@@ -1909,7 +1909,7 @@ void Player::Regenerate(Powers power)
if (addvalue < 0.0f)
{
if (curValue > integerValue + minPower)
if (curValue > minPower + integerValue)
{
curValue -= integerValue;
m_powerFraction[powerIndex] = addvalue + integerValue;