mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user