Core/Creatures: store the original entry of a creature instead of the current one as creatures may change their entry during runtime

This commit is contained in:
Ovahlord
2021-10-30 15:41:47 +02:00
parent 9ee2af2312
commit d3da33dff0

View File

@@ -2447,7 +2447,7 @@ void Creature::SaveRespawnTime(uint32 forceDelay)
}
time_t thisRespawnTime = forceDelay ? GameTime::GetGameTime() + forceDelay : m_respawnTime;
GetMap()->SaveRespawnTime(SPAWN_TYPE_CREATURE, m_spawnId, GetEntry(), thisRespawnTime, Trinity::ComputeGridCoord(GetHomePosition().GetPositionX(), GetHomePosition().GetPositionY()).GetId());
GetMap()->SaveRespawnTime(SPAWN_TYPE_CREATURE, m_spawnId, GetOriginalEntry(), thisRespawnTime, Trinity::ComputeGridCoord(GetHomePosition().GetPositionX(), GetHomePosition().GetPositionY()).GetId());
}
// this should not be called by petAI or