-
Notifications
You must be signed in to change notification settings - Fork 15
conditions
Contains conditions that can be checked in scripts and other systems. It is recommended to use the Script Editor when working with conditions.
Name | Type | Comment |
---|---|---|
condition_entry | unsigned mediumint(8) | Primary key. |
type | tinyint(3) | The type of condition. See the types below. |
value1 | unsigned mediumint(8) | A value whose meaning depends on the condition type. |
value2 | unsigned mediumint(8) | A value whose meaning depends on the condition type. |
value3 | unsigned mediumint(8) | A value whose meaning depends on the condition type. |
value4 | unsigned mediumint(8) | A value whose meaning depends on the condition type. |
flags | unsigned tinyint(3) | 1 = reverse result 2 = swap targets |
A list of all conditions follows below.
Returns the opposite of the provided condition. This condition is deprecated. Use the reverse result flag.
Requirement: None
Value1: condition_id
Returns true if at least one of the provided conditions is true.
Requirement: None
Value1: condition_id
Value2: condition_id
Value3: condition_id (optional)
Value4: condition_id (optional)
Returns true only if all the provided conditions are true.
Requirement: None
Value1: condition_id
Value2: condition_id
Value3: condition_id (optional)
Value4: condition_id (optional)
Always returns true. For internal use only.
Requirement: None
Checks if the unit has an aura from this spell.
Requirement: Unit Target
Value1: spell_id
Value2: effindex
Checks if the player has an item in his inventory.
Requirement: Player Target
Value1: item_id
Value2: count
Checks if the player has equipped an item.
Requirement: Player Target
Value1: item_id
Checks if the player is in a specific zone or area.
Requirement: WorldObject Target or Source
Value1: area_id
Checks if the player's reputation with a given faction is equal or greater than.
Requirement: Player Target
Value1: faction_id
Value2: min_rank
Checks if the player is a member of the specified team.
Requirement: Player Target
Value1: player_team (469 - Alliance 67 - Horde)
Checks if the player's skill is equal or greater than.
Requirement: Player Target
Value1: skill_id
Value2: skill_value
Checks if the player has already completed a quest.
Requirement: Player Target
Value1: quest_id
Checks if the player has accepted a quest.
Requirement: Player Target
Value1: quest_id
Value2: 0,1,2 for condition true while quest active (0 any state, 1 if quest incomplete, 2 if quest completed).
Returns true if the player has an argent dawn commission aura.
Requirement: Player Target
Checks a global saved variable.
Requirement: None
Value1: index
Value2: data
Value3: 0, 1 or 2 (0: equal to, 1: equal or higher than, 2: equal or less than)
Checks if a given game event is currently active.
Requirement: None
Value1: event_id
Returns true if the creature is chasing a victim but is unable to find a path to it.
Requirement: Creature Source
Checks if the player's race and class matches the given mask.
Requirement: Player Target
Value1: race_mask
Value2: class_mask
Checks the target's level.
Requirement: Unit Target
Value1: level
Value2: 0, 1 or 2 (0: equal to, 1: equal or higher than, 2: equal or less than)
Check's if the source's entry id matches the one specified.
Requirement: WorldObject Source
Value1: entry
Checks if the player has learned the given spell.
Requirement: Player Target
Value1: spell_id
Value2: 0, 1 (0: has spell, 1: hasn't spell)
Calls the instance script to check an internal condition.
Requirement: Map
Value1: map_id
Value2: instance_condition_id (instance script specific enum)
Checks if the player is able to accept a quest.
Requirement: Player Target
Value1: quest_id
Checks if there is a creature nearby with the given id.
Requirement: WorldObject Target
Value1: creature_id
Value2: search_radius
Checks if there is a gameobject nearby with the given id.
Requirement: WorldObject Target
Value1: gobject_id
Value2: search_radius
Returns true if the player has not taken the given quest and has not been rewared for it before.
Requirement: Player Target
Value1: quest_id
Checks if the player has an item in his inventory or bank.
Requirement: Player Target
Value1: item_id
Value2: count
Checks the current content patch. (progression system)
Requirement: None
Value1: patch (0-10)
Value2: 0, 1 or 2 (0: equal to, 1: equal or higher than, 2: equal or less than)
Checks the alive state of the source and target, and the distance between them. Used for escorts.
Requirement: None (optionally Creature Source, Player Target)
Value1: flags (see enum eEscortConditionFlags)
Value2: distance (optional)
Checks if a giv 10000 en holiday is active. Recommended to use CONDITION_ACTIVE_GAME_EVENT instead.
Requirement: None
Value1: holiday_id
Checks the target's gender.
Requirement: WorldObject Target
Value1: gender (0=male, 1=female, 2=none) (see enum Gender)
Checks if the target is a player or belongs to a player.
Requirement: WorldObject Target
Value1: 0=player only, 1=player owned too
Returns true if player knows the skill id and skill is less than (and not equal to) skill_value (for skill_value > 1)
Requirement: Player Target
Value1: skill_id
Value2: skill_value (if 1, then true if player does not know skill_id)
Returns true if the player's reputation with a given faction is below or equal to the specified rank.
Requirement: Player Target
Value1: faction_id
Value2: max_rank
Returns true if the source has a specific flag turned on.
Requirement: WorldObject Source
Value1: field_id (see UpdateFields.h)
Value2: flag
Checks the source creature's last reached waypoint.
Requirement: Creature Source
Value1: waypointId
Value2: 0 : ==, 1: >= 2 <=
Checks the current map id.
Requirement: Map
Value1: map_id
Gets data from the instance script and checks the returned value.
Requirement: Map
Value1: index
Value2: data
Value3: 0, 1 or 2 (0: equal to, 1: equal or higher than, 2: equal or less than)
Gets data from a scripted map event and checks the returned value.
Requirement: Map
Value1: event_id
Value2: index
Value3: data
Value4: 0, 1 or 2 (0: equal to, 1: equal or higher than, 2: equal or less than)
Returns true if a scripted map event with this id is currently active.
Requirement: Map
Value1: event_id
Returns true if the source and target are in line of sight of one another.
Requirement: WorldObject Source, WorldObject Target
Checks the distance between the provided source and target.
Requirement: WorldObject Source, WorldObject Target
Value1: distance
Value2: 0, 1 or 2 (0: equal to, 1: equal or higher than, 2: equal or less than)
Returns true if the target is currently moving.
Requirement: WorldObject Target
Returns true if the target has a pet.
Requirement: Unit Target
Checks the target's current health percent.
Requirement: Unit Target
Value1: hp_percent
Value2: 0, 1 or 2 (0: equal to, 1: equal or higher than, 2: equal or less than)
Checks the target's current mana percent.
Requirement: Unit Target
Value1: mana_percent
Value2: 0, 1 or 2 (0: equal to, 1: equal or higher than, 2: equal or less than)
Checks if the target is currently in combat.
Requirement: Unit Target
Returns true if the target is hostile to the source.
Requirement: WorldObject Source, WorldObject Target
Returns true if the player is in a group.
Requirement: Player Target
Returns true if the target is alive.
Requirement: Unit Target
Returns true if all extra targets that are part of a scripted map event satisfy the provided condition id.
Requirement: Map
Value1: event_id
Value2: condition_id
Returns true if the gameobject is currently spawned.
Requirement: GameObject Target
Checks the current loot state of a GameObject.
Requirement: GameObject Target
Value1: loot_state (see enum LootState)
Returns true if a gameobject with this guid exists and it satisfies the provided condition id.
Requirement: Map
Value1: guid
Value2: condition_id
Checks the player's honor rank.
Requirement: Player Target
Value1: rank
Value2: 0, 1 or 2 (0: equal to, 1: equal or higher than, 2: equal or less than)