Core/Entities: A little update to the Hp per stamina formula

This commit is contained in:
Subv
2012-08-18 10:17:51 -05:00
parent 74620494b9
commit ad01e56363
2 changed files with 14 additions and 7 deletions
+10 -3
View File
@@ -225,18 +225,25 @@ void Player::UpdateArmor()
float Player::GetHealthBonusFromStamina()
{
// Taken from PaperDollFrame.lua - 4.3.4.15595
gtOCTHpPerStaminaEntry const* hpBase = sGtOCTHpPerStaminaStore.LookupEntry((getClass() - 1) * GT_MAX_LEVEL + getLevel() - 1);
return GetStat(STAT_STAMINA) * hpBase->ratio;
float stamina = GetStat(STAT_STAMINA);
float baseStam = std::min(20, stamina);
float moreStam = stamina - baseStam;
return baseStam + moreStam * hpBase->ratio;
}
float Player::GetManaBonusFromIntellect()
{
// Taken from PaperDollFrame.lua - 4.3.4.15595
float intellect = GetStat(STAT_INTELLECT);
float baseInt = intellect < 20 ? intellect : 20;
float baseInt = std::min(20, intellect);
float moreInt = intellect - baseInt;
return baseInt + (moreInt*15.0f);
return baseInt + (moreInt * 15.0f);
}
void Player::UpdateMaxHealth()