mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 13:37:08 +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,6 +2618,7 @@ void Player::GiveLevel(uint32 level)
|
||||||
UpdateAllStats();
|
UpdateAllStats();
|
||||||
|
|
||||||
// set current level health and mana/energy to maximum after applying all mods.
|
// set current level health and mana/energy to maximum after applying all mods.
|
||||||
|
if (isAlive())
|
||||||
SetHealth(GetMaxHealth());
|
SetHealth(GetMaxHealth());
|
||||||
SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
|
SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
|
||||||
SetPower(POWER_ENERGY, GetMaxPower(POWER_ENERGY));
|
SetPower(POWER_ENERGY, GetMaxPower(POWER_ENERGY));
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11396"
|
#define REVISION_NR "11397"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue