-
Notifications
You must be signed in to change notification settings - Fork 47
string_id
killerwife edited this page May 14, 2023
·
21 revisions
Back to world database list of tables.
This table contains id and string connection between string_id variables. StringId is assigned to a world object, and then enables querying. Effectively supercedes guid, entry, or other kind of targeting, and enables custom targeting from spells or even per dbscript.
Field | Type | NULL | Key | Default | Comments |
---|---|---|---|---|---|
Id | int(11) unsigned | NO | PRIMARY | 0 | Primary Key |
Name | varchar(255) | YES |
Numeric identifier of string_id variable
Found in:
creature_template
creature_template
creature_spawn_data_template
gameobject_template
gameobject_addon
spawn_group
dbscripts - SCRIPT_COMMAND_SET_STRING_ID
String identifier of string_id variable - should be descriptive on where it is used, without spaces and limited to 255 characters.
Targeting for dbscripts
Targeting for spells - spell_script_target
Targeting for C++ scripts:
Spells:
auto creaturesWithStringId = spell->GetCaster()->GetMap()->GetCreatures("STRING_ID");
AI:
auto creaturesWithStringId = m_creature->GetMap()->GetCreatures("STRING_ID");