Skip to content

creature_spawn_data_template

killerwife edited this page May 14, 2023 · 11 revisions

Back to world database list of tables.

The creature_spawn_data_template table

Contains data to override spawned creatures UnitFlags,Faction,ModelId,EquipmentId,CurHealth,CurMana,SpawnFlags Linked to creature_spawn_data.Id

Structure

Name Type Null Key Default Extra
Entry int(10) unsigned NO PRI (NULL)
NpcFlags int(10) NO PRI -1
UnitFlags bigint(20) NO PRI -1
Faction int(10) unsigned NO 0
ModelId mediumint(8) unsigned NO PRI 0
EquipmentId int(10) unsigned NO PRI -1
CurHealth int(10) unsigned NO PRI 0
CurMana int(10) unsigned NO PRI 0
SpawnFlags int(10) unsigned NO PRI 0
RelayId int(10) unsigned NO 0 dbscripts_on_relay
StringId int(10) unsigned NO 0 dbscripts_on_relay
Name varchar(200) NO 0

Description of the fields

Entry

Unique ID for each creature_spawn_data_template. Linked to creature_spawn_data.Id To avoid conflicts between Expansions, please use:

Version: Range
Generic All Expansions 0- 999
Vanilla 1000 - 9999
TBC 10000 - 19999
WotLK 20000+
Generic All Expansions 30000 - 30999
Specific Creature Entry Case creature_template.entry * 100 + (1 – 99)

NpcFlags

New value that will be applied to creature. Ref: creature_template.NpcFlags Important Default -1. Value 0 will remove all NpcFlags from creature Use with CREATURE_EXTRA_FLAG_DYNGUID for entry. Old legacy code breaks it on respawn and a lot of other stuff relied on this "feature", with dynguid the problem does not exist.

UnitFlags

New value that will be applied to creature. Ref: creature_template.UnitFlags Important Default -1. Value 0 will remove all UnitFlags from creature

Faction

New value that will be applied to creature. Ref: FactionTemplate.dbc.content 0 - will leave creatures default value

ModelId

New value that will be applied to creature. Ref: Creature_Model_Info.Entry 0 - will leave creatures default value

EquipmentId

New value that will be applied to creature. Ref: creature_equip_template.entry -1 - will leave creatures default value, 0 sets no equipment.

CurHealth

New value that will be applied to creature. Ref: Creature_Model_Info.Entry 0 - will leave creatures default value

CurMana

New value that will be applied to creature. Ref: creature.curmana 0 - will leave creatures default value

SpawnFlags

Special Flags applied to creature:

Bit: Hex Name
1 0x01 SPAWN_FLAG_RUN_ON_SPAWN
2 0x02 SPAWN_FLAG_HOVER (flying)

RelayId

dbscripts.id - RelayId

StringId

string_id.Id - Sets StringId to all spawns with template

Name

Verbose description on where it is used and when

Clone this wiki locally