Difference between revisions of "Creature SF"

From Project Skyfire
Jump to navigation Jump to search
(moved from old wiki)
 
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
| __TOC__
 
| __TOC__
 
|}
 
|}
[[Category: TrinityCore2 World database tables]]
 
 
{{Back-to:World}}
 
{{Back-to:World}}
  
Line 218: Line 217:
  
 
==== id ====
 
==== id ====
The id of the template that is used when instantiating this creature. See [[creature_template_tc2#entry|creature_template.entry]]
+
The id of the template that is used when instantiating this creature. See [[creature_template_SF#entry|creature_template.entry]]
  
 
==== map ====
 
==== map ====
The Map ID of the position of the creature. See [[Map.dbc tc2|Map.dbc]]
+
The Map ID of the position of the creature. See [[Map.dbc SF|Map.dbc]]
  
 
==== spawnMask ====
 
==== spawnMask ====
Line 248: Line 247:
  
 
==== modelid ====
 
==== modelid ====
The model ID associated with this creature. Note that two creatures that use the same template can have different models. See [[creature_model_info_tc2|creature_model_info]] for more information on model-specific characteristics. NOTE: This can be left at 0  
+
The model ID associated with this creature. Note that two creatures that use the same template can have different models. See [[creature_model_info_SF|creature_model_info]] for more information on model-specific characteristics. NOTE: This can be left at 0  
 
and a random model from its assigned models in creature_template will be assigned by the core.
 
and a random model from its assigned models in creature_template will be assigned by the core.
  
 
==== equipment_id ====
 
==== equipment_id ====
The ID of the equipment that the creature is using. See [[creature_equip_template_tc2#entry|creature_equip_template.entry]]
+
The ID of the equipment that the creature is using. See [[creature_equip_template_SF#entry|creature_equip_template.entry]]
  
 
NOTE: equipment should be assigned in creature_template. Only use this if a guid has different equipment than others of the same entry.
 
NOTE: equipment should be assigned in creature_template. Only use this if a guid has different equipment than others of the same entry.
Line 272: Line 271:
  
 
==== spawndist ====
 
==== spawndist ====
The maximum distance that the creature should spawn from its spawn point. Also controls how far away the creature can walk from its spawn point if its [[creature tc2#MovementType|MovementType]] = 1.
+
The maximum distance that the creature should spawn from its spawn point. Also controls how far away the creature can walk from its spawn point if its [[creature SF#MovementType|MovementType]] = 1.
  
 
==== currentwaypoint ====
 
==== currentwaypoint ====
The current waypoint number that the creature is on, if any. See [[waypoint_data_tc2#point|waypoint_data.point]]
+
The current waypoint number that the creature is on, if any. See [[waypoint_data_SF#point|waypoint_data.point]]
  
 
==== curhealth ====
 
==== curhealth ====
Line 287: Line 286:
  
 
==== MovementType ====
 
==== MovementType ====
The movement type associated with this creature. Usually the same as [[creature_template_tc2#MovementType|creature_template.MovementType]]  but can be different.
+
The movement type associated with this creature. Usually the same as [[creature_template_SF#MovementType|creature_template.MovementType]]  but can be different.
  
 
==== npcflag ====
 
==== npcflag ====
Same as [[Creature_template_tc2#npcflag|creature_template.npcflag]]
+
Same as [[Creature_template_SF#npcflag|creature_template.npcflag]]
  
 
NOTE: A creature.npcflag record will override a creature_template.npcflag record.
 
NOTE: A creature.npcflag record will override a creature_template.npcflag record.
  
 
==== unit_flags ====
 
==== unit_flags ====
Same as [[Creature_template_tc2#unit_flags|creature_template.unit_flags]]
+
Same as [[Creature_template_SF#unit_flags|creature_template.unit_flags]]
  
 
NOTE: A creature.unit_flags record will override a creature_template.unit_flags record.
 
NOTE: A creature.unit_flags record will override a creature_template.unit_flags record.
  
 
==== dynamicflags ====
 
==== dynamicflags ====
Same as [[Creature_template_tc2#dynamicflags|creature_template.dynamicflags]]
+
Same as [[Creature_template_SF#dynamicflags|creature_template.dynamicflags]]
  
 
NOTE: A creature.dynamicflags record will override a creature_template.dynamicflags record.
 
NOTE: A creature.dynamicflags record will override a creature_template.dynamicflags record.
 +
 +
[[DB:World|Return to world database structure]]

Latest revision as of 06:17, 9 January 2013

Back to world database list of tables.


The `creature` table

Contains individual creature spawn data. Spawn of a creature is an instance of the creature object in the world.


Structure

Field Type Attributes Key Null Default Extra Comment
guid int(10) unsigned PRI NO NULL Auto Increment Global Unique Identifier
id mediumint(8) unsigned NO 0 Creature Identifier
map smallint(5) unsigned NO 0 Map Identifier
spawnMask tinyint(3) unsigned NO 1
phaseMask smallint(5) unsigned NO 1
modelid mediumint(8) unsigned NO 0
equipment_id mediumint(9) signed NO 0
position_x float signed NO 0
position_y float signed NO 0
position_z float signed NO 0
orientation float signed NO 0
spawntimesecs int(10) unsigned NO 120
spawndist float signed NO 5
currentwaypoint mediumint(8) unsigned NO 0
curhealth int(10) unsigned NO 1
curmana int(10) unsigned NO 0
DeathState tinyint(3) unsigned NO 0
MovementType tinyint(3) unsigned NO 0
npcflag int(10) unsigned NO 0
unit_flags int(10) unsigned NO 0
dynamicflags int(10) unsigned NO 0


Description of the fields

guid[edit]

A unique identifier given to each creature to distinguish one creature from another. Two creatures can NOT have same GUID.

id[edit]

The id of the template that is used when instantiating this creature. See creature_template.entry

map[edit]

The Map ID of the position of the creature. See Map.dbc

spawnMask[edit]

Controls under which difficulties the creature is spawned.

Just like flags you can add them as you wish so 3 would be: Spawned in 10/25 man normal versions of maps (pre 3.2 all maps)
Value Comment
0 Not spawned
1 Spawned only in 10-man-normal versions of maps (includes maps without a heroic mode)
2 Spawned only in 25-man-normal versions of maps (or heroics pre 3.2)
4 Spawned only in 10-man heroic versions of maps
8 Spawned only in 25-man-heroic versions of maps
15 Spawned in all versions of maps

phaseMask[edit]

This is a bitmask field that describes all the phases that a creature will appear in. Aura 261 determines the phase you can see. For example, if you had this aura http://www.wowhead.com/?spell=55782, you would be able to see creatures in phase 2. If you wanted the creature to be visible in both phase 1 and phase 2, you would set the phaseMask to 3.

modelid[edit]

The model ID associated with this creature. Note that two creatures that use the same template can have different models. See creature_model_info for more information on model-specific characteristics. NOTE: This can be left at 0 and a random model from its assigned models in creature_template will be assigned by the core.

equipment_id[edit]

The ID of the equipment that the creature is using. See creature_equip_template.entry

NOTE: equipment should be assigned in creature_template. Only use this if a guid has different equipment than others of the same entry.

position_x[edit]

The X position of the creature.

position_y[edit]

The Y position of the creature.

position_z[edit]

The Z position of the creature.

orientation[edit]

The orientation of the creature. (North = 0.0; South = pi (3.14159))

spawntimesecs[edit]

The respawn time of the creature in seconds.

spawndist[edit]

The maximum distance that the creature should spawn from its spawn point. Also controls how far away the creature can walk from its spawn point if its MovementType = 1.

currentwaypoint[edit]

The current waypoint number that the creature is on, if any. See waypoint_data.point

curhealth[edit]

The current health that the creature has.

curmana[edit]

The current mana that the creature has.

DeathState[edit]

The creature's death state. -- Should not be used; correct aura and correct creature flags is a better way to do it.

MovementType[edit]

The movement type associated with this creature. Usually the same as creature_template.MovementType but can be different.

npcflag[edit]

Same as creature_template.npcflag

NOTE: A creature.npcflag record will override a creature_template.npcflag record.

unit_flags[edit]

Same as creature_template.unit_flags

NOTE: A creature.unit_flags record will override a creature_template.unit_flags record.

dynamicflags[edit]

Same as creature_template.dynamicflags

NOTE: A creature.dynamicflags record will override a creature_template.dynamicflags record.

Return to world database structure