Back to 'command' Return to world Go to 'creature'
Field | Type | Attributes | Key | Null | Default | Extra | Comment |
---|---|---|---|---|---|---|---|
SourceTypeOrReferenceId | int | signed | PRI | NO | 0 | ||
SourceGroup | int | unsigned | PRI | NO | 0 | ||
SourceEntry | int | signed | PRI | NO | 0 | ||
SourceId | int | signed | PRI | NO | 0 | ||
ElseGroup | int | unsigned | PRI | NO | 0 | ||
ConditionTypeOrReference | int | signed | PRI | NO | 0 | ||
ConditionTarget | tinyint | unsigned | PRI | NO | 0 | ||
ConditionValue1 | int | unsigned | PRI | NO | 0 | ||
ConditionValue2 | int | unsigned | PRI | NO | 0 | ||
ConditionValue3 | int | unsigned | PRI | NO | 0 | ||
NegativeCondition | tinyint | unsigned | NO | 0 | |||
ErrorType | int | unsigned | NO | 0 | |||
ErrorTextId | int | unsigned | NO | 0 | |||
ScriptName | char(64) | NO | '' | ||||
Comment | varchar(255) | YES | NULL |
SourceTypeOrReferenceId | ID | SourceGroup | SourceEntry | SourceId | ConditionTarget | Notes |
---|---|---|---|---|---|---|
CONDITION_SOURCE_TYPE_NONE | 0 | (Never used) | (Never used) | (Never used) | (Never used) | |
CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE | 1 | (creature/reference)_loot_template Entry | (creature/reference)_loot_template Item | Always 0 | Always 0 | |
CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE | 2 | (disenchant/reference)_loot_template Entry | (disenchant/reference)_loot_template Item | Always 0 | Always 0 | |
CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE | 3 | (fishing/reference)_loot_template Entry | (fishing/reference)_loot_template Item | Always 0 | Always 0 | |
CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE | 4 | (gameobject/reference)_loot_template Entry | (gameobject/reference)_loot_template Item | Always 0 | Always 0 | |
CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE | 5 | (item/reference)_loot_template Entry | (item/reference)_loot_template Item | Always 0 | Always 0 | |
CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE | 6 | (mail/reference)_loot_template Entry | (mail/reference)_loot_template Item | Always 0 | Always 0 | |
CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE | 7 | (milling/reference)_loot_template Entry | (milling/reference)_loot_template Item | Always 0 | Always 0 | |
CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE | 8 | (pickpocketing/reference)_loot_template Entry | (pickpocketing/reference)_loot_template Item | Always 0 | Always 0 | |
CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE | 9 | (prospecting/reference)_loot_template Entry | (prospecting/reference)_loot_template Item | Always 0 | Always 0 | |
CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE | 10 | reference_loot_template Entry | reference_loot_template Item | Always 0 | Always 0 | |
CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE | 11 | (skinning/reference)_loot_template Entry | (skinning/reference)_loot_template Item | Always 0 | Always 0 | |
CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE | 12 | (spell/reference)_loot_template Entry | (spell/reference)_loot_template Item | Always 0 | Always 0 | |
CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET | 13 | Mask of effects to be affected by condition: 1 = EFFECT_0, 2 = EFFECT_1, 4 = EFFECT_2 |
Spell ID | Always 0 | 0 : Potential spell Target | Don't use wowhead to get number of effects, data from wowhead sometimes doesn't match real effect number. |
CONDITION_SOURCE_TYPE_GOSSIP_MENU | 14 | GossipMenu MenuID | GossipMenu TextID | Always 0 | 0 = Player 1 = WorldObject |
|
CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION | 15 | GossipMenuOption MenuID | GossipMenuOption OptionID | Always 0 | 0 = Player 1 = WorldObject |
|
CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE | 16 | Always 0 | creature entry | Always 0 | 0 = Player riding vehicle 1 = Vehicle creature |
|
CONDITION_SOURCE_TYPE_SPELL | 17 | Always 0 | Spell ID | Always 0 | 0 = spell Caster 1 = Explicit Target of the spell (only for spells which take the object selected by caster into account) |
|
CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT | 18 | spellclick creature | spellclick Spell | Always 0 | 0 = Clicker 1 = Spellclick target (clickee) |
|
CONDITION_SOURCE_TYPE_QUEST_AVAILABLE | 19 | Always 0 | quest ID | Always 0 | Always 0 | Condition must be met for quest to be available to player. |
20 | ||||||
CONDITION_SOURCE_TYPE_VEHICLE_SPELL | 21 | creature entry | Spell ID | Always 0 | 0 = Player for whom spell bar is shown 1 = Vehicle creature |
This will show or hide spells in vehicle spell bar. |
CONDITION_SOURCE_TYPE_SMART_EVENT | 22 | SAI id + 1 | SAI EntryOrGuid | SAI SourceType | 0 = Invoker 1 = Object |
|
CONDITION_SOURCE_TYPE_NPC_VENDOR | 23 | vendor entry | vendor item | Always 0 | Always 0 | |
CONDITION_SOURCE_TYPE_SPELL_PROC | 24 | Always 0 | Spell ID of aura which triggers the proc | Always 0 | 0 = Actor 1 = ActionTarget |
|
25 | Always 0 | terrainSwap - object in terrainswap | Always 0 | (source code / new description here) | ||
26 | PhaseID | AreaTable ID (or 0 for any area) | Always 0 | (source code / new description here) | ||
27 | Always 0 | world_safe_locs.ID | Always 0 | (source code / new description here) | ||
28 | areatrigger_template.Id | 0 = Non-ServersideAreatrigger 1 = ServersideAreatrigger |
Always 0 | (source code / new description here) | ||
29 | Always 0 | ConversationLineID | Always 0 | (source code / new description here) | ||
30 | Always 0 | Areatrigger ID | Always 0 | (source code / new description here) | ||
31 | TrainerID | Spell ID | Always 0 | (source code / new description here) | ||
32 | CreatureID / GameObjectID | ObjectType: 5 = Unit 8 = GameObject |
Always 0 | (source code / new description here) |
See table above.
See table above.
See table above.
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).
Example:
Two conditions with the same SourceType, SourceGroup and SourceEntry but with a different Condition, the first one has ElseGroup = 1 and the second has ElseGroup = 2, this creates a Logical OR.
Two conditions with the same SourceType, SourceGroup and SourceEntry but with a different Condition, both has ElseGroup = 1, this creates a Logical AND.
ConditionTypeOrReference (name) | Value | ConditionValue1 | ConditionValue2 | ConditionValue3 | Usage |
---|---|---|---|---|---|
CONDITION_NONE | 0 | (Never used) | (Never used) | (Never used) | |
CONDITION_AURA | 1 | Spell ID | Effect index (0-31) | Always 0 | |
CONDITION_ITEM | 2 | item entry | item count | 0 = not in bank 1 = in bank |
|
CONDITION_ITEM_EQUIPPED | 3 | item entry | Always 0 | Always 0 | |
CONDITION_ZONEID | 4 | AreaTable ID where this condition will be true. | Always 0 | Always 0 | |
CONDITION_REPUTATION_RANK | 5 | Faction ID | rank:1 = Hated |
Always 0 | |
CONDITION_TEAM | 6 | TeamID: Alliance = 469 Horde = 67 |
Always 0 | Always 0 | |
CONDITION_SKILL | 7 | Required SkillLine ID | Skill rank value (e.g. from 1 to 450 for the 3.3.5 branch) | Always 0 | |
CONDITION_QUESTREWARDED | 8 | quest ID | Always 0 | Always 0 | |
CONDITION_QUESTTAKEN | 9 | quest ID | Always 0 | Always 0 | |
CONDITION_DRUNKENSTATE | 10 | Sober = 0 |
Always 0 | Always 0 | |
CONDITION_WORLD_STATE | 11 | World state index | World state value | Always 0 | |
CONDITION_ACTIVE_EVENT | 12 | event entry | Always 0 | Always 0 | |
CONDITION_INSTANCE_INFO | 13 | entry (see corresponding source script files for info) | data (see corresponding script source files for more info) | 0 = INSTANCE_INFO_DATA 1 = INSTANCE_INFO_GUID_DATA 2 = INSTANCE_INFO_BOSS_STATE 3 = INSTANCE_INFO_DATA64 |
|
CONDITION_QUEST_NONE | 14 | quest ID | Always 0 | Always 0 | |
CONDITION_CLASS | 15 | Class mask from ChrClass ID Add flags together for all classes where condition is true. |
Always 0 | Always 0 | |
CONDITION_RACE | 16 | Race mask from ChrRace ID Add flags together for all races where condition is true. |
Always 0 | Always 0 | |
CONDITION_ACHIEVEMENT | 17 | Achievement ID | Always 0 | Always 0 | |
CONDITION_TITLE | 18 | CharTitle ID | Always 0 | Always 0 | |
CONDITION_SPAWNMASK | 19 | spawnMask from Creature.spawnMask / Gameobject.spawnMask |
Always 0 | Always 0 | |
CONDITION_GENDER | 20 | 0 = Male 1 = Female 2 = None |
Always 0 | Always 0 | |
CONDITION_UNIT_STATE | 21 | UnitState (enum from Unit.h) | Always 0 | Always 0 | |
CONDITION_MAPID | 22 | Map ID (0=Eastern Kingdoms, 1=Kalimdor, - and so on.) |
Always 0 | Always 0 | |
CONDITION_AREAID | 23 | AreaTable ID | Always 0 | Always 0 | |
CONDITION_CREATURE_TYPE | 24 | creature type True if creature_template.type == ConditionValue1 |
Always 0 | Always 0 | |
CONDITION_SPELL | 25 | Spell ID | Always 0 | Always 0 | |
CONDITION_PHASEMASK | 26 | phasemask value | Always 0 | Always 0 | |
CONDITION_LEVEL | 27 | Player level (1-80 in 3.3.5 || 1-60 in 9.x) | Optional:0 = Level must be equal |
Always 0 | |
CONDITION_QUEST_COMPLETE | 28 | quest ID | Always 0 | Always 0 | |
CONDITION_NEAR_CREATURE | 29 | creature entry | Distance in yards | Alive=0 Dead=1 |
|
CONDITION_NEAR_GAMEOBJECT | 30 | gameobject entry | Distance in yards | Always 0 | |
CONDITION_OBJECT_ENTRY_GUID | 31 | TypeID. Available object types: 3 : TYPEID_UNIT 4 : TYPEID_PLAYER 5 : TYPEID_GAMEOBJECT 7 : TYPEID_CORPSE (player corpse, after spirit release) |
0 = Any object of given TypeID if TypeID = TYPEID_UNIT => creature entry if TypeID = TYPEID_GAMEOBJECT => gameobject entry |
0 = Any object of given type 1 - 500k : creature guid / geobject guid |
|
CONDITION_TYPE_MASK | 32 | TypeMask - a bitmask of following object types: 0x0008 - TYPEMASK_UNIT (8) 0x0010 - TYPEMASK_PLAYER (16) 0x0020 - TYPEMASK_GAMEOBJECT (32) 0x0080 - TYPEMASK_CORPSE (player corpse after spirit release) (128) |
Always 0 | Always 0 | |
CONDITION_RELATION_TO | 33 | Target to which relation is checked. - one of the ConditionTargets available in current SourceType |
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) |
Always 0 | |
CONDITION_REACTION_TO | 34 | Target to which reaction is checked. - one of the ConditionTargets available in current SourceType |
rankMask: This bitmask defines the reaction(s) of the current ConditionTarget to the target specified in ConditionValue1 (which are allowed). Flags for the reactions are: 1 = Hated |
Always 0 | |
CONDITION_DISTANCE_TO | 35 | Target to which distance is checked - one of ConditionTargets available in current SourceType |
Distance. Defines distance between current ConditionTarget and target specified in ConditionValue1 |
ComparisionType: 0 = distance must be equal to ConditionValue2 1 = distance must be higher than ConditionValue2 2 = distance must be lower than ConditionValue2 3 = distance must be equal to or higher than ConditionValue2 4 = distance must be equal to or lower than ConditionValue2 |
|
CONDITION_ALIVE | 36 | Always 0 - Use NegativeCondition and the following settings: NegativeCondition = 0 if target needs to be ALIVE. NegativeCondition = 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. |
Always 0 | Always 0 | |
CONDITION_HP_VAL | 37 | HP value | ComparisionType:
|
Always 0 | |
CONDITION_HP_PCT | 38 | Percentage of max HP | ComparisionType:
|
Always 0 | |
CONDITION_REALM_ACHIEVEMENT | 39 | Achievement ID | Always 0 | Always 0 | |
CONDITION_IN_WATER | 40 | Always 0 - Use NegativeCondition and the following settings: NegativeCondition = 0 If target needs to be on land NegativeCondition = 1 If target needs to be in water |
Always 0 | Always 0 | |
41 | terrainSwap - true if object is in terrainswap [ master only ] | Always 0 | Always 0 | ||
CONDITION_STAND_STATE | 42 | stateType (exact or any): 0 = Exact state used in ConditionValue2 1 = Any type of state in ConditionValue2 |
Exact stand state, or generic state (stand / sit), depending on value 1 0 = Standing 1 = Sitting |
Always 0 | |
CONDITION_DAILY_QUEST_DONE | 43 | quest ID | Always 0 | Always 0 | |
CONDITION_CHARMED | 44 | Always 0 | Always 0 | Always 0 | |
CONDITION_PET_TYPE | 45 | mask | Always 0 | Always 0 | |
CONDITION_TAXI | 46 | Always 0 | Always 0 | Always 0 | |
CONDITION_QUESTSTATE | 47 | quest ID | state_mask: 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 |
Always 0 | |
CONDITION_QUEST_OBJECTIVE_PROGRESS | 48 | quest ID | Objective index (a value from 0 to 3) | Counter | |
CONDITION_DIFFICULTY_ID | 49 | Difficulty (0 None, 1 Normal, etc) | Always 0 | Always 0 | true if target's map has difficulty id |
CONDITION_GAMEMASTER | 50 | canBeGM | Always 0 | Always 0 | true if player is gamemaster (or can be gamemaster) |
CONDITION_OBJECT_ENTRY_GUID | 51 | TypeID | entry | guid | true if object is type TypeID and the entry is 0 or matches entry of the object or matches guid of the object |
CONDITION_TYPE_MASK | 52 | TypeMask | Always 0 | Always 0 | true if object is type object's TypeMask matches provided TypeMask |
53 | SpecieId | count | ComparisonType | true if player has count of battle pet species | |
54 | ScenarioStepId (Only >= 5.0.3) | Always 0 | Always 0 | true if object is at scenario with current step equal to ScenarioStepID |
|
55 | SceneScriptPackageId | Always 0 | Always 0 | true if player is playing a scene with ScriptPackageId equal to given value |
|
56 | PlayerConditionId | Always 0 | Always 0 | true if player satisfies PlayerCondition |
Allows selecting an object for which conditions will be checked. Available objects are dependant on SourceTypeOrReferenceId, for details see respective source type reference.
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.
Id from /src/server/shared/SharedDefines.h#L977. Will be displayed only for the below condition source type:
CONDITION_SOURCE_TYPE_SPELL = 17
Id from /src/server/shared/SharedDefines.h#L1171. Will be displayed only for the below condition source type:
CONDITION_SOURCE_TYPE_SPELL = 17
(ErrorType must be SPELL_FAILED_CUSTOM_ERROR (211) otherwise 0)
The ScriptName this condition uses, if any.
Explanation of this condition or reference