Versiones comparadas

Clave

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

Back-to:World

The `conditions` table

...

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.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_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_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_RACE16Player must be this race. See ChrRaces.dbc .
Add flags together for all races where condition is true.
Always 0Always 0
CONDITION_ACHIEVEMENT17Achievement ID from Achievement.dbcAlways 0Always 0
CONDITION_TITLE18Title ID from CharTitles.dbcAlways 0Always 0
CONDITION_SPAWNMASK19spawnMask from
Creature.spawnMask / Gameobject.spawnMask
Always 0Always 0
CONDITION_GENDER200 = Male, 1 = Female, 2 = NoneAlways 0Always 0
CONDITION_UNIT_STATE21UnitState (enum from Unit.h)Always 0Always 0
CONDITION_MAPID22

Map entry from Map.dbc

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

Always 0Always 0
CONDITION_AREAID23Area ID from AreaTable.dbcAlways 0Always 0
CONDITION_CREATURE_TYPE24

Creature type from creature_template.type

True if creature_template.type == ConditionValue1

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

CONDITION_LEVEL

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_QUEST_COMPLETE28Quest ID - see quest_template.idAlways 0Always 0
CONDITION_NEAR_CREATURE29Creature entry from creature_template.entryDistance in yardsAlive=0 / Dead=1
CONDITION_NEAR_GAMEOBJECT30Gameobject entry from gameobject_template.entryDistance in yardsAlways 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 from creature_template.entry
if TypeID = TYPEID_GAMEOBJECT => Gameobject entry from 
gameobject_template.entry


0 = 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_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
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 target needs to be on land
NegativeCondition = 1 If target needs to be in water

Always 0

Always 0
CONDITION_TERRAIN_SWAP41

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

Always 0Always 0


CONDITION_STAND_STATE


42
stateType (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_QUEST_DONE43Quest ID - see quest_template.idAlways 0Always 0
CONDITION_CHARMED44Always 0Always 0Always 0
CONDITION_PET_TYPE 45maskAlways 0Always 0
CONDITION_TAXI 46Always 0Always 0Always 0
CONDITION_QUESTSTATE 47Quest ID - see quest_template.idstate_maskAlways 0
CONDITION_QUEST_OBJECTIVE_COMPLETE
48

Quest Objective ID - see quest_objectives (6.x / 7.x/ 8.x only)

Quest ID (3.3.5 only)

Objective index (a value from 0 to 3) 3.3.5 onlyCounter (3.3.5 only)

CONDITION_MAX

49



...

    • SourceGroup: ?
    • SourceEntry: Quest id)
    • ConditionTarget: always 0

...

*CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK = 20

...

UNUSED = 20

*CONDITION_SOURCE_TYPE_VEHICLE_SPELL = 21

...

    • 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

...

*CONDITION_WORLD_STATE = 11

    • ConditionValue1: world state index
    • ConditionValue2: world state value
    • ConditionValue3: always 0

*CONDITION_ACTIVE_EVENT= 12

*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_GUID_DATA
      • 2 - INSTANCE_INFO_BOSS_STATE
      • 3 - INSTANCE_INFO_DATA64

*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

...

    • 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

...

    • ConditionValue1: Creature type (creature_template.type). Condition is true if creature_template.type == ConditionValue1
    • 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_GAMEOBJECT = 30

    • ConditionValue1: Gameobject entry
    • ConditionValue2: Distance (yd)
    • ConditionValue3: always 0

*CONDITION_OBJECT_ENTRY_GUID= 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
    • ConditionValue3 0 for any object of given type, any other value to match that guid

*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

*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 = 39

    • ConditionValue1: achievement ID from Achievement.dbc
    • ConditionValue2: always 0
    • ConditionValue3: always 0

*CONDITION_IN_WATER = 40

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

*CONDITION_STAND_STATE = 42

...