Conditions

From OregonCore Wiki
Jump to: navigation, search

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(10) unsigned PRI NO 0
ElseGroup mediumint(8) unsigned PRI NO 0
ConditionTypeOrReference mediumint(8) signed PRI NO 0
ConditionTarget tinyint(3) unsigned NO 0
ConditionValue1 mediumint(8) unsigned PRI NO 0
ConditionValue2 mediumint(8) unsigned PRI NO 0
ConditionValue3 mediumint(8) unsigned PRI NO 0
NegativeCondition tinyint(3) unsigned NO 0
ErrorType mediumint(8) unsigned NO 0
ErrorTextId mediumint(8) unsigned NO 0
ScriptName char(64) signed NO "
Comment varchar(255) NULL

Description of the fields

SourceTypeOrReferenceId

if negative, then it is a reference template

CONDITION_SOURCE_TYPE_NONE = 0
CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE = 1
CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE = 2
CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE = 3
CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE = 4
CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE = 5
CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE = 6
CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE = 7
CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE = 8
CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE = 9
CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE = 10
CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE = 11
CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE = 12
CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET = 13
CONDITION_SOURCE_TYPE_GOSSIP_MENU = 14
CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION = 15
CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE = 16
CONDITION_SOURCE_TYPE_SPELL = 17
CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT = 18
CONDITION_SOURCE_TYPE_QUEST_ACCEPT = 19
CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK = 20
CONDITION_SOURCE_TYPE_VEHICLE_SPELL = 21
CONDITION_SOURCE_TYPE_SMART_EVENT = 22
CONDITION_SOURCE_TYPE_NPC_VENDOR = 23
CONDITION_SOURCE_TYPE_SPELL_PROC = 24
CONDITION_SOURCE_TYPE_MAX = 25

SourceGroup

See below

SourceEntry

See below

ElseGroup

Allows building grouped conditions - all entries belonging to the same condition (same SourceType, SourceGroup and SourceEntry) that share the same number in ElseGroup, define one group. The entire condition is met when any of its groups is met (logical OR). The group is met when all of its entries are met (logical AND).

ConditionTypeOrReference

CONDITION_NONE = 0
CONDITION_AURA = 1
CONDITION_ITEM = 2
CONDITION_ITEM_EQUIPPED = 3
CONDITION_ZONEID = 4
CONDITION_REPUTATION_RANK = 5
CONDITION_TEAM = 6
CONDITION_CLASS = 7
CONDITION_RACE = 8
CONDITION_GENDER = 9
CONDITION_SKILL = 10
CONDITION_QUESTREWARDED = 11
CONDITION_QUESTTAKEN = 12
CONDITION_QUEST_COMPLETE = 13
CONDITION_QUEST_NONE = 14
CONDITION_ACTIVE_EVENT = 15
CONDITION_INSTANCE_INFO = 16
CONDITION_SPELL_SCRIPT_TARGET = 17
CONDITION_MAPID = 18
CONDITION_AREAID = 19
CONDITION_SPELL = 20
CONDITION_LEVEL = 21
CONDITION_DRUNKENSTATE = 22
CONDITION_NEAR_CREATURE = 23
CONDITION_NEAR_GAMEOBJECT = 24
CONDITION_OBJECT_ENTRY_GUID = 25
CONDITION_TYPE_MASK = 26
CONDITION_RELATION_TO = 27
CONDITION_REACTION_TO = 28
CONDITION_DISTANCE_TO = 29
CONDITION_ALIVE= 30
CONDITION_HP_VAL = 31
CONDITION_HP_PCT = 32
CONDITION_WORLD_STATE = 33
CONDITION_TITLE = 34
CONDITION_SPAWNMASK = 35
CONDITION_UNIT_STATE = 36
CONDITION_CREATURE_TYPE = 37

ConditionTarget

Allows selecting an object for which conditions will be checked. Available objects are dependant on SourceTypeOrReferenceId, for details see respective source type reference.

ConditionValue1

See below

ConditionValue2

See below

ConditionValue3

See below

NegativeCondition

If set to 1, the condition will be "inverted" Example: CONDITION_AURA with NegativeCondition will be true when the player does NOT have the aura.

ErrorType

Will be displayed only for the below condition source type:

CONDITION_SOURCE_TYPE_SPELL = 17

ErrorTextId

Will be displayed only for the below condition source type:

CONDITION_SOURCE_TYPE_SPELL = 17

ScriptName

The ScriptName the condition uses, if any. Default is NULL

Comment

Explanation of this condition or reference