mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-13 11:34:07 -04:00
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user