diff options
| author | spp <none@none> | 2009-12-06 16:41:05 +0100 |
|---|---|---|
| committer | spp <none@none> | 2009-12-06 16:41:05 +0100 |
| commit | bf595a0fe3bfe73529741423045811cf29fbd6bc (patch) | |
| tree | 131ce91c155a371a758b1d5428693e8850970fb0 /src/game/Creature.cpp | |
| parent | 314031016b127a40775d20cbb8374952dd503fc5 (diff) | |
Fix a crash in creature respawn, closes #566
--HG--
branch : trunk
Diffstat (limited to 'src/game/Creature.cpp')
| -rw-r--r-- | src/game/Creature.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 4493142fb89..03068041f23 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -238,7 +238,7 @@ void Creature::RemoveCorpse() ObjectAccessor::UpdateObjectVisibility(this); loot.clear(); uint32 respawnDelay = m_respawnDelay; - if (AI()) + if (IsAIEnabled) AI()->CorpseRemoved(respawnDelay); m_respawnTime = time(NULL) + m_respawnDelay; @@ -1894,7 +1894,8 @@ void Creature::Respawn(bool force) } //Call AI respawn virtual function - AI()->JustRespawned(); + if (IsAIEnabled) + AI()->JustRespawned(); uint16 poolid = poolhandler.IsPartOfAPool(GetGUIDLow(), GetTypeId()); if (poolid) |
