feat(Core/Maps): port spawn system/dynamic spawns from TrinityCore (#25206)

Co-authored-by: r00ty-tc <r00ty-tc@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Andrew
2026-04-12 17:52:01 -03:00
committed by GitHub
parent a8d327f21c
commit f5c4de92eb
33 changed files with 1456 additions and 114 deletions
@@ -22,6 +22,7 @@
#include "DynamicObject.h"
#include "GameObject.h"
#include "GridNotifiers.h"
#include "ObjectMgr.h"
#include "Transport.h"
template <class T>
@@ -38,6 +39,11 @@ void GridObjectLoader::LoadCreatures(CellGuidSet const& guid_set, Map* map)
{
for (ObjectGuid::LowType const& guid : guid_set)
{
// Skip spawns whose spawn group is not active on this map
CreatureData const* cData = sObjectMgr->GetCreatureData(guid);
if (cData && !map->IsSpawnGroupActive(cData->spawnGroupId))
continue;
Creature* obj = new Creature();
if (!obj->LoadFromDB(guid, map))
{
@@ -65,6 +71,10 @@ void GridObjectLoader::LoadGameObjects(CellGuidSet const& guid_set, Map* map)
{
GameObjectData const* data = sObjectMgr->GetGameObjectData(guid);
// Skip spawns whose spawn group is not active on this map
if (data && !map->IsSpawnGroupActive(data->spawnGroupId))
continue;
if (data && sObjectMgr->IsGameObjectStaticTransport(data->id))
{
StaticTransport* transport = new StaticTransport();