mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/Creature: Temporarily let Creatures violate dynspawn assumptions for pooled creatures. This should fix startup crashes until I can investigate and find a long-term fix. Tag #21519.
(cherry picked from commit 9fc6b13027)
This commit is contained in:
@@ -1777,13 +1777,14 @@ bool Creature::LoadFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap,
|
||||
|
||||
if (!m_respawnTime && !map->IsSpawnGroupActive(data->spawnGroupData->groupId))
|
||||
{
|
||||
ASSERT(m_respawnCompatibilityMode, "Creature (SpawnID " UI64FMTD ") trying to load in inactive spawn group %s.", spawnId, data->spawnGroupData->name.c_str());
|
||||
// @todo pools need fixing! this is just a temporary crashfix, but they violate dynspawn principles
|
||||
ASSERT(m_respawnCompatibilityMode || sPoolMgr->IsPartOfAPool<Creature>(spawnId), "Creature (SpawnID " UI64FMTD ") trying to load in inactive spawn group %s.", spawnId, data->spawnGroupData->name.c_str());
|
||||
m_respawnTime = GameTime::GetGameTime() + urand(4, 7);
|
||||
}
|
||||
|
||||
if (m_respawnTime) // respawn on Update
|
||||
{
|
||||
ASSERT(m_respawnCompatibilityMode, "Creature (SpawnID " UI64FMTD ") trying to load despite a respawn timer in progress.", spawnId);
|
||||
ASSERT(m_respawnCompatibilityMode || sPoolMgr->IsPartOfAPool<Creature>(spawnId), "Creature (SpawnID " UI64FMTD ") trying to load despite a respawn timer in progress.", spawnId);
|
||||
m_deathState = DEAD;
|
||||
if (CanFly())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user