Skip to content

Commit 48fd041

Browse files
authored
Core/Pools: Fix handle respawning for nested pools (TrinityCore#31163)
Closes TrinityCore#28524
1 parent d7c31e0 commit 48fd041

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/server/game/Pools/PoolMgr.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -377,26 +377,14 @@ void PoolGroup<Pool>::Spawn1Object(PoolObject* obj)
377377
sPoolMgr->SpawnPool(obj->guid);
378378
}
379379

380-
// Method that does the respawn job on the specified creature
381-
template <>
382-
void PoolGroup<Creature>::ReSpawn1Object(PoolObject* obj)
380+
// Method that does the respawn job on the specified object
381+
template <typename T>
382+
void PoolGroup<T>::ReSpawn1Object(PoolObject* obj)
383383
{
384384
Despawn1Object(obj->guid, false, false);
385385
Spawn1Object(obj);
386386
}
387387

388-
// Method that does the respawn job on the specified gameobject
389-
template <>
390-
void PoolGroup<GameObject>::ReSpawn1Object(PoolObject* obj)
391-
{
392-
Despawn1Object(obj->guid, false, false);
393-
Spawn1Object(obj);
394-
}
395-
396-
// Nothing to do for a child Pool
397-
template <>
398-
void PoolGroup<Pool>::ReSpawn1Object(PoolObject* /*obj*/) { }
399-
400388
template <>
401389
void PoolGroup<Creature>::RemoveRespawnTimeFromDB(ObjectGuid::LowType guid)
402390
{

0 commit comments

Comments
 (0)