mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[8907] Avoid set intelect bonus to mana amunt if character not have mana.
This fix bug when not non-caster classes show mana subbar in way as it must be show only for druid in form.
This commit is contained in:
parent
2c17ba41f1
commit
c2f77ae278
2 changed files with 6 additions and 3 deletions
|
|
@ -224,9 +224,12 @@ void Player::UpdateMaxPower(Powers power)
|
|||
{
|
||||
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
|
||||
|
||||
float bonusPower = (power == POWER_MANA) ? GetManaBonusFromIntellect() : 0;
|
||||
uint32 create_power = GetCreatePowers(power);
|
||||
|
||||
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreatePowers(power);
|
||||
// ignore classes without mana
|
||||
float bonusPower = (power == POWER_MANA && create_power > 0) ? GetManaBonusFromIntellect() : 0;
|
||||
|
||||
float value = GetModifierValue(unitMod, BASE_VALUE) + create_power;
|
||||
value *= GetModifierValue(unitMod, BASE_PCT);
|
||||
value += GetModifierValue(unitMod, TOTAL_VALUE) + bonusPower;
|
||||
value *= GetModifierValue(unitMod, TOTAL_PCT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue