Versiones comparadas

Clave

  • Se ha añadido esta línea.
  • Se ha eliminado esta línea.
  • El formato se ha cambiado.

Back-to:WorldBack-to:World

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

...

etc.

Structure

mediumint(8SourceIdConditionTarget

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

int(11)

signed

PRI

NO

0


smart_scripts.source_type || 0 for everything else

ElseGroup

mediumint(8)

unsigned

PRI

NO

0



ConditionTypeOrReference

mediumint(8)

signed

PRI

NO

0

SourceGroup



ConditionTarget

tinyint(3)

unsigned

PRI

NO

0



ConditionValue1

int(10)

unsigned

PRI

NO

0



SourceEntryConditionValue2

mediumintint(810)

signedunsigned

PRI

NO

0



ConditionValue3

int(1110)

signedunsigned

PRI

NO

0



NegativeCondition

tinyint(3)

unsigned


NO

0

smart_scripts.source_type || 0 for everything else


ElseGroupBoolean 0 or 1 (if NegativeCondition

ErrorType

mediumint(8)

unsignedPRI


NO

0



ConditionTypeOrReferenceErrorTextId

mediumint(8)

signedunsigned

PRI


NO

0



ScriptName

tinyintchar(364)

unsigned

PRIsigned


NO0

' '



ConditionValue1Comment

intvarchar(10)

unsigned

PRI

NO

0

ConditionValue2

int(10)

unsigned

PRI

NO

0

ConditionValue3

int(10)

unsigned

PRI

NO

0

NegativeCondition

tinyint(3)

unsigned

NO

0

Boolean 0 or 1 (if NegativeCondition

ErrorType

mediumint(8)

unsigned

NO

0

ErrorTextId

mediumint(8)

unsigned

NO

0

ScriptName

char(64)

signed

NO

' '

Comment

varchar(255)

YES

NULL

Description of the fields

SourceTypeOrReferenceId

if negative, then it is a reference template

...

SourceTypeOrReferenceId

...

255)



YES

NULL



Description of the fields

SourceTypeOrReferenceId

if negative, then it is a reference template

Panel
milling_loot_template.Entry or item id (_loot_template.Item or reference_loot_template.Item)Always Always Always 13Don't use wowhead to get number of effects, data from wowhead sometimes doesn't match real effect number.CREATURETEMPLATE_VEHICLE_SPELL17Always 0Spell ID from Spell.dbcAlways 00 = spell Caster
1 =  Explicit Target of the spell (only for spells which take the object selected by caster into account)CONDITION_SOURCE_TYPE_VEHICLE_SPELL21Spell ID from Spell.dbcAlways 0This will show or hide spells in vehicle spell bar.

SourceTypeOrReferenceId

IDSourceGroupSourceEntrySourceIdConditionTargetNotes
CONDITION_SOURCE_TYPE_NONE0See REFERENCE TEMPLATES(REFERENCE TEMPLATES)Always 0(See below)
Only used in Reference Templates! See below.
CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE1creature_loot_template.Entry or reference_loot_template.Entryitem id (_loot_template.Item or reference_loot_template.Item)Always 0Always 0
CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE2disenchant_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE3fishing_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_CREATUREGAMEOBJECT_LOOT_TEMPLATE14creaturegameobject_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_DISENCHANTITEM_LOOT_TEMPLATE25disenchantitem_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_FISHINGMAIL_LOOT_TEMPLATE36fishingmail_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_GAMEOBJECTMILLING_LOOT_TEMPLATE47gameobjectmilling_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_ITEMPICKPOCKETING_LOOT_TEMPLATE58itempickpocketing_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_MAILPROSPECTING_LOOT_TEMPLATE69mailprospecting_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_MILLINGREFERENCE_LOOT_TEMPLATE710reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_PICKPOCKETINGSKINNING_LOOT_TEMPLATE811pickpocketingskinning_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0
CONDITION_SOURCE_TYPE_PROSPECTINGSPELL_LOOT_TEMPLATE912prospectingspell_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)
Always 0Always 0

CONDITION_SOURCE_TYPE_REFERENCESPELL_LOOTIMPLICIT_TEMPLATETARGET
10reference_loot_template.Entry

13
Mask of effects to be affected by condition:
1 = EFFECT_0, 2 = EFFECT_1, 4 = EFFECT_2
Spell Id from  Spell DBC fileAlways 0

0 : Potential spell Target
1 : spell Caster

Don't use wowhead to get number of effects, data from wowhead sometimes doesn't match real effect number.
CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE11skinning_loot_template.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.ItemGOSSIP_MENU14gossip_menu.entry (gossip menu entry)gossip_menu.text_id (points to npc_text.ID)Always 0

0 = Player
1 = WorldObject


CONDITION_SOURCE_TYPE_SPELLGOSSIP_LOOTMENU_TEMPLATEOPTION1215spellgossip_lootmenu_templateoption.Entry or reference_loot_template.Entry
item id (_loot_template.Item or reference_loot_template.Item)menu_id (menu entry)
gossip_menu_option.idAlways 0

0 = Player
1 = WorldObject


CONDITION_SOURCE_TYPE_SPELLCREATURE_IMPLICITTEMPLATE_TARGETMask of effects to be affected by condition:
1 = EFFECT_0, 2 = EFFECT_1, 4 = EFFECT_2
Spell Id from  Spell DBC fileAlways 0

0 : Potential spell Target
1 : spell Caster

VEHICLE16Always 0creature entry (creature_template.entry)Always 0

0 = Player riding vehicle
1 = Vehicle creature







CONDITION_SOURCE_TYPE_GOSSIP_MENU
14gossip_menu.entry (gossip menu entry)gossip_menu.text_id (points to npc_text.ID)Always 0

0 = Player
1 = WorldObject

CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION15gossip_menu_option.menu_id (menu entry)gossip_menu_option.idAlways 0

0 = Player
1 = WorldObject

SPELL




17





Always 0





Spell ID from Spell.dbc





Always 0



0 = spell Caster
1 =  Explicit Target of the spell (only for spells which take the object selected by caster into account)
  • 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_
16Always 0creature entry (creature_template.entry)Always 0

0 = Player riding vehicle
1 = Vehicle creature

  • IMPLICIT_TARGET instead.
  • If you are looking for old CONDITION_SOURCE_TYPE
  • 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 are 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 ElseGroup value 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_EVENT18creature entry (npc_spellclick_spells.npc_entry)Spell (npc_spellclick_spells.spell_id)Always 00 = Clicker
1 =  Spellclick target (clickee)
CONDITION_SOURCE_TYPE_QUEST_ACCEPT19? (Always 0)Quest IDAlways 0Always 0CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK20? (Always 0)Quest ID
Always 0Always 0creature entry (creature_template.entry)0 = Player for whom spell bar is shown
1 =  Vehicle creature
CONDITION_SOURCE_TYPE_SMART_EVENT22ID (smart_scripts.id) + 1EntryOrGuid (smart_scripts.entryorguid)SourceType (smart_scripts.source_type)0 = Invoker
1 = Object
CONDITION_SOURCE_TYPE_NPC_VENDOR23vendor entry (npc_vendor.entry)item entry (npc_vendor.item)Always 0Always 0CONDITION_SOURCE_TYPE_SPELL_PROC24Always 0Spell ID of aura which triggers the procAlways 00 = Actor
1 = ActionTarget
CONDITION_SOURCE_TYPE_TERRAIN_SWAP (6.x / 7.x only)25terrainSwap - object in terrainswap [ 6.x / 7.x only ](See source code or enter a new description here.)Always 0(source code / new description here)CONDITION_SOURCE_TYPE_PHASE (6.x / 7.x only)26(See source code or enter a new description here.)(See source code or enter a new description here.)Always 0(source code / new description here)CONDITION_SOURCE_TYPE_MAX27(Placeholder)

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).

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
 

Panel
ConditionTypeOrReference (name)ValueConditionValue1ConditionValue2ConditionValue3
CONDITION_NONE0(Never used)(Never used)(Never used)
CONDITION_AURA1Spell ID from Spell.dbcEffect index (0-2)Always 0
CONDITION_ITEM2item entry (item_template.entry)item count0 = not in bank, 1 = in bank
CONDITION_ITEM_EQUIPPED3item entry (item_template.entry)Always 0Always 0
CONDITION_ZONEID4Zone ID where this condition will be true.
  • _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 ElseGroup value 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_EVENT18creature entry (npc_spellclick_spells.npc_entry)Spell (npc_spellclick_spells.spell_id)Always 00 = Clicker
1 =  Spellclick target (clickee)

CONDITION_SOURCE_TYPE_QUEST_ACCEPT19? (Always 0)Quest IDAlways 0Always 0
CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK20? (Always 0)Quest ID
Always 0Always 0

CONDITION_SOURCE_TYPE_VEHICLE_SPELL

21
creature entry (creature_template.entry)
Spell ID from Spell.dbc

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_EVENT22ID (smart_scripts.id) + 1EntryOrGuid (smart_scripts.entryorguid)SourceType (smart_scripts.source_type)0 = Invoker
1 = Object

CONDITION_SOURCE_TYPE_NPC_VENDOR23vendor entry (npc_vendor.entry)item entry (npc_vendor.item)Always 0Always 0
CONDITION_SOURCE_TYPE_SPELL_PROC24Always 0Spell ID of aura which triggers the procAlways 00 = Actor
1 = ActionTarget

CONDITION_SOURCE_TYPE_TERRAIN_SWAP (6.x / 7.x only)25terrainSwap - object in terrainswap [ 6.x / 7.x only ](See source code or enter a new description here.)Always 0(source code / new description here)
CONDITION_SOURCE_TYPE_PHASE (6.x / 7.x only)26(See source code or enter a new description here.)(See source code or enter a new description here.)Always 0(source code / new description here)
CONDITION_SOURCE_TYPE_MAX27



(Placeholder)

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).

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
 

Panel
5Faction template ID from Faction.dbcAlways 0Team id :Alliance = 469 / Horde = 67Required skillDRUNKENSTATEWORLD_STATEWorld state valueACTIVEEVENT12INSTANCE_INFO13entry (see corresponding source script files for info)data (see corresponding script source files for more info)CLASS15RACEPlayer must be this race. See ChrRaces.dbc .
Add flags together for all races where condition is true.ACHIEVEMENT17TITLETitle ID from CharTitles.dbc0 = Male, 1 = Female, 2 = NoneAlways 0Creature type 27Player level (1-80 in 3.3.5 || 1-110 in 7.x)CONDITION_OBJECT_ENTRY_GUID310 = Any object of given TypeID
if TypeID = TYPEID_UNIT => Creature entry from creature_template.entry
if TypeID = TYPEID_GAMEOBJECT => Gameobject entry from 
gameobject_template.entry0 = Any object of given type

1 - 500k : creature / gameobject GUID

CONDITION_TYPE_MASK32Always 0Always 0CONDITION_RELATION_TO33Target to which relation is checked.
- one of the ConditionTargets available in current SourceTypeAlways 0CONDITION_REACTION_TO34Target to which reaction is checked.
- one of the ConditionTargets available in current SourceType
Always 0CONDITION_DISTANCE_TO35Target to which distance is checked
- one of ConditionTargets available in current SourceTypeDistance.
Defines distance between current ConditionTarget and target specified in ConditionValue1CONDITION_ALIVE37HP value38Percentage of max HPComparisionType:
  • 0 = Percentage of max HP must be equal
  • 1 = Percentage of max HP must be higher
  • 2 = Percentage of max HP must be lower
  • 3 = Percentage of max HP must be equal or higher
  • 4 = Percentage of max HP must be equal or lower40terrainSwap - true if object is in terrainswap [ 6.x only ]42
    ConditionTypeOrReference (name)ValueConditionValue1ConditionValue2ConditionValue3
    CONDITION_NONE0(Never used)(Never used)(Never used)
    CONDITION_AURA1Spell ID from Spell.dbcEffect index (0-2)Always 0
    CONDITION_ITEM2item entry (item_template.entry)item count0 = not in bank, 1 = in bank
    CONDITION_ITEM_EQUIPPED3item entry (item_template.entry)Always 0Always 0
    CONDITION_ZONEID4Zone ID where this condition will be true.Always 0Always 0





    CONDITION_REPUTATION_RANK





    5






    Faction template ID from Faction.dbc

    rank:
    1 = Hated
    2 = Hostile
    4 = Unfriendly
    8 = Neutral
    16 = Friendly
    32 = Honored
    64 = Revered
    128 = Exalted

    Add the target ranks together for the condition to be true for all those ranks.






    Always 0
    CONDITION_TEAM6Team id :Alliance = 469 / Horde = 67Always 0Always 0
    CONDITION_SKILL7Required skill. See SkillLine.dbc .Skill rank value (e.g. from 1 to 450 for the 3.3.5 branch)Always 0
    CONDITION_QUESTREWARDED8Quest ID - see quest_template.idAlways 0Always 0
    CONDITION_QUESTTAKEN9Quest ID - see quest_template.idAlways 0Always 0
    CONDITION_DRUNKENSTATE10Sober=0; Tipsy=1, Drunk=2, Smashed=3Always 0Always 0
    CONDITION_WORLD_STATE11World state indexWorld state valueAlways 0
    CONDITION_ACTIVE_EVENT12Event entry (game_event.eventEntry)Always 0Always 0

    CONDITION_REPUTATIONINSTANCE_RANKINFO

    rank:
    1 = Hated
    2 = Hostile
    4 = Unfriendly
    8 = Neutral
    16 = Friendly
    32 = Honored
    64 = Revered
    128 = Exalted

    Add the target ranks together for the condition to be true for all those ranks.

    CONDITION_TEAM613
    entry
    (see corresponding source script files for info)

    data
    (see corresponding script source files for more info)

    0 = INSTANCE_INFO_DATA
    1 = INSTANCE_INFO_DATA64
    2 = INSTANCE_INFO_BOSS_STATE

    CONDITION_QUEST_NONE14Quest ID - see quest_template.idAlways 0Always 0

    CONDITION_CLASS

    15
    Class mask from ChrClasses.dbc
    Add flags together for all classes where condition is true.

    Always 0

    Always 0
    CONDITION_SKILLRACE716Player must be this race. See SkillLineChrRaces.dbc .
    Skill rank value (e.g. from 1 to 450 for the 3.3.5 branch)Add flags together for all races where condition is true.
    Always 0Always 0
    CONDITION_QUESTREWARDEDACHIEVEMENT817Quest ID - see quest_template.idAchievement ID from Achievement.dbcAlways 0Always 0
    CONDITION_QUESTTAKENTITLE918Quest ID - see quest_template.idTitle ID from CharTitles.dbcAlways 0Always 0
    CONDITION_10Sober=0; Tipsy=1, Drunk=2, Smashed=3SPAWNMASK19spawnMask from
    Creature.spawnMask / Gameobject.spawnMask
    Always 0Always 0
    CONDITION_GENDER11World state index200 = Male, 1 = Female, 2 = NoneAlways 0Always 0
    CONDITION_UNIT_STATE21Event entry (game_event.eventEntryUnitState (enum from Unit.h)Always 0Always 0
    CONDITION_MAPID22

    0 = INSTANCE_INFO_DATA
    1 = INSTANCE_INFO_DATA64
    2 = INSTANCE_INFO_BOSS_STATE

    CONDITION_QUEST_NONE14Quest ID - see quest_template.id

    Map entry from Map.dbc

    (0=Eastern Kingdoms, 1=Kalimdor, - and so on.)

    Always 0Always 0
    CONDITION_AREAID23Class mask Area ID from ChrClassesAreaTable.dbc
    Add flags together for all classes where condition is true.
    Always 0Always 0
    CONDITION_CREATURE_TYPE1624

    Creature type from creature_template.type

    True if creature_template.type == ConditionValue1

    Always 0Always 0
    CONDITION_SPELL25Achievement Spell ID from AchievementSpell.dbcAlways 0Always 0
    CONDITION_PHASEMASK1826phasemask valueAlways 0Always 0

    CONDITION_SPAWNMASK
    19spawnMask from
    Creature.spawnMask / Gameobject.spawnMask
    Always 0LEVEL
    27

    Player level (1-80 in 3.3.5 || 1-110 in 7.x)
    Optional: 0 = Level must be equal, 1 = Level must be higher, 2 = Level must be lower,
    3 = Level must be higher or equal, 4 = Level must be lower or equal.
    Always 0
    CONDITION_GENDERQUEST_COMPLETE2028Quest ID - see quest_template.idAlways 0Always 0
    CONDITION_UNITNEAR_STATECREATURE21UnitState (enum from Unit.h)29Creature entry from creature_template.entryDistance in yardsAlways 0
    CONDITION_NEAR_MAPIDGAMEOBJECT2230

    Map entry from Map.dbc

    (0=Eastern Kingdoms, 1=Kalimdor, - and so on.)

    Always 0Gameobject entry from gameobject_template.entryDistance in yardsAlways 0


    CONDITION_OBJECT_AREAIDENTRY_GUID
    23Area ID from AreaTable.dbcAlways 0Always 0

    CONDITION_CREATURE_TYPE2431

    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 from creature_template.typeentry
    True if creatureif TypeID = TYPEID_GAMEOBJECT => Gameobject entry from gameobject_template.type == ConditionValue1entry


    Always

    0

    Always 0
    CONDITION_SPELL25Spell ID from Spell.dbcAlways 0Always 0
    CONDITION_PHASEMASK26phasemask value

    = Any object of given type

    1 - 500k : creature / gameobject 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_LEVELRELATION_TO
    Optional: 0 = Level must be equal, 1 = Level must be higher, 2 = Level must be lower,
    3 = Level must be higher or equal, 4 = Level must be lower or equal.
    Always 0
    CONDITION_QUEST_COMPLETE28Quest ID - see quest_template.idAlways 0Always 0
    CONDITION_NEAR_CREATURE29Creature entry from creature_template.entryDistance in yardsAlways 0
    CONDITION_NEAR_GAMEOBJECT30Gameobject entry from gameobject_template.entryDistance in yardsAlways 0



    TypeID. Available object types:
    3 : TYPEID_UNIT
    4 : TYPEID_PLAYER
    5 : TYPEID_GAMEOBJECT
    7 : TYPEID_CORPSE (player corpse, after spirit release)

    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)

    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)

    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
    2 = Hostile
    4 = Unfriendly
    8 = Neutral
    16 = Friendly
    32 = Honored
    64 = Revered
    128 = Exalted

    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

    3633




    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
    2 = Hostile
    4 = Unfriendly
    8 = Neutral
    16 = Friendly
    32 = Honored
    64 = Revered
    128 = Exalted





    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:
    • 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



    Always 0



    CONDITION_HP_PCT



    38



    Percentage of max 
    HP
    ComparisionType:
    • 0 = Percentage of max HP must be equal
    • 1 = Percentage of max HP must be higher
    • 2 = Percentage of max HP must be lower
    • 3 = Percentage of max HP must be equal or higher
    • 4 = Percentage of max HP must be equal or lower



    Always 0
    CONDITION_REALM_ACHIEVEMENT39Achievement ID from Achievement.dbcAlways 0Always 0

    CONDITION_IN_WATER

    40
    Always 0 - Use NegativeCondition and the following settings:
    NegativeCondition = 0
    if 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.  on land
    NegativeCondition = 1 If target needs to be in water

    Always 0

    Always 0
    CONDITION_HPTERRAIN_VALSWAPComparisionType:
    • 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
    41

    terrainSwap - true if object is in terrainswap [ 6.x only ]

    Always 0Always 0


    CONDITION_

    HP

    STAND_

    PCT

    STATE


    42stateType (exact or any): 0 = Exact state used in ConditionValue2 1 = Any type of state in ConditionValue2Exact stand state, or generic state (stand / sit), depending on value 1
    0 = Standing 1 = Sitting

    Always 0
    CONDITION_DAILY_REALMQUEST_ACHIEVEMENTDONE3943Achievement ID from Achievement.dbcQuest ID - see quest_template.idAlways 0Always 0
    CONDITION_IN_WATERCHARMED44Always 0Always 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
    CONDITION_PET_TYPE 45maskAlways 0Always 0
    CONDITION_TERRAIN_SWAPTAXI 4146Always 0Always 0Always 0
    CONDITION_STAND_STATEstateType (exact or any): 0 = Exact state used in ConditionValue2 1 = Any type of state in ConditionValue2Exact stand state, or generic state (stand / sit), depending on value 1
    0 = Standing 1 = SittingQUESTSTATE
    47Quest ID - see quest_template.idstate_maskAlways 0
    CONDITION_QUEST_OBJECTIVE_COMPLETE 48Quest Objective ID - see quest_objectivesAlways 0Always 0

    CONDITION_MAX

    4349


    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: 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

    ...

      • ConditionValue1: Creature type (creature_template.type). Condition is true if creature_template.type == ConditionValue1
      • ConditionValue2: always 0
      • ConditionValue3: always 0

    ...