aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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)