mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Merge
--HG-- branch : trunk
This commit is contained in:
@@ -1262,16 +1262,26 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
|
||||
}
|
||||
}
|
||||
|
||||
uint32 curhealth = data->curhealth;
|
||||
if (curhealth)
|
||||
uint32 curhealth;
|
||||
|
||||
if (!m_regenHealth)
|
||||
{
|
||||
curhealth = uint32(curhealth*_GetHealthMod(GetCreatureInfo()->rank));
|
||||
if (curhealth < 1)
|
||||
curhealth = 1;
|
||||
curhealth = data->curhealth;
|
||||
if (curhealth)
|
||||
{
|
||||
curhealth = uint32(curhealth*_GetHealthMod(GetCreatureInfo()->rank));
|
||||
if (curhealth < 1)
|
||||
curhealth = 1;
|
||||
}
|
||||
SetPower(POWER_MANA,data->curmana);
|
||||
}
|
||||
else
|
||||
{
|
||||
curhealth = GetMaxHealth();
|
||||
SetPower(POWER_MANA,GetMaxPower(POWER_MANA));
|
||||
}
|
||||
|
||||
SetHealth(m_deathState == ALIVE ? curhealth : 0);
|
||||
SetPower(POWER_MANA,data->curmana);
|
||||
|
||||
// checked at creature_template loading
|
||||
m_defaultMovementType = MovementGeneratorType(data->movementType);
|
||||
|
||||
Reference in New Issue
Block a user