Core/Players: Implemented rune regen scaling with haste.

Closes #7413.
This commit is contained in:
Tuxity
2012-08-17 14:48:45 +02:00
committed by Shauren
parent 9749fe55f8
commit b3b10ccb5a
3 changed files with 36 additions and 3 deletions
@@ -789,6 +789,21 @@ void Player::UpdateRuneRegen(RuneType rune)
SetFloatValue(PLAYER_RUNE_REGEN_1 + uint8(rune), regen);
}
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);
}
}
}
void Player::_ApplyAllStatBonuses()
{
SetCanModifyStats(false);