Conditions SF: Difference between revisions
(Created page with "{| align="right" | __TOC__ |} {{Back-to:World}} <br><big>'''Conditions_SF'''</big> This table allows you to define conditions for various systems - Gossip, loot etc. <...") |
Cheapgamer (talk | contribs) No edit summary |
||
Line 261: | Line 261: | ||
==== ErrorTextId ==== | ==== ErrorTextId ==== | ||
Entry from [[Skyfire string | Entry from [[Skyfire string SF#entry|skyfire_string]] table. Will be displayed only for the below condition [[#SourceTypeOrReferenceId|source type]]: | ||
CONDITION_SOURCE_TYPE_SPELL = 17 | CONDITION_SOURCE_TYPE_SPELL = 17 | ||
Line 294: | Line 294: | ||
*'''CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET = 13''' | *'''CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET = 13''' | ||
**SourceGroup: mask of effects to be affected by condition (1 - EFFECT_0, 2 - EFFECT_1, 4 - EFFECT_2 - don't use wowhead to get number of effects, data from wowhead sometimes doesn't match real effect number) | **SourceGroup: mask of effects to be affected by condition (1 - EFFECT_0, 2 - EFFECT_1, 4 - EFFECT_2 - don't use wowhead to get number of effects, data from wowhead sometimes doesn't match real effect number) | ||
**SourceEntry: spell (Spell Id from [[Spell.dbc | **SourceEntry: spell (Spell Id from [[Spell.dbc SF|Spell.dbc]]) | ||
**ConditionTarget: | **ConditionTarget: | ||
*** 0 - Potential target of the spell | *** 0 - Potential target of the spell | ||
Line 308: | Line 308: | ||
*'''CONDITION_SOURCE_TYPE_GOSSIP_MENU = 14''' | *'''CONDITION_SOURCE_TYPE_GOSSIP_MENU = 14''' | ||
**SourceGroup: gossip menu entry ([[Gossip menu | **SourceGroup: gossip menu entry ([[Gossip menu SF#entry|gossip_menu.entry]]) | ||
**SourceEntry: gossip menu text id ([[Gossip menu | **SourceEntry: gossip menu text id ([[Gossip menu SF#text_id|gossip_menu.text_id]]) | ||
**ConditionTarget: | **ConditionTarget: | ||
*** 0 - Player for which gossip text is shown | *** 0 - Player for which gossip text is shown | ||
Line 317: | Line 317: | ||
*'''CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION = 15''' | *'''CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION = 15''' | ||
**SourceGroup: gossip menu entry ([[Gossip menu option | **SourceGroup: gossip menu entry ([[Gossip menu option SF#menu_id|gossip_menu_option.menu_id]]) | ||
**SourceEntry: gossip menu option id ([[Gossip menu option | **SourceEntry: gossip menu option id ([[Gossip menu option SF#id|gossip_menu_option.id]]) | ||
**ConditionTarget: | **ConditionTarget: | ||
*** 0 - Player for which gossip text is shown | *** 0 - Player for which gossip text is shown | ||
Line 327: | Line 327: | ||
*'''CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE = 16''' | *'''CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE = 16''' | ||
**SourceGroup: always 0 | **SourceGroup: always 0 | ||
**SourceEntry: creature entry ([[Creature template | **SourceEntry: creature entry ([[Creature template SF#entry|creature_template.entry]]) | ||
**ConditionTarget: | **ConditionTarget: | ||
*** 0 - Player riding a vehicle | *** 0 - Player riding a vehicle | ||
Line 338: | Line 338: | ||
*'''CONDITION_SOURCE_TYPE_SPELL = 17''' | *'''CONDITION_SOURCE_TYPE_SPELL = 17''' | ||
**SourceGroup: always 0 | **SourceGroup: always 0 | ||
**SourceEntry: spell (Spell Id from [[Spell.dbc | **SourceEntry: spell (Spell Id from [[Spell.dbc SF|Spell.dbc]]) | ||
**ConditionTarget: | **ConditionTarget: | ||
*** 0 - Caster of the spell | *** 0 - Caster of the spell | ||
Line 352: | Line 352: | ||
*'''CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT = 18''' | *'''CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT = 18''' | ||
**SourceGroup: creature entry ([[Npc spellclick spells | **SourceGroup: creature entry ([[Npc spellclick spells SF#npc_entry|npc_spellclick_spells.npc_entry]]) | ||
**SourceEntry: spell ([[Npc spellclick spells | **SourceEntry: spell ([[Npc spellclick spells SF#spell_id|npc_spellclick_spells.spell_id]]) | ||
**ConditionTarget: | **ConditionTarget: | ||
*** 0 - Clicker | *** 0 - Clicker | ||
Line 362: | Line 362: | ||
*'''CONDITION_SOURCE_TYPE_QUEST_ACCEPT = 19''' | *'''CONDITION_SOURCE_TYPE_QUEST_ACCEPT = 19''' | ||
**SourceGroup: ? | **SourceGroup: ? | ||
**SourceEntry: Quest [[Quest template | **SourceEntry: Quest [[Quest template SF#id|id]]) | ||
**ConditionTarget: always 0 | **ConditionTarget: always 0 | ||
Line 369: | Line 369: | ||
*'''CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK = 20''' | *'''CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK = 20''' | ||
**SourceGroup: ? | **SourceGroup: ? | ||
**SourceEntry: Quest [[Quest template | **SourceEntry: Quest [[Quest template SF#id|id]]) | ||
**ConditionTarget: always 0 | **ConditionTarget: always 0 | ||
Line 375: | Line 375: | ||
*'''CONDITION_SOURCE_TYPE_VEHICLE_SPELL = 21''' | *'''CONDITION_SOURCE_TYPE_VEHICLE_SPELL = 21''' | ||
**SourceGroup: creature entry ([[Creature template | **SourceGroup: creature entry ([[Creature template SF#entry|creature_template.entry]]) | ||
**SourceEntry: spell (Spell Id from [[Spell.dbc | **SourceEntry: spell (Spell Id from [[Spell.dbc SF|Spell.dbc]]) | ||
**ConditionTarget: | **ConditionTarget: | ||
*** 0 - Player for which spell bar is shown | *** 0 - Player for which spell bar is shown | ||
Line 386: | Line 386: | ||
*'''CONDITION_SOURCE_TYPE_SMART_EVENT = 22''' | *'''CONDITION_SOURCE_TYPE_SMART_EVENT = 22''' | ||
**SourceGroup: Id ([[Smart scripts | **SourceGroup: Id ([[Smart scripts SF#id|smart_scripts.id]]) + 1 | ||
**SourceEntry: EntryOrGuid ([[Smart scripts | **SourceEntry: EntryOrGuid ([[Smart scripts SF#entryorguid|smart_scripts.entryorguid]]) | ||
**SourceId: SourceType ([[Smart scripts | **SourceId: SourceType ([[Smart scripts SF#source_type|smart_scripts.source_type]]) | ||
**ConditionTarget: | **ConditionTarget: | ||
*** 0 - Invoker | *** 0 - Invoker | ||
Line 404: | Line 404: | ||
*'''CONDITION_AURA = 1''' | *'''CONDITION_AURA = 1''' | ||
**ConditionValue1: spell (Spell Id from [[Spell.dbc | **ConditionValue1: spell (Spell Id from [[Spell.dbc SF|Spell.dbc]]) | ||
**ConditionValue2: effect index (0-2) | **ConditionValue2: effect index (0-2) | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 411: | Line 411: | ||
*'''CONDITION_ITEM = 2''' | *'''CONDITION_ITEM = 2''' | ||
**ConditionValue1: item entry ([[Item template | **ConditionValue1: item entry ([[Item template SF#entry|item_template.entry]]) | ||
**ConditionValue2: item count | **ConditionValue2: item count | ||
**ConditionValue3: in bank? (true=1) | **ConditionValue3: in bank? (true=1) | ||
Line 418: | Line 418: | ||
*'''CONDITION_ITEM_EQUIPPED = 3''' | *'''CONDITION_ITEM_EQUIPPED = 3''' | ||
**ConditionValue1: item entry ([[Item template | **ConditionValue1: item entry ([[Item template SF#entry|item_template.entry]]) | ||
**ConditionValue2: always 0 | **ConditionValue2: always 0 | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 432: | Line 432: | ||
*'''CONDITION_REPUTATION_RANK = 5''' | *'''CONDITION_REPUTATION_RANK = 5''' | ||
**ConditionValue1: faction template ID (from [[Faction.dbc | **ConditionValue1: faction template ID (from [[Faction.dbc SF|Faction.dbc]]) | ||
**ConditionValue2: rank (Hated - 1, Hostile - 2, Unfriendly - 4, Neutral - 8, Friendly - 16, Honored - 32, Revered - 64, Exalted - 128) Flags can be added together for all ranks the condition should be true in. | **ConditionValue2: rank (Hated - 1, Hostile - 2, Unfriendly - 4, Neutral - 8, Friendly - 16, Honored - 32, Revered - 64, Exalted - 128) Flags can be added together for all ranks the condition should be true in. | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 446: | Line 446: | ||
*'''CONDITION_SKILL = 7''' | *'''CONDITION_SKILL = 7''' | ||
**ConditionValue1: skill required, see [[SkillLine.dbc | **ConditionValue1: skill required, see [[SkillLine.dbc SF|SkillLine.dbc]] | ||
**ConditionValue2: skill value | **ConditionValue2: skill value | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 453: | Line 453: | ||
*'''CONDITION_QUESTREWARDED = 8''' | *'''CONDITION_QUESTREWARDED = 8''' | ||
**ConditionValue1: ([[Quest template | **ConditionValue1: ([[Quest template SF#id|quest_template.id]]) | ||
**ConditionValue2: always 0 | **ConditionValue2: always 0 | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 460: | Line 460: | ||
*'''CONDITION_QUESTTAKEN = 9''' | *'''CONDITION_QUESTTAKEN = 9''' | ||
**ConditionValue1: ([[Quest template | **ConditionValue1: ([[Quest template SF#id|quest_template.id]]) | ||
**ConditionValue2: always 0 | **ConditionValue2: always 0 | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 483: | Line 483: | ||
*'''CONDITION_ACTIVE_EVENT= 12''' | *'''CONDITION_ACTIVE_EVENT= 12''' | ||
**ConditionValue1: event entry ([[Game event | **ConditionValue1: event entry ([[Game event SF#eventEntry|game_event.eventEntry]]) | ||
**ConditionValue2: always 0 | **ConditionValue2: always 0 | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 497: | Line 497: | ||
*'''CONDITION_QUEST_NONE = 14''' | *'''CONDITION_QUEST_NONE = 14''' | ||
**ConditionValue1: ([[Quest template | **ConditionValue1: ([[Quest template SF#id|quest_template.id]]) | ||
**ConditionValue2: always 0 | **ConditionValue2: always 0 | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 504: | Line 504: | ||
*'''CONDITION_CLASS = 15''' | *'''CONDITION_CLASS = 15''' | ||
**ConditionValue1: class ID. Add flags together for all classes condition should be true for. See [[ChrClasses.dbc | **ConditionValue1: class ID. Add flags together for all classes condition should be true for. See [[ChrClasses.dbc SF|ChrClasses.dbc]] | ||
**ConditionValue2: always 0 | **ConditionValue2: always 0 | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 511: | Line 511: | ||
*'''CONDITION_RACE = 16''' | *'''CONDITION_RACE = 16''' | ||
**ConditionValue1: race the player must be. Add flags together for all races condition should be true for. See [[ChrRaces. | **ConditionValue1: race the player must be. Add flags together for all races condition should be true for. See [[ChrRaces.dbc_SF|ChrRaces.dbc]] | ||
**ConditionValue2: always 0 | **ConditionValue2: always 0 | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 518: | Line 518: | ||
*'''CONDITION_ACHIEVEMENT = 17''' | *'''CONDITION_ACHIEVEMENT = 17''' | ||
**ConditionValue1: achievement ID from [[Achievement.dbc | **ConditionValue1: achievement ID from [[Achievement.dbc SF|Achievement.dbc]] | ||
**ConditionValue2: always 0 | **ConditionValue2: always 0 | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 539: | Line 539: | ||
*'''CONDITION_SPELL = 25''' | *'''CONDITION_SPELL = 25''' | ||
**ConditionValue1: spell (Spell Id from [[Spell.dbc | **ConditionValue1: spell (Spell Id from [[Spell.dbc SF|Spell.dbc]]) | ||
**ConditionValue2: always 0 | **ConditionValue2: always 0 | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 566: | Line 566: | ||
*'''CONDITION_QUEST_COMPLETE = 28''' | *'''CONDITION_QUEST_COMPLETE = 28''' | ||
**ConditionValue1: Quest [[Quest template | **ConditionValue1: Quest [[Quest template SF#id|id]] | ||
**ConditionValue2: Always 0 | **ConditionValue2: Always 0 | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 575: | Line 575: | ||
*'''CONDITION_NEAR_CREATURE = 29''' | *'''CONDITION_NEAR_CREATURE = 29''' | ||
**ConditionValue1: Creature [[Creature template | **ConditionValue1: Creature [[Creature template SF#entry|entry]] | ||
**ConditionValue2: Distance (yd) | **ConditionValue2: Distance (yd) | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 582: | Line 582: | ||
*'''CONDITION_NEAR_GAMEOBJECT = 30''' | *'''CONDITION_NEAR_GAMEOBJECT = 30''' | ||
**ConditionValue1: Gameobject [[Gameobject template | **ConditionValue1: Gameobject [[Gameobject template SF#entry|entry]] | ||
**ConditionValue2: Distance (yd) | **ConditionValue2: Distance (yd) | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Line 596: | Line 596: | ||
**ConditionValue2: Entry | **ConditionValue2: Entry | ||
***0 for any object of given type | ***0 for any object of given type | ||
***[[Gameobject template | ***[[Gameobject template SF#entry| | ||
Gameobject entry]] for TypeID = TYPEID_GAMEOBJECT | Gameobject entry]] for TypeID = TYPEID_GAMEOBJECT | ||
***[[Creature template | ***[[Creature template SF#entry|Creature entry]] for TypeID = TYPEID_UNIT | ||
**ConditionValue3: always 0 | **ConditionValue3: always 0 | ||
Revision as of 00:50, 6 July 2012
Back to world database list of tables.
Conditions_SF
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) | unsigned | PRI | NO | 0 | ||
SourceId | mediumint(8) | 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 | |||
ErrorTextId | mediumint(8) | unsigned | NO | 0 | |||
ScriptName | char(64) | signed | NO | " | |||
Comment | varchar(255) | NO |
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_MAX = 23
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
See below
CONDITION_NONE = 0, CONDITION_AURA = 1, CONDITION_ITEM = 2, CONDITION_ITEM_EQUIPPED = 3, CONDITION_ZONEID = 4, CONDITION_REPUTATION_RANK = 5, CONDITION_TEAM = 6, CONDITION_SKILL = 7, CONDITION_QUESTREWARDED = 8, CONDITION_QUESTTAKEN = 9, CONDITION_DRUNKENSTATE = 10, CONDITION_WORLD_STATE = 11, CONDITION_ACTIVE_EVENT = 12, CONDITION_INSTANCE_DATA = 13, CONDITION_QUEST_NONE = 14, CONDITION_CLASS = 15, CONDITION_RACE = 16, CONDITION_ACHIEVEMENT = 17, CONDITION_UNUSED_18 = 18, CONDITION_UNUSED_19 = 19, CONDITION_UNUSED_20 = 20, CONDITION_UNUSED_21 = 21, CONDITION_MAPID = 22, CONDITION_AREAID = 23, CONDITION_UNUSED_24 = 24, CONDITION_SPELL = 25, CONDITION_PHASEMASK = 26, CONDITION_LEVEL = 27, CONDITION_QUEST_COMPLETE = 28, CONDITION_NEAR_CREATURE = 29, CONDITION_NEAR_GAMEOBJECT = 30, CONDITION_OBJECT_ENTRY = 31, CONDITION_TYPE_MASK = 32, CONDITION_RELATION_TO = 33, CONDITION_REACTION_TO = 34, CONDITION_DISTANCE_TO = 35, CONDITION_ALIVE = 36, CONDITION_HP_VAL = 37, CONDITION_HP_PCT = 38, CONDITION_MAX = 39
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.
ErrorTextId
Entry from skyfire_string table. 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
The content of the SourceGroup and SourceEntry fields depends on the SourceTypeOrReferenceId
- CONDITION_SOURCE_TYPE_NONE = 0
Only used in Reference Templates! See below.
- CONDITION_SOURCE_TYPE_ * _LOOT_TEMPLATE = 1 - 12
- SourceGroup: loot entry (*_loot_template.Entry or Reference_loot_template.Entry)
- SourceEntry: item id (*_loot_template.Item or Reference_loot_template.Item)
- ConditionTarget: always 0
example: if you use type 1 (creature_loot_template) then use the entry and item fields from that table
- CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET = 13
- SourceGroup: mask of effects to be affected by condition (1 - EFFECT_0, 2 - EFFECT_1, 4 - EFFECT_2 - don't use wowhead to get number of effects, data from wowhead sometimes doesn't match real effect number)
- SourceEntry: spell (Spell Id from Spell.dbc)
- ConditionTarget:
- 0 - Potential target of the spell
- 1 - Caster of the spell
- Notes:
- This condition source type allows to define a filter for possible spell effect targets, so only targets matching condition will be selected as implicit targets of the spell. Only target types: _AREA_, _NEARBY_ and _CONE_ are allowed to be filtered. This source type affects only targets selected by spell, it doesn't affect spell target selected by player on cast, to affect that target use CONDITION_SOURCE_TYPE_SPELL.
- To restrict targets to player's only use CONDITION_TYPEMASK with TYPEMASK_PLAYER + TYPEMASK_CORPSE to allow targeting dead players.
- Remember that conditions with the same value ElseGroup will be used to make logical AND check, so to allow different targets for the same spell effect you have to set ElseGroup respectively.
- If you're looking for old CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET - use this condition source type instead.
- CONDITION_SOURCE_TYPE_GOSSIP_MENU = 14
- SourceGroup: gossip menu entry (gossip_menu.entry)
- SourceEntry: gossip menu text id (gossip_menu.text_id)
- ConditionTarget:
- 0 - Player for which gossip text is shown
- 1 - WorldObject providing gossip
- CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION = 15
- SourceGroup: gossip menu entry (gossip_menu_option.menu_id)
- SourceEntry: gossip menu option id (gossip_menu_option.id)
- ConditionTarget:
- 0 - Player for which gossip text is shown
- 1 - WorldObject providing gossip
- CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE = 16
- SourceGroup: always 0
- SourceEntry: creature entry (creature_template.entry)
- ConditionTarget:
- 0 - Player riding a vehicle
- 1 - Vehicle creature
Note: creature entry must be a vehicle. Example: If this is used with CONDITION_AREA, the player will be dismounted of the vehicle if the player leaves that area.
- CONDITION_SOURCE_TYPE_SPELL = 17
- SourceGroup: always 0
- SourceEntry: spell (Spell Id from Spell.dbc)
- ConditionTarget:
- 0 - Caster of the spell
- 1 - Explicit target of the spell (only for spells which take object selected by caster into account)
- Notes:
- This source type allows you to define caster/explicit target requirements for spell to be cast.
- Explicit target of the spell is the target which is selected by player during cast, not all spells take that target into account. non-explicit targets of the spell (the ones which are selected by spell like area or nearby targets for example) are not affected by this condition source type, if you want to affect those use CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET instead.
- If you're looking for old CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET - use this condition source type instead (ConditionTarget = 1 allows you to set requirements for a given spell, so to use this condition type you need spellid of the spell cast on item use)
- Remember that conditions with the same value ElseGroup will be used to make logical AND check, so to allow different targets for the same spell effect you have to set ElseGroup respectively.
- CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT = 18
- SourceGroup: creature entry (npc_spellclick_spells.npc_entry)
- SourceEntry: spell (npc_spellclick_spells.spell_id)
- ConditionTarget:
- 0 - Clicker
- 1 - Spellclick target (clickee)
- CONDITION_SOURCE_TYPE_QUEST_ACCEPT = 19
- SourceGroup: ?
- SourceEntry: Quest id)
- ConditionTarget: always 0
- CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK = 20
- SourceGroup: ?
- SourceEntry: Quest id)
- ConditionTarget: always 0
- CONDITION_SOURCE_TYPE_VEHICLE_SPELL = 21
- SourceGroup: creature entry (creature_template.entry)
- SourceEntry: spell (Spell Id from Spell.dbc)
- ConditionTarget:
- 0 - Player for which spell bar is shown
- 1 - Vehicle creature
Note: it will show or hide spells in vehicle spell bar.
- CONDITION_SOURCE_TYPE_SMART_EVENT = 22
- SourceGroup: Id (smart_scripts.id) + 1
- SourceEntry: EntryOrGuid (smart_scripts.entryorguid)
- SourceId: SourceType (smart_scripts.source_type)
- ConditionTarget:
- 0 - Invoker
- 1 - Object
The content of the ConditionValueX fields depends on the ConditionTypeOrReference
- CONDITION_NONE = 0
Never used
- CONDITION_AURA = 1
- ConditionValue1: spell (Spell Id from Spell.dbc)
- ConditionValue2: effect index (0-2)
- ConditionValue3: always 0
- CONDITION_ITEM = 2
- ConditionValue1: item entry (item_template.entry)
- ConditionValue2: item count
- ConditionValue3: in bank? (true=1)
- CONDITION_ITEM_EQUIPPED = 3
- ConditionValue1: item entry (item_template.entry)
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_ZONEID = 4
- ConditionValue1: zone ID where this condition will be true
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_REPUTATION_RANK = 5
- ConditionValue1: faction template ID (from Faction.dbc)
- ConditionValue2: rank (Hated - 1, Hostile - 2, Unfriendly - 4, Neutral - 8, Friendly - 16, Honored - 32, Revered - 64, Exalted - 128) Flags can be added together for all ranks the condition should be true in.
- ConditionValue3: always 0
- CONDITION_TEAM = 6
- ConditionValue1: team id (469 - Alliance, 67 - Horde)
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_SKILL = 7
- ConditionValue1: skill required, see SkillLine.dbc
- ConditionValue2: skill value
- ConditionValue3: always 0
- CONDITION_QUESTREWARDED = 8
- ConditionValue1: (quest_template.id)
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_QUESTTAKEN = 9
- ConditionValue1: (quest_template.id)
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_DRUNKENSTATE = 10
- ConditionValue1: drunken state: 0 - sober; 1 - tipsy, 2 - drunk, 3 - smashed
- ConditionValue2: always 0
- ConditionValue3: always 0
- (Formerly AD_COMMISSION_AURA)
- CONDITION_WORLD_STATE = 11
- ConditionValue1: world state index
- ConditionValue2: world state value
- ConditionValue3: always 0
- CONDITION_ACTIVE_EVENT= 12
- ConditionValue1: event entry (game_event.eventEntry)
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_INSTANCE_DATA = 13
- ConditionValue1: entry //see corresponding script source files for more info
- ConditionValue2: data //see corresponding script source files for more info
- ConditionValue3: always 0
- CONDITION_QUEST_NONE = 14
- ConditionValue1: (quest_template.id)
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_CLASS = 15
- ConditionValue1: class ID. Add flags together for all classes condition should be true for. See ChrClasses.dbc
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_RACE = 16
- ConditionValue1: race the player must be. Add flags together for all races condition should be true for. See ChrRaces.dbc
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_ACHIEVEMENT = 17
- ConditionValue1: achievement ID from Achievement.dbc
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_MAPID = 22
- ConditionValue1: Map entry
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_AREAID = 23
- ConditionValue1: Area ID
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_SPELL = 25
- ConditionValue1: spell (Spell Id from Spell.dbc)
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_PHASEMASK = 26
- ConditionValue1: phasemask value
- ConditionValue2: always 0
- ConditionValue3: always 0
- CONDITION_LEVEL = 27
- ConditionValue1: Player level
- ConditionValue2: Optional
- 0 = Level must be equal
- 1 = Level must be higher
- 2 = Level must be lesser
- 3 = Level must be equal or higher
- 4 = Level must be equal or lower
- ConditionValue3: always 0
- CONDITION_QUEST_COMPLETE = 28
- ConditionValue1: Quest id
- ConditionValue2: Always 0
- ConditionValue3: always 0
Only if player has all quest objectives complete, but not yet rewarded.
- CONDITION_NEAR_CREATURE = 29
- ConditionValue1: Creature entry
- ConditionValue2: Distance (yd)
- ConditionValue3: always 0
- CONDITION_NEAR_GAMEOBJECT = 30
- ConditionValue1: Gameobject entry
- ConditionValue2: Distance (yd)
- ConditionValue3: always 0
- CONDITION_OBJECT_ENTRY= 31
- ConditionValue1: TypeID - available object types:
- 3 - TYPEID_UNIT
- 4 - TYPEID_PLAYER
- 5 - TYPEID_GAMEOBJECT
- 7 - TYPEID_CORPSE (player corpse, after released spirit)
- ConditionValue2: Entry
- 0 for any object of given type
- Gameobject entry for TypeID = TYPEID_GAMEOBJECT
- Creature entry for TypeID = TYPEID_UNIT
- ConditionValue3: always 0
- ConditionValue1: TypeID - available object types:
- CONDITION_TYPE_MASK= 32
- ConditionValue1: TypeMask - a bitmask of following object types:
- 0x0008 - TYPEMASK_UNIT
- 0x0010 - TYPEMASK_PLAYER
- 0x0020 - TYPEMASK_GAMEOBJECT
- 0x0080 - TYPEMASK_CORPSE (player corpse, after released spirit)
- ConditionValue2: always 0
- ConditionValue3: always 0
- ConditionValue1: TypeMask - a bitmask of following object types:
- CONDITION_RELATION_TO= 33
- ConditionValue1: target to which relation is checked - one of ConditionTargets available in current SourceType.
- ConditionValue2: RelationType - defines relation of current ConditionTarget to target specified in ConditionValue1.
- 0 - RELATION_SELF
- 1 - RELATION_IN_PARTY
- 2 - RELATION_IN_RAID_OR_PARTY
- 3 - RELATION_OWNED_BY (ConditionTarget is owned by ConditionValue1)
- 4 - RELATION_PASSENGER_OF (ConditionTarget is passenger of ConditionValue1)
- ConditionValue3: always 0
- CONDITION_REACTION_TO= 34
- ConditionValue1: target to which reaction is checked - one of ConditionTargets available in current SourceType.
- ConditionValue2: rankMask- defines reactions of current ConditionTarget to target specified in ConditionValue1 which are allowed. This is a bitmask, flags for reactions are:
- 1 - Hated
- 2 - Hostile
- 4 - Unfriendly
- 8 - Neutral
- 16 - Friendly
- 32 - Honored
- 64 - Revered
- 128 - Exalted
- ConditionValue3: always 0
- CONDITION_DISTANCE_TO= 35
- ConditionValue1: target to which distance is checked - one of ConditionTargets available in current SourceType.
- ConditionValue2: distance - defines distance between current ConditionTarget and target specified in ConditionValue1.
- ConditionValue3: ComparisionType:
- 0 = distance must be equal to ConditionValue2
- 1 = distance must be higher than ConditionValue2
- 2 = distance must be lesser than ConditionValue2
- 3 = distance must be equal or higher than ConditionValue2
- 4 = distance must be equal or lower than ConditionValue2
- CONDITION_ALIVE= 36
- ConditionValue1: always 0
- ConditionValue2: always 0
- ConditionValue3: always 0
- NegativeCondition:
- 0 (If target needs to be ALIVE)
- 1 (If target needs to be DEAD)
NOTE: A creature corpse and a creature that looksdead are two different things. One is actually dead and the other is just using an emote to appear dead.
- CONDITION_HP_VAL = 37
- ConditionValue1: HP
- ConditionValue2: ComparisionType:
- 0 = HP must be equal
- 1 = HP must be higher
- 2 = HP must be lesser
- 3 = HP must be equal or higher
- 4 = HP must be equal or lower
- ConditionValue3: always 0
- CONDITION_HP_PCT = 38
- ConditionValue1: Percentage of max HP
- ConditionValue2: ComparisionType:
- 0 = Percentage of max HP must be equal
- 1 = Percentage of max HP must be higher
- 2 = Percentage of max HP must be lesser
- 3 = Percentage of max HP must be equal or higher
- 4 = Percentage of max HP must be equal or lower
- ConditionValue3: always 0
- REFERENCE TEMPLATES
- SourceTypeOrReferenceId : used as negative, for reference ID
- SourceGroup : always 0
- SourceEntry : always 0
- ElseGroup : OR modifier
- ConditionTypeOrReference: ConditionTypeOrReference
- ConditionValue1 : see above
- ConditionValue2 : see above
- ConditionValue3 : see above
- ErrorTextId : see above
- Comment : see above