aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2018-02-27 22:10:36 +0100
committerfunjoker <funjoker109@gmail.com>2021-08-08 21:21:34 +0200
commit4b93059ec79f06effeeb4c164e426e0276b24193 (patch)
tree63988c68179e83463359e9f4eaf2df6a3b8ae1e4 /src
parent8757a80767a932ceea679e84881c7dd2f89322cb (diff)
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 9fc6b13027d2d66a99b6bee49d3add23f2c0c8af)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 13c80e7f11d..40e26027ba0 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -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())
{