mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
Core/Creature: Add another aggressive compatibility mode assertion to catch faulty dynspawn code.
(cherry picked from commit 3eab2d7efc)
This commit is contained in:
@@ -1775,7 +1775,6 @@ bool Creature::LoadFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap,
|
||||
|
||||
m_respawnTime = GetMap()->GetCreatureRespawnTime(m_spawnId);
|
||||
|
||||
// Is the creature script objecting to us spawning? If yes, delay by a little bit (then re-check in ::Update)
|
||||
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());
|
||||
@@ -1784,6 +1783,7 @@ bool Creature::LoadFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap,
|
||||
|
||||
if (m_respawnTime) // respawn on Update
|
||||
{
|
||||
ASSERT(m_respawnCompatibilityMode, "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