Core/Player: apply heirloom stat modifiers before maxing out health/power at level up.

This allows characters with heirlooms to have their health/mana maxed out at level up, instead of having some missing due to the increased stat modifiers from heirlooms.
This commit is contained in:
Snapper
2016-05-30 21:56:12 +02:00
parent 291a264013
commit eff6bcb697

View File

@@ -2794,6 +2794,8 @@ void Player::GiveLevel(uint8 level)
if (sWorld->getBoolConfig(CONFIG_ALWAYS_MAXSKILL)) // Max weapon skill when leveling up
UpdateSkillsToMaxSkillsForLevel();
_ApplyAllLevelScaleItemMods(true);
// set current level health and mana/energy to maximum after applying all mods.
SetFullHealth();
SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
@@ -2803,8 +2805,6 @@ void Player::GiveLevel(uint8 level)
SetPower(POWER_FOCUS, 0);
SetPower(POWER_HAPPINESS, 0);
_ApplyAllLevelScaleItemMods(true);
// update level to hunter/summon pet
if (Pet* pet = GetPet())
pet->SynchronizeLevelWithOwner();