mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[11397] Prevent happens one from cases "alive ghost" state.
Sometime levelup possible for dead player, prevent reset health in this case.
This commit is contained in:
parent
66ba7d2c49
commit
66598c8815
2 changed files with 3 additions and 2 deletions
|
|
@ -2618,7 +2618,8 @@ void Player::GiveLevel(uint32 level)
|
|||
UpdateAllStats();
|
||||
|
||||
// set current level health and mana/energy to maximum after applying all mods.
|
||||
SetHealth(GetMaxHealth());
|
||||
if (isAlive())
|
||||
SetHealth(GetMaxHealth());
|
||||
SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
|
||||
SetPower(POWER_ENERGY, GetMaxPower(POWER_ENERGY));
|
||||
if(GetPower(POWER_RAGE) > GetMaxPower(POWER_RAGE))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue