Core/Spells: Fix talent Improved Unholy Presence

Closes #411
This commit is contained in:
DrTenma
2011-07-15 04:58:14 +07:00
committed by tobmaps
parent 5f565709cf
commit ebc1baf684
4 changed files with 27 additions and 7 deletions

View File

@@ -781,6 +781,27 @@ void Player::UpdateManaRegen()
SetStatFloatValue(UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER, power_regen_mp5 + power_regen);
}
void Player::UpdateRuneRegen(RuneType rune)
{
if (rune >= NUM_RUNE_TYPES)
return;
uint32 cooldown = 0;
for (uint32 i = 0; i < MAX_RUNES; ++i)
if (GetBaseRune(i) == rune)
{
cooldown = GetRuneBaseCooldown(i);
break;
}
if (cooldown <= 0)
return;
float regen = float(1 * IN_MILLISECONDS) / float(cooldown);
SetFloatValue(PLAYER_RUNE_REGEN_1 + uint8(rune), regen);
}
void Player::_ApplyAllStatBonuses()
{
SetCanModifyStats(false);