Conditions
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 | 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 | |||
ErrorType | mediumint(8) | unsigned | NO | 0 | |||
ErrorTextId | mediumint(8) | unsigned | NO | 0 | |||
ScriptName | char(64) | signed | NO | " | |||
Comment | varchar(255) | NO |
SourceTypeOrReferenceId
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_PHASE_DEFINITION = 23, CONDITION_SOURCE_TYPE_SPELL_PROC = 24, CONDITION_SOURCE_TYPE_NPC_VENDOR = 25, CONDITION_SOURCE_TYPE_AREATRIGGER_ACTION = 26, CONDITION_SOURCE_TYPE_BONUS_LOOT_TEMPLATE = 27, CONDITION_SOURCE_TYPE_VIGNETTE = 28, CONDITION_SOURCE_TYPE_SEAMLESS_TELEPORT = 29, CONDITION_SOURCE_TYPE_LOOT_ITEM = 30, CONDITION_SOURCE_TYPE_WORLD_LOOT_TEMPLATE = 31, CONDITION_SOURCE_TYPE_PLAYER_CHOICE = 32, CONDITION_SOURCE_TYPE_PLAYER_CHOICE_RESPONS = 33, CONDITION_SOURCE_TYPE_WORLD_STATE = 34, CONDITION_SOURCE_TYPE_PLAYER_ACTIONS = 35, //SourceEntry - id (options_param из player_actions) CONDITION_SOURCE_TYPE_LOCALE_QUEST = 37, CONDITION_SOURCE_TYPE_SCENARIO_STEP = 38, CONDITION_SOURCE_TYPE_USE_GAMEOBJECT = 39,
ConditionTypeOrReference
CONDITION_NONE = 0, //0 0 0 always true CONDITION_AURA = 1, //spell_id effindex use target? true if player (or target, if value3) has aura of spell_id with effect effindex CONDITION_ITEM = 2, //item_id count bank true if has #count of item_ids (if 'bank' is set it searches in bank slots too) CONDITION_ITEM_EQUIPPED = 3, //item_id 0 0 true if has item_id equipped CONDITION_ZONEID = 4, //zone_id 0 0 true if in zone_id CONDITION_REPUTATION_RANK = 5, //faction_id rankMask 0 true if has min_rank for faction_id CONDITION_TEAM = 6, //player_team 0, 0 469 - Alliance, 67 - Horde) CONDITION_SKILL = 7, //skill_id skill_value 0 true if has skill_value for skill_id CONDITION_QUESTREWARDED = 8, //quest_id 0 0 true if quest_id was rewarded before CONDITION_QUESTTAKEN = 9, //quest_id multiple 0 true while quest active. if multiple = 1 condition will be check for QUEST_STATUS_INCOMPLETE CONDITION_DRUNKENSTATE = 10, //DrunkenState 0, 0 true if player is drunk enough CONDITION_WORLD_STATE = 11, //index value 0 true if world has the value for the index CONDITION_ACTIVE_EVENT = 12, //event_id 0 0 true if event is active CONDITION_INSTANCE_INFO = 13, //entry data 0 true if data is set in current instance CONDITION_QUEST_NONE = 14, //quest_id 0 0 true if doesn't have quest saved CONDITION_CLASS = 15, //class 0 0 true if player's class is equal to class CONDITION_RACE = 16, //race 0 0 true if player's race is equal to race CONDITION_ACHIEVEMENT = 17, //achievement_id 0 0 true if achievement is complete CONDITION_TITLE = 18, //title id 0 0 true if player has title CONDITION_SPAWNMASK = 19, //spawnMask 0 0 CONDITION_GENDER = 20, //gender 0 0 true if player's gender is equal to gender CONDITION_UNUSED_21 = 21, // CONDITION_MAPID = 22, //map_id 0 0 true if in map_id CONDITION_AREAID = 23, //area_id 0 0 true if in area_id CONDITION_UNUSED_24 = 24, // CONDITION_SPELL = 25, //spell_id 0 0 true if player has learned spell CONDITION_PHASEMASK = 26, //phasemask 0 0 true if object is in phasemask CONDITION_LEVEL = 27, //level ComparisonType 0 true if unit's level is equal to param1 (param2 can modify the statement) CONDITION_QUEST_COMPLETE = 28, //quest_id 0 0 true if player has quest_id with all objectives complete, but not yet rewarded CONDITION_NEAR_CREATURE = 29, //creature entry distance 0 true if there is a creature of entry in range CONDITION_NEAR_GAMEOBJECT = 30, //gameobject entry distance 0 true if there is a gameobject of entry in range CONDITION_OBJECT_ENTRY_GUID = 31, //TypeID entry guid true if object is type TypeID and the entry is 0 or matches entry of the object CONDITION_TYPE_MASK = 32, //TypeMask 0 0 true if object is type object's TypeMask matches provided TypeMask CONDITION_RELATION_TO = 33, //ConditionTarget RelationType 0 true if object is in given relation with object specified by ConditionTarget CONDITION_REACTION_TO = 34, //ConditionTarget rankMask 0 true if object's reaction matches rankMask object specified by ConditionTarget CONDITION_DISTANCE_TO = 35, //ConditionTarget distance Comparison Type true if object and ConditionTarget are within distance given by parameters CONDITION_ALIVE = 36, //0 0 0 true if unit is alive CONDITION_HP_VAL = 37, //hpVal ComparisonType 0 true if unit's hp matches given value CONDITION_HP_PCT = 38, //hpPct ComparisonType 0 true if unit's hp matches given pct CONDITION_AREA_EXPLORED = 39, //AreaID CONDITION_SCENE_SEEN = 40, //SceneID CONDITION_QUEST_OBJECTIVE_DONE = 41, //QuestID ObjectiveID Count CONDITION_SCENE_TRIGER_EVENT = 42, //SceneID CONDITION_GARRRISON_BUILDING = 43, //BuildingType minLvl CONDITION_SCENARION_STEP = 44, //ScenarioID stepID ----------------- NEW ------------ CONDITION_REALM_ACHIEVEMENT = 45, // achievement_id 0 0 true if realm achievement is complete CONDITION_IN_WATER = 46, // 0 0 0 true if unit in water CONDITION_TERRAIN_SWAP = 47, // terrainSwap 0 0 true if object is in terrainswap CONDITION_STAND_STATE = 48, // stateType state 0 true if unit matches specified sitstate (0,x: has exactly state x; 1,0: any standing state; 1,1: any sitting state;) CONDITION_CLASS_HALL_ADVANCEME = 49, // talentID 0 0 true if learned talent at class hall. CONDITION_CURRENCY = 50, // currency_id countMin countMax true if has #countMin and countMax CONDITION_CRITERIA = 51, // criteriatree_id 0 0 true if Criteria is complete CONDITION_CRITERIA_TREE = 52, // criteriatree_id 0 0 true if CriteriaTree is complete CONDITION_MODIFIER_TREE = 53, // modifiertree_id 0 0 true if ModifierTree is complete CONDITION_ARTIFACT_LEVEL = 54, // itemEntry minLevel maxLevel true if in minLevel maxLevel CONDITION_SPEC_ID = 55, // specId 0 0 true if in current spec CONDITION_ON_TRANSPORT = 56, // true if on vehicle CONDITION_ARTIFACT_POWER = 57, // itemEntry or 0 minPower maxPower true if in minLevel maxLevel CONDITION_CURRENCY_ON_WEEK = 58, // currency id countMin countMax true if has #countMin and countMax CONDITION_WORLD_QUEST = 60, // quest id 0 0 true if world quest active CONDITION_HAS_POWER = 61, // PowerType > this < this true if power > or power < if set CONDITION_GAMEMASTER = 62, // 0 0 0 true if player is GameMaster CONDITION_HAS_EMOTE_STATE = 63, // 0 0 0 true if has EmoteState CONDITION_IN_COMBAT = 64, // 0 0 0 true if in combat CONDITION_GET_AMOUNT_STACK_AUR = 65, // 0 0 0 true if has aura count CONDITION_TIMEWALKING = 66, // 0 0 0 true if player is in timewalking. CONDITION_ACOUNT_QUEST = 67, // quest_id 0 0 true if quest_id was rewarded on any char account CONDITION_GET_AURA_MAX_DURATIO = 68, // aura value 0 true if max duration of aura == value. CONDITION_IF_HAS_SUMMON = 69, // npcId 0 0 true if unit has summmon CONDITION_HAS_QUEST_MULTI = 70, // QuestId 1\0 complete 1\0 rewarded true if quest is incomplete. if value2 = 1 - quest is incomplete and complete. if value3 = 1 - quest is incomplete, complete and rewarded CONDITION_HAS_BYTES_1 = 71, // bytes1 CONDITION_HAS_SPELL_COOLDOWN = 72, // spellId CONDITION_WORLD_QUEST_REWARDED = 73, // QuestId true if world quest rewarded. CONDITION_GO_TYPE = 74, // TypeId true if get go type id CONDITION_HAS_PASSENGER = 75, // SeatId true if has passenger in seatId CONDITION_HAS_AURA = 76, // SpellId true if has has aura CONDITION_MAX_LEVEL = 77, // 0 true if player has max level. CONDITION_REPUTATION = 78, // FactionID value ComparisonType true if player has reputation is equal to param1 (param3 can modify the statement 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). CONDITION_QUEST_COMPLETITION = 79, // QuestId true if player set quest completition CONDITION_GUID_SPEAKING = 80, // 0 true if guid have true in isSpeaking CONDITION_SCENARIO_ID = 81, // ScenarioID CONDITION_FARM_SLOT_COUNT = 82, // Slot Count CONDITION_FARM_NPC_ENTRY = 83, // Npc Entry CONDITION_HAS_PHASEID = 84, // PhaseId CONDITION_DAY_NUMBER = 85, // Number day in month - 1 (0-30) CONDITION_WEEK_DAY = 86, // Number day in week(0-6) CONDITION_MONTH_NUMBER = 87, // Number month in year(0-11) CONDITION_HAS_FOLLOWER = 88, // Has Follower in garrison CONDITION_FOLLOWER_ON_MISSION = 89, // Follower in mission CONDITION_LIQUID_STATUS = 90, // Status true if source is equal liquid status level CONDITION_LFG_DUNGEONS_ID = 91, // LFG Dungeons ID CONDITION_QUESTSTATE = 92, // quest_id state_mask 0 true if player is in any of the provided quest states for the quest (1 = not taken, 2 = completed, 8 = in progress, 32 = failed, 64 = rewarded) CONDITION_GARRISON_LEVEL = 93, // level (garrison WOD!) true if player has level of Garrison. CONDITION_FOLLOWER_COUNT = 94, // GarrisonType count true if player has %n followers. CONDITION_BUILDING_HAS_FOLLOWER = 95, // buildingType followerId (garrison WOD!) true if garrison building assign follower CONDITION_INDEX_OF_SPECIAL_ENTRY = 96, // index (garrison WOD!) (herb garden building) to get index of special entry herb. CONDITION_COOLDOWN_STABLES_QUEST = 97, // groupId (garrison WOD!) true if player have cooldown for stable quests. CONDITION_COOLDOWN_TAVERN_QUESTS = 98, // groupId (garrison WOD!) true if player have cooldown for tavern quests. CONDITION_COOLDOWN_BONUS_LOOT = 99, // (garrison WOD!) true if player have week cooldown for bonus loot currency. CONDITION_GARRISON_BLUEPRINTS = 100, // entry (garrison WOD!) true if player has blueprint with entry. CONDITION_GARRISON_GUILD_STANDARD = 101, // (garrison WOD!) true if guild standard active. CONDITION_GARRISON_BARRACK_GUARDS = 102, // RaceID (garrison WOD!) true if type of guard by race. CONDITION_GARRISON_BARRACK_BODYGUARDS = 103, // followerId (garrison WOD!) true if bodyguard is active. CONDITION_SHIPYARD_SHIPMENT_ACTIVE = 104, // (garrison WOD!) true if shipyard shipments is active. CONDITION_GARRISON_BLUEPRINT_SHIP = 105, // spellId (garrison WOD!) true if player has blueprint ship. CONDITION_HAS_ACCOUNT_SPELL = 106, // spellId true if player has account spell CONDITION_HAS_AURA_TYPE = 107, // Aura type true if player has aura with type
Explanation of condition types
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 file.)
- 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
*CONDITION_SOURCE_TYPE_PHASE_DEFINITION = 23
- SourceGroup: Id (phase_definitions.zoneId)
- SourceEntry: EntryOrGuid (phase_definitions.entry)
*CONDITION_SOURCE_TYPE_SPELL_PROC = 24
- SourceGroup: always 0
- SourceEntry: spell id of aura which triggers the proc
- ConditionTarget:
- 0 - Actor
- 1 - ActionTarget
*CONDITION_SOURCE_TYPE_NPC_VENDOR = 25
- SourceGroup: vendor entry (npc_vendor.entry)
- SourceEntry: item entry (npc_vendor.item)
- SourceId: always 0
*CONDITION_SOURCE_TYPE_AREATRIGGER_ACTION = 26
- SourceGroup:
- SourceEntry:
- SourceId:
*CONDITION_SOURCE_TYPE_BONUS_LOOT_TEMPLATE = 27
- SourceGroup:
- SourceEntry:
- SourceId:
*CONDITION_SOURCE_TYPE_VIGNETTE = 28
- SourceGroup:
- SourceEntry:
- SourceId:
Explanation of ConditionValueX fields
*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_INFO = 13
- ConditionValue1: entry //see corresponding script source files for more info
- ConditionValue2: data //see corresponding script source files for more info
- ConditionValue3: type:
- 0 - INSTANCE_INFO_DATA
- 1 - INSTANCE_INFO_DATA64
- 2 - INSTANCE_INFO_BOSS_STATE
*CONDITION_QUEST_NONE = 14
- ConditionValue1: (quest_template.id)
- ConditionValue2: always 0
- ConditionValue3: always 0
*CONDITION_CLASS = 15
- ConditionValue1: class mask. 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_TITLE = 18
- ConditionValue1: title ID from CharTitles.dbc
- ConditionValue2: always 0
- ConditionValue3: always 0
*CONDITION_SPAWNMASK = 19
- ConditionValue1: spawnMask (see Gameobject.spawnMask/Creature.spawnMask)
- ConditionValue2: always 0
- ConditionValue3: always 0
*CONDITION_GENDER = 20
- ConditionValue1: 0 = Male, 1 = Female, 2 = None
- ConditionValue2: always 0
- ConditionValue3: always 0
*CONDITION_UNIT_STATE = 21
- ConditionValue1: UnitState (enum)
- 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|Gameobject template tc2#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)
- 5 - RELATION_CREATED_BY (ConditionTarget is summoned by 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_looks_dead 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
*CONDITION_REALM_ACHIEVEMENT = 45
- ConditionValue1: achievement ID from Achievement.dbc
- ConditionValue2: always 0
- ConditionValue3: always 0
*CONDITION_IN_WATER = 46
- ConditionValue1: always 0
- ConditionValue2: always 0
- ConditionValue3: always 0
- NegativeCondition:
- 0 (If target needs to be on land)
- 1 (If target needs to be in water)
*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
- ErrorType : see above
- ErrorTextId : see above
- Comment : see above
*CONDITION_GARRRISON_BUILDING
- ConditionValue1: BuildingTypeID
- ConditionValue2: minLevel
CONDITION_SOURCE_TYPE_EVENT_SCRIPTS
SCRIPTS_QUEST_END = 1, SCRIPTS_QUEST_START = 2, SCRIPTS_SPELL = 3, SCRIPTS_GAMEOBJECT = 4, SCRIPTS_EVENT = 5, SCRIPTS_WAYPOINT = 6,