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

View File

@@ -1121,10 +1121,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, WorldPackets::Character::Charac
UpdateMaxHealth(); // Update max Health (for add bonus from stamina)
SetFullHealth();
if (getPowerType() == POWER_MANA)
{
UpdateMaxPower(POWER_MANA); // Update max Mana (for add bonus from intellect)
SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
}
if (getPowerType() == POWER_RUNIC_POWER)
{

View File

@@ -2057,7 +2057,6 @@ class Player : public Unit, public GridObject<Player>
uint32 GetSpellByProto(ItemTemplate* proto);
float GetHealthBonusFromStamina();
float GetManaBonusFromIntellect();
bool UpdateStats(Stats stat) override;
bool UpdateAllStats() override;

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));