Core/Players: Fixed setting rune regen fields, thanks Lordron for noticing

This commit is contained in:
Shauren
2012-08-19 15:42:05 +02:00
parent 56495da72e
commit 69cfc0f7bf
3 changed files with 10 additions and 20 deletions
+3 -11
View File
@@ -730,17 +730,9 @@ void Player::UpdateRuneRegen(RuneType rune)
void Player::UpdateAllRunesRegen()
{
uint32 cooldown = 0;
for (uint8 i = 0; i < MAX_RUNES; ++i)
{
cooldown = GetRuneBaseCooldown(i);
if (cooldown)
{
float regen = float(1 * IN_MILLISECONDS) / float(cooldown);
SetFloatValue(PLAYER_RUNE_REGEN_1 + i, regen);
}
}
for (uint8 i = 0; i < NUM_RUNE_TYPES; ++i)
if (uint32 cooldown = GetRuneTypeBaseCooldown(RuneType(i)))
SetFloatValue(PLAYER_RUNE_REGEN_1 + i, float(1 * IN_MILLISECONDS) / float(cooldown));
}
void Player::_ApplyAllStatBonuses()