Core/Stats: Removed bonus max mana from intellect

This commit is contained in:
Shauren
2015-05-28 00:47:41 +02:00
parent 24db69b342
commit d7c53c30fb
3 changed files with 1 additions and 19 deletions
+1 -15
View File
@@ -117,7 +117,6 @@ bool Player::UpdateStats(Stats stat)
UpdateMaxHealth();
break;
case STAT_INTELLECT:
UpdateMaxPower(POWER_MANA);
UpdateAllSpellCritChances();
UpdateArmor(); //SPELL_AURA_MOD_RESISTANCE_OF_INTELLECT_PERCENT, only armor currently
break;
@@ -266,17 +265,6 @@ float Player::GetHealthBonusFromStamina()
return stamina * ratio;
}
float Player::GetManaBonusFromIntellect()
{
// Taken from PaperDollFrame.lua - 4.3.4.15595
float intellect = GetStat(STAT_INTELLECT);
float baseInt = std::min(20.0f, intellect);
float moreInt = intellect - baseInt;
return baseInt + (moreInt * 15.0f);
}
void Player::UpdateMaxHealth()
{
UnitMods unitMod = UNIT_MOD_HEALTH;
@@ -293,11 +281,9 @@ void Player::UpdateMaxPower(Powers power)
{
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
float bonusPower = (power == POWER_MANA && GetCreatePowers(power) > 0) ? GetManaBonusFromIntellect() : 0;
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreatePowers(power);
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + bonusPower;
value += GetModifierValue(unitMod, TOTAL_VALUE);
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxPower(power, uint32(value));