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:
@@ -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
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define GAMEOBJECTDATA_H
|
||||
|
||||
#include "SharedDefines.h"
|
||||
#include "SpawnData.h"
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@@ -710,24 +711,15 @@ enum GOState
|
||||
};
|
||||
|
||||
// from `gameobject`
|
||||
struct GameObjectData
|
||||
struct GameObjectData : public SpawnData
|
||||
{
|
||||
explicit GameObjectData() = default;
|
||||
uint32 id{ 0 }; // entry in gamobject_template
|
||||
uint16 mapid{ 0 };
|
||||
uint32 phaseMask{ 0 };
|
||||
float posX{ 0.0f };
|
||||
float posY{ 0.0f };
|
||||
float posZ{ 0.0f };
|
||||
float orientation{ 0.0f };
|
||||
GameObjectData() : SpawnData(SPAWN_TYPE_GAMEOBJECT) {}
|
||||
uint32 id{0}; // entry in gameobject_template
|
||||
G3D::Quat rotation;
|
||||
int32 spawntimesecs{ 0 };
|
||||
uint32 ScriptId;
|
||||
uint32 animprogress{ 0 };
|
||||
GOState go_state{ GO_STATE_ACTIVE };
|
||||
uint8 spawnMask{ 0 };
|
||||
uint8 artKit{ 0 };
|
||||
bool dbData{ true };
|
||||
int32 spawntimesecs{0};
|
||||
uint32 animprogress{0};
|
||||
GOState go_state{GO_STATE_ACTIVE};
|
||||
uint8 artKit{0};
|
||||
};
|
||||
|
||||
#endif // GameObjectData_h__
|
||||
|
||||
Reference in New Issue
Block a user