mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Stats: Removed bonus max mana from intellect
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user