conditions

Back-to:World

The `conditions` table

This table allows you to define conditions for various systems - Gossip, loot etc.

Structure

Field

Type

Attributes

Key

Null

Default

Extra

Comment

SourceTypeOrReferenceId

mediumint(8)

signed

PRI

NO

0



SourceGroup

mediumint(8)

unsigned

PRI

NO

0



SourceEntry

mediumint(8)

signed

PRI

NO

0



SourceId

int(11)

signed

PRI

NO

0


smart_scripts.source_type || 0 for everything else

ElseGroup

mediumint(8)

unsigned

PRI

NO

0



ConditionTypeOrReference

mediumint(8)

signed

PRI

NO

0



ConditionTarget

tinyint(3)

unsigned

PRI

NO

0



ConditionValue1

int(10)

unsigned

PRI

NO

0



ConditionValue2

int(10)

unsigned

PRI

NO

0



ConditionValue3

int(10)

unsigned

PRI

NO

0



NegativeCondition

tinyint(3)

unsigned


NO

0


Boolean 0 or 1 (if NegativeCondition

ErrorType

mediumint(8)

unsigned


NO

0



ErrorTextId

mediumint(8)

unsigned


NO

0



ScriptName

char(64)

signed


NO

' '



Comment

varchar(255)



YES

NULL



Description of the fields

SourceTypeOrReferenceId

if negative, then it is a reference template.

SourceTypeOrReferenceId

IDSourceGroupSourceEntrySourceIdConditionTargetNotes
CONDITION_SOURCE_TYPE_NONE0See REFERENCE TEMPLATES(conditions#REFERENCE TEMPLATES)Always 0(See below)
Only used in Reference Templates! See below.
CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE1creature_loot_template.Entry or reference_loot_template.Entryitem id (_loot_template.Item or reference_loot_template.Item)Always 0Always 0
CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE2disenchant_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE3fishing_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE4gameobject_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE5item_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE6mail_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE7milling_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE8pickpocketing_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE9prospecting_loot_template.Entry or reference_loot_template.Entry