“conditions” table¶
The conditions
table holds restrictions which can be applied to game
data. This e.g. includes quests, loot, dialogues, or even scripts.
Table structure¶
Field | Type | Null | Key | Default | Extra |
---|---|---|---|---|---|
condition_entry | mediumint(8) unsigned | NO | PRI | NULL | auto_increment |
type | tinyint(3) | NO | MUL | 0 | |
value1 | mediumint(8) unsigned | NO | 0 | ||
value2 | mediumint(8) unsigned | NO | 0 |
Fields¶
Descriptions for each field with their meaning, usage and relations are available below.
condition_entry¶
The unique identifier for a condition.
type¶
The type
of condition. The table below lists all types.
ID | Type | Description |
---|---|---|
-3 | CONDITION_NOT | Used to evaluate if another condition is NOT true. |
-2 | CONDITION_OR | Used to evaluate if condition OR condition is true. |
-1 | CONDITION_AND | Used to evaluate if condition AND condition is true. |
0 | CONDITION_NONE | This condition is not used at all. |
1 | CONDITION_AURA | Checks target currently has the specified aura on him/her. |
2 | CONDITION_ITEM | Checks if the player has the required amount (value2 ) of items in his/hers inventory. |
3 | CONDITION_ITEM_EQUIPPED | Checks if the player has the specified item equipped. |
4 | CONDITION_AREAID | Checks if the player is within the specified area. |
5 | CONDITION_REPUTATION_RANK_MIN | Checks if the player has the minimum required reputation rank with a specific faction. |
6 | CONDITION_TEAM | Checks what team the target is a member of. |
7 | CONDITION_SKILL | Checks if the player has the required minimum skill value of the specified skill. |
8 | CONDITION_QUESTREWARDED | Checks if the player has been rewarded for the specified quest. |
9 | CONDITION_QUESTTAKEN | Checks if the player has taken the quest (as in has it in his/hers quest log.) |
10 | CONDITION_AD_COMMISSION_AURA | TODO |
11 | CONDITION_NO_AURA | Checks if the target DOES NOT currently have the specified aura on him/her. |
12 | CONDITION_ACTIVE_GAME_EVENT | Checks if a game event is currently active. |
13 | CONDITION_AREA_FLAG | Checks if area_flag is present in current area (if area_flag set != 0) AND if not_have_flag is not present in current area (if not_have_flag != 0) |
14 | CONDITION_RACE_CLASS | Checks if the target is a certain race AND/OR class. |
15 | CONDITION_LEVEL | Checks the targets level. |
16 | CONDITION_NOITEM | Checks if the player DOES NOT have the required amount (value2 ) of items in his/hers inventory. |
17 | CONDITION_SPELL | Checks if the target has or hasn’t (value2 ) the specified spell. |
18 | CONDITION_INSTANCE_SCRIPT | TODO |
19 | CONDITION_QUESTAVAILABLE | Checks if the specified quest is available (can start it) for the player. |
20 | CONDITION_RESERVED_1 | Reserved for later usage |
21 | CONDITION_RESERVED_2 | Reserved for later usage |
22 | CONDITION_QUEST_NONE | Checks if the player has NOT taken the quest AND has NOT been rewarded for the quest. |
23 | CONDITION_ITEM_WITH_BANK | Checks if the player has the required amount (value2 ) of items in his/hers inventory OR bank. |
24 | CONDITION_NOITEM_WITH_BANK | Checks if the player DOES NOT have count (value2 ) of items in his/hers inventory OR bank. |
25 | CONDITION_NOT_ACTIVE_GAME_EVENT | Checks if a game event is currently NOT active. |
26 | CONDITION_ACTIVE_HOLIDAY | Checks if a holiday is active |
27 | CONDITION_NOT_ACTIVE_HOLIDAY | Checks if a holiday is not active |
28 | CONDITION_LEARNABLE_ABILITY | Checks if the player can learn ability (using minimum skill value from SkillLineAbility.dbc.) If the player has spell or has item (when defined) the condition will evaluate to false. |
29 | CONDITION_SKILL_BELOW | TODO |
30 | CONDITION_REPUTATION_RANK_MAX | Checks if the player has a higher reputation rank than specified a faction. |
31 | CONDITION_RESERVED_3 | Reserved for later usage |
32 | CONDITION_SOURCE_AURA | Checks if the source of the condition (like looted npc) has an aura. |
33 | CONDITION_LAST_WAYPOINT | Checks the waypoint-state of the source of the condition. |
34 | CONDITION_RESERVED_4 | Reserved for later usage |
35 | CONDITION_GENDER | Checks the gender of a player. |
36 | CONDITION_DEAD_OR_AWAY | Checks if a player, a player’s group, all players in an instance, or a creature is dead or left the map. |
value1¶
The value of this field depends on what type
of condition is used.
value2¶
The value of this field depends on what type
of condition is used.
Condition type | value1 | value2 |
---|---|---|
CONDITION_NOT | Reference to another condition_entry | 0 |
CONDITION_OR | Reference to another condition_entry | Reference to another condition_entry |
CONDITION_AND | Reference to another condition_entry | Reference to another condition_entry |
CONDITION_NONE | 0 | 0 |
CONDITION_AURA | Spell.dbc ID | Spell effect index to aura effect. |
CONDITION_ITEM | :doc`item-template` ID | count (number of items required) |
CONDITION_ITEM_EQUIPPED | :doc`item-template` ID | 0 |
CONDITION_AREAID | AreaTable.dbc ID | 0 |
CONDITION_REPUTATION_RANK_MIN | Faction.dbc ID | Reputation rank (defined in SharedDefines.h, enum ReputationRank) |
CONDITION_TEAM | Team ID: 469 for Alliance, 67 for Horde | 0 |
CONDITION_SKILL | SkillLine.dbc ID | Skill value |
CONDITION_QUESTREWARDED | “quest_template” table ID | 0 |
CONDITION_QUESTTAKEN | “quest_template” table ID | 0, 1 or 2 (0 any state, 1 if quest incomplete, 2 if quest completed). |
CONDITION_AD_COMMISSION_AURA | 0 | 0 |
CONDITION_NO_AURA | Spell.dbc ID | Spell effect index to aura effect. |
CONDITION_ACTIVE_GAME_EVENT | “game_event” table ID | 0 |
CONDITION_AREA_FLAG | Area flag | Unwanted area flag |
CONDITION_RACE_CLASS | ChrRaces.dbc mask | ChrClasses.dbc mask |
CONDITION_LEVEL | Character level | 0, 1 or 2 (0: equal to, 1: equal or higher than, 2: equal or less than) |
CONDITION_NOITEM | :doc`item-template` ID | Count (number of items) |
CONDITION_SPELL | Spell.dbc ID | 0 or 1 (0: has spell, 1: hasn’t spell) |
CONDITION_INSTANCE_SCRIPT | TODO | TODO |
CONDITION_QUESTAVAILABLE | “quest_template” table ID | 0 |
CONDITION_RESERVED_1 | Reserved for later usage | 0 |
CONDITION_RESERVED_2 | Reserved for later usage | 0 |
CONDITION_QUEST_NONE | “quest_template” table ID | 0 |
CONDITION_ITEM_WITH_BANK | :doc`item-template` ID | Count (number of items required) |
CONDITION_NOITEM_WITH_BANK | :doc`item-template` ID | Count (number of items required) |
CONDITION_NOT_ACTIVE_GAME_EVENT | “game_event” table ID | 0 |
CONDITION_ACTIVE_HOLIDAY | Holiday ID | 0 |
CONDITION_NOT_ACTIVE_HOLIDAY | Holiday ID | 0 |
CONDITION_LEARNABLE_ABILITY | Spell.dbc ID | 0 or :doc`item-template` ID (item entry can be used if you want to check if the player has one (1) item in his/hers inventory or bank) |
CONDITION_SKILL_BELOW | SkillLine.dbc ID | Skill value |
CONDITION_REPUTATION_RANK_MAX | Faction.dbc ID | Reputation rank (defined in SharedDefines.h, enum ReputationRank) |
CONDITION_RESERVED_3 | Reserved for later usage | 0 |
CONDITION_SOURCE_AURA | Spell.dbc ID | Spell effect index to aura effect |
CONDITION_LAST_WAYPOINT | Waypoint ID | 0: exact, 1: wp <= waypointId, 2: wp > waypointId |
CONDITION_RESERVED_4 | Reserved for later usage | 0 |
CONDITION_GENDER | 0: male, 1: female, 2: none | 0 |
CONDITION_DEAD_OR_AWAY | 0: player, 1: group, 2: instance, 3: creature | 0 or range |