[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:
VladimirMangos 2011-04-26 04:46:21 +04:00
parent 66ba7d2c49
commit 66598c8815
2 changed files with 3 additions and 2 deletions

View file

@ -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));

View file

@ -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__