aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r--src/game/Creature.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index bb93b844c1d..3591179eb23 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -1484,6 +1484,9 @@ void Creature::setDeathState(DeathState s)
if(m_formation && m_formation->getLeader() == this)
m_formation->FormationReset(true);
+ SetHealth(0);
+ SetPower(getPowerType(),0);
+
if ((canFly() || IsFlying()) && FallGround())
return;
@@ -1564,7 +1567,6 @@ void Creature::Respawn(bool force)
if (m_isDeadByDefault)
{
setDeathState(JUST_DIED);
- SetHealth(0);
i_motionMaster.Clear();
clearUnitState(UNIT_STAT_ALL_STATE);
LoadCreaturesAddon(true);
@@ -1608,7 +1610,6 @@ void Creature::ForcedDespawn(uint32 timeMSToDespawn)
setDeathState(JUST_DIED);
RemoveCorpse();
- SetHealth(0); // just for nice GM-mode view
}
bool Creature::IsImmunedToSpell(SpellEntry const* spellInfo)