feat(Core/Spawns): introduce SpawnData base struct and spawn group infrastructure (#25152)

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-03-23 01:30:22 -03:00
committed by GitHub
parent 27b0ecc6dc
commit 9757174460
5 changed files with 120 additions and 27 deletions
@@ -22,6 +22,7 @@
#include "DatabaseEnv.h"
#include "ItemTemplate.h"
#include "LootMgr.h"
#include "SpawnData.h"
#include "Unit.h"
#include <list>
@@ -365,32 +366,23 @@ typedef std::unordered_map<uint8, EquipmentInfo> EquipmentInfoContainerInternal;
typedef std::unordered_map<uint32, EquipmentInfoContainerInternal> EquipmentInfoContainer;
// from `creature` table
struct CreatureData
struct CreatureData : public SpawnData
{
CreatureData() = default;
CreatureData() : SpawnData(SPAWN_TYPE_CREATURE) {}
uint32 id1{0}; // entry in creature_template
uint32 id2{0}; // entry in creature_template
uint32 id3{0}; // entry in creature_template
uint16 mapid{0};
uint32 phaseMask{0};
uint32 displayid{0};
int8 equipmentId{0};
float posX{0.0f};
float posY{0.0f};
float posZ{0.0f};
float orientation{0.0f};
uint32 spawntimesecs{0};
float wander_distance{0.0f};
uint32 currentwaypoint{0};
uint32 curhealth{0};
uint32 curmana{0};
uint8 movementType{0};
uint8 spawnMask{0};
uint32 npcflag{0};
uint32 unit_flags{0}; // enum UnitFlags mask values
uint32 dynamicflags{0};
uint32 ScriptId;
bool dbData{true};
};
struct CreatureModelInfo