目录

conditions

<-Back-to:World

The `conditions` table

This table allows you to define conditions for various systems - Gossip, loot etc.

Structure

<table> <tbody> <tr class=“odd”> <td><p><strong>Field</strong></p></td> <td><p><strong>Type</strong></p></td> <td><p><strong>Attributes</strong></p></td> <td><p><strong>Key</strong></p></td> <td><p><strong>Null</strong></p></td> <td><p><strong>Default</strong></p></td> <td><p><strong>Extra</strong></p></td> <td><p><strong>Comment</strong></p></td> </tr> <tr class=“even”> <td><p><a href=“#sourcetypeorreferenceid”>SourceTypeOrReferenceId</a></p></td> <td><p>MEDIUMINT</p></td> <td><p>SIGNED</p></td> <td><p>PRI</p></td> <td><p>NO</p></td> <td><p>0</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> </tr> <tr class=“odd”> <td><p><a href=“#sourcegroup”>SourceGroup</a></p></td> <td><p>MEDIUMINT</p></td> <td><p>UNSIGNED</p></td> <td><p>PRI</p></td> <td><p>NO</p></td> <td><p>0</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> </tr> <tr class=“even”> <td><p><a href=“#sourceentry”>SourceEntry</a></p></td> <td><p>MEDIUMINT</p></td> <td><p>SIGNED</p></td> <td><p>PRI</p></td> <td><p>NO</p></td> <td><p>0</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> </tr> <tr class=“odd”> <td><p><a href=“#condition_source_type_smart_event=22”>SourceId</a></p></td> <td><p>INT</p></td> <td><p>SIGNED</p></td> <td><p>PRI</p></td> <td><p>NO</p></td> <td><p>0</p></td> <td><p><br /> </p></td> <td><p><a href=“http://www.azerothcore.org/wiki/smart_scripts#source_type”>smart_scripts.source_type</a> <strong>||</strong> 0 for everything else</p></td> </tr> <tr class=“even”> <td><p><a href=“#elsegroup”>ElseGroup</a></p></td> <td><p>MEDIUMINT</p></td> <td><p>UNSIGNED</p></td> <td><p>PRI</p></td> <td><p>NO</p></td> <td><p>0</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> </tr> <tr class=“odd”> <td><p><a href=“#conditiontypeorreference”>ConditionTypeOrReference</a></p></td> <td><p>MEDIUMINT</p></td> <td><p>SIGNED</p></td> <td><p>PRI</p></td> <td><p>NO</p></td> <td><p>0</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> </tr> <tr class=“even”> <td><p><a href=“#conditiontarget”>ConditionTarget</a></p></td> <td><p>TINYINT</p></td> <td><p>UNSIGNED</p></td> <td><p>PRI</p></td> <td><p>NO</p></td> <td><p>0</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> </tr> <tr class=“odd”> <td><p><a href=“#conditionvalue1”>ConditionValue1</a></p></td> <td><p>INT</p></td> <td><p>UNSIGNED</p></td> <td><p>PRI</p></td> <td><p>NO</p></td> <td><p>0</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> </tr> <tr class=“even”> <td><p><a href=“#conditionvalue2”>ConditionValue2</a></p></td> <td><p>INT</p></td> <td><p>UNSIGNED</p></td> <td><p>PRI</p></td> <td><p>NO</p></td> <td><p>0</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> </tr> <tr class=“odd”> <td><p><a href=“#conditionvalue3”>ConditionValue3</a></p></td> <td><p>INT</p></td> <td><p>UNSIGNED</p></td> <td><p>PRI</p></td> <td><p>NO</p></td> <td><p>0</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> </tr> <tr class=“even”> <td><p><a href=“#negativecondition”>NegativeCondition</a></p></td> <td><p>TINYINT</p></td> <td><p>UNSIGNED</p></td> <td><p><br /> </p></td> <td><p>NO</p></td> <td><p>0</p></td> <td><p><br /> </p></td> <td><p>Boolean 0 or 1 (if <a href=“#negativecondition”>NegativeCondition</a></p></td> </tr> <tr class=“odd”> <td><p><a href=“#errortype”>ErrorType</a></p></td> <td><p>MEDIUMINT</p></td> <td><p>UNSIGNED</p></td> <td><p><br /> </p></td> <td><p>NO</p></td> <td><p>0</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> </tr> <tr class=“even”> <td><p><a href=“#errortextid”>ErrorTextId</a></p></td> <td><p>MEDIUMINT</p></td> <td><p>UNSIGNED</p></td> <td><p><br /> </p></td> <td><p>NO</p></td> <td><p>0</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> </tr> <tr class=“odd”> <td><p><a href=“#scriptname”>ScriptName</a></p></td> <td><p>char(64)</p></td> <td><p>SIGNED</p></td> <td><p><br /> </p></td> <td><p>NO</p></td> <td><p>' '</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> </tr> <tr class=“even”> <td><p><a href=“#comment”>Comment</a></p></td> <td><p>VARCHAR(255)</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> <td><p>YES</p></td> <td><p>NULL</p></td> <td><p><br /> </p></td> <td><p><br /> </p></td> </tr> </tbody> </table>

Description of the fields

SourceTypeOrReferenceId

if negative, then it is a reference template.

<table> <thead> <tr class=“header”> <th><h3 id=“conditions-SourceTypeOrReferenceId.1”>SourceTypeOrReferenceId</h3></th> <th>ID</th> <th>SourceGroup</th> <th>SourceEntry</th> <th><a href=“http://www.azerothcore.org/wiki/conditions#condition_source_type_smart_event=22”>SourceId</a></th> <th>ConditionTarget</th> <th>Notes</th> </tr> </thead> <tbody> <tr class=“odd”> <td>CONDITION_SOURCE_TYPE_NONE</td> <td>0</td> <td><strong><a href=“#referencetemplates”>See REFERENCE TEMPLATES</a></strong></td> <td>(REFERENCE TEMPLATES)</td> <td>Always 0</td> <td>(See below)</td> <td><strong>Only used in <a href=“#referencetemplates”>Reference Templates! See below.</a></strong></td> </tr> <tr class=“even”> <td>CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE</td> <td>1</td> <td><a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Entry”>creature_loot_template.Entry or reference_loot_template.Entry</a></td> <td>item id (<a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Item”>_loot_template.Item or reference_loot_template.Item)</a></td> <td>Always 0</td> <td>Always 0</td> <td><br /> </td> </tr> <tr class=“odd”> <td>CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE</td> <td>2</td> <td><a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Entry”>disenchant_loot_template.Entry or reference_loot_template.Entry</a></td> <td>item id (<a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Item”>_loot_template.Item or reference_loot_template.Item)</a></td> <td>Always 0</td> <td>Always 0</td> <td><br /> </td> </tr> <tr class=“even”> <td>CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE</td> <td>3</td> <td><a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Entry”>fishing_loot_template.Entry or reference_loot_template.Entry</a></td> <td>item id (<a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Item”>_loot_template.Item or reference_loot_template.Item)</a></td> <td>Always 0</td> <td>Always 0</td> <td><br /> </td> </tr> <tr class=“odd”> <td>CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE</td> <td>4</td> <td><a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Entry”>gameobject_loot_template.Entry or reference_loot_template.Entry</a></td> <td>item id (<a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Item”>_loot_template.Item or reference_loot_template.Item)</a></td> <td>Always 0</td> <td>Always 0</td> <td><br /> </td> </tr> <tr class=“even”> <td>CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE</td> <td>5</td> <td><a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Entry”>item_loot_template.Entry or reference_loot_template.Entry</a></td> <td>item id (<a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Item”>_loot_template.Item or reference_loot_template.Item)</a></td> <td>Always 0</td> <td>Always 0</td> <td><br /> </td> </tr> <tr class=“odd”> <td>CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE</td> <td>6</td> <td><a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Entry”>mail_loot_template.Entry or reference_loot_template.Entry</a></td> <td>item id (<a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Item”>_loot_template.Item or reference_loot_template.Item)</a></td> <td>Always 0</td> <td>Always 0</td> <td><br /> </td> </tr> <tr class=“even”> <td>CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE</td> <td>7</td> <td><a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Entry”>milling_loot_template.Entry or reference_loot_template.Entry</a></td> <td>item id (<a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Item”>_loot_template.Item or reference_loot_template.Item)</a></td> <td>Always 0</td> <td>Always 0</td> <td><br /> </td> </tr> <tr class=“odd”> <td>CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE</td> <td>8</td> <td><a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Entry”>pickpocketing_loot_template.Entry or reference_loot_template.Entry</a></td> <td>item id (<a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Item”>_loot_template.Item or reference_loot_template.Item)</a></td> <td>Always 0</td> <td>Always 0</td> <td><br /> </td> </tr> <tr class=“even”> <td>CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE</td> <td>9</td> <td><a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Entry”>prospecting_loot_template.Entry or reference_loot_template.Entry</a></td> <td>item id (<a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Item”>_loot_template.Item or reference_loot_template.Item)</a></td> <td>Always 0</td> <td>Always 0</td> <td><br /> </td> </tr> <tr class=“odd”> <td>CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE</td> <td>10</td> <td><a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Entry”>reference_loot_template.Entry</a></td> <td>item id (<a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Item”>_loot_template.Item or reference_loot_template.Item)</a></td> <td>Always 0</td> <td>Always 0</td> <td><br /> </td> </tr> <tr class=“even”> <td>CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE</td> <td>11</td> <td><a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Entry”>skinning_loot_template.Entry or reference_loot_template.Entry</a></td> <td>item id (<a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Item”>_loot_template.Item or reference_loot_template.Item)</a></td> <td>Always 0</td> <td>Always 0</td> <td><br /> </td> </tr> <tr class=“odd”> <td>CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE</td> <td>12</td> <td><a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Entry”>spell_loot_template.Entry or reference_loot_template.Entry</a></td> <td>item id (<a href=“http://www.azerothcore.org/wiki/loot_template#loot_template-Item”>_loot_template.Item or reference_loot_template.Item)</a></td> <td>Always 0</td> <td>Always 0</td> <td><br /> </td> </tr> <tr class=“even”> <td><br /> CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET</td> <td><br /> 13</td> <td>Mask of effects to be affected by condition:<br /> 1 = EFFECT_0, 2 = EFFECT_1, 4 = EFFECT_2</td> <td>Spell Id from  <a href=“Spell”>Spell.dbc</a></td> <td>Always 0</td> <td><p>0 : Potential spell Target<br /> 1 : spell Caster</p></td> <td>Don't use wowhead to get number of effects, data from wowhead sometimes doesn't match real effect number.</td> </tr> <tr class=“odd”> <td>CONDITION_SOURCE_TYPE_GOSSIP_MENU</td> <td>14</td> <td><a href=“http://www.azerothcore.org/wiki/gossip_menu#MenuID”>gossip_menu.MenuID</a></td> <td><a href=“http://www.azerothcore.org/wiki/gossip_menu#TextID”>gossip_menu.TextID</a> (points to npc_text.ID)</td> <td>Always 0</td> <td><p>0 = Player<br /> 1 = WorldObject</p></td> <td><br /> </td> </tr> <tr class=“even”> <td>CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION</td> <td>15</td> <td><a href=“http://www.azerothcore.org/wiki/gossip_menu_option#MenuID”>gossip_menu_option.MenuID</a></td> <td><a href=“http://www.azerothcore.org/wiki/gossip_menu_option#OptionID”>gossip_menu_option.OptionID</a></td> <td>Always 0</td> <td><p>0 = Player<br /> 1 = WorldObject</p></td> <td><br /> </td> </tr> <tr class=“odd”> <td>CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE</td> <td>16</td> <td>Always 0</td> <td>creature entry (<a href=“http://www.azerothcore.org/wiki/creature_template#creature_template-entry”>creature_template.entry</a>)</td> <td>Always 0</td> <td><p>0 = Player riding vehicle<br /> 1 = Vehicle creature</p></td> <td><br /> </td> </tr> <tr class=“even”> <td><br /> <br /> <br /> <br /> <br /> CONDITION_SOURCE_TYPE_SPELL</td> <td><br /> <br /> <br /> <br /> <br /> 17</td> <td>Always 0</td> <td><br /> <br /> <br /> <br /> <br /> Spell ID from <a href=“http://www.azerothcore.org/wiki/Spell”>Spell.dbc</a></td> <td>Always 0</td> <td><br /> <br /> <br /> 0 = spell Caster<br /> 1 =  Explicit Target of the spell (only for spells which take the object selected by caster into account)</td> <td><ul> <li>This source type allows you to define caster/explicit target requirements for spell to be cast.</li> <li>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.</li> <li>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).</li> <li>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.</li> </ul></td> </tr> <tr class=“odd”> <td>CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT</td> <td>18</td> <td>creature entry (<a href=“http://www.azerothcore.org/wiki/npc_spellclick_spells#npc_entry”>npc_spellclick_spells.npc_entry</a>)</td> <td>Spell (<a href=“http://www.azerothcore.org/wiki/npc_spellclick_spells#spell_id”>npc_spellclick_spells.spell_id</a>)</td> <td>Always 0</td> <td>0 = Clicker<br /> 1 =  Spellclick target (clickee)</td> <td><br /> </td> </tr> <tr class=“even”> <td>CONDITION_SOURCE_TYPE_QUEST_AVAILABLE</td> <td>19</td> <td>Always 0</td> <td><a href=“http://www.azerothcore.org/wiki/quest_template#id”>Quest ID</a></td> <td>Always 0</td> <td>Always 0</td> <td>Condition must be met for quest to be available to player.</td> </tr> <tr class=“odd”> <td>CONDITION_SOURCE_TYPE_UNUSED_20</td> <td>20</td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr class=“even”> <td><br /> CONDITION_SOURCE_TYPE_VEHICLE_SPELL</td> <td><br /> 21</td> <td>creature entry (<a href=“http://www.azerothcore.org/wiki/creature_template#creature_template-entry”>creature_template.entry</a>)</td> <td><br /> Spell ID from <a href=“http://www.azerothcore.org/wiki/Spell”>Spell.dbc</a></td> <td>Always 0</td> <td>0 = Player for whom spell bar is shown1 =  Vehicle creature</td> <td><br /> This will show or hide spells in vehicle spell bar.</td> </tr> <tr class=“odd”> <td>CONDITION_SOURCE_TYPE_SMART_EVENT</td> <td>22</td> <td>ID (<a href=“http://www.azerothcore.org/wiki/smart_scripts#id”>smart_scripts.id</a>) + 1</td> <td>EntryOrGuid (<a href=“http://www.azerothcore.org/wiki/smart_scripts#entryorguid”>smart_scripts.entryorguid</a>)</td> <td>SourceType (<a href=“http://www.azerothcore.org/wiki/smart_scripts#source_type”>smart_scripts.source_type</a>)</td> <td>0 = Invoker<br /> 1 = Object</td> <td><br /> </td> </tr> <tr class=“even”> <td>CONDITION_SOURCE_TYPE_NPC_VENDOR</td> <td>23</td> <td>vendor entry (<a href=“http://www.azerothcore.org/wiki/npc_vendor#entry”>npc_vendor.entry</a>)</td> <td>item entry (<a href=“http://www.azerothcore.org/wiki/npc_vendor#item”>npc_vendor.item</a>)</td> <td>Always 0</td> <td>Always 0</td> <td><br /> </td> </tr> <tr class=“odd”> <td>CONDITION_SOURCE_TYPE_SPELL_PROC</td> <td>24</td> <td>Always 0</td> <td>Spell ID of aura which triggers the proc</td> <td>Always 0</td> <td>0 = Actor<br /> 1 = ActionTarget</td> <td><br /> </td> </tr> <tr class=“even”> <td>CONDITION_SOURCE_TYPE_MAX</td> <td>27</td> <td><br /> </td> <td><br /> </td> <td><br /> </td> <td><br /> </td> <td>(Placeholder)</td> </tr> </tbody> </table>

SourceGroup

See above.

SourceEntry

See above.

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

 

<table> <thead> <tr class=“header”> <th>ConditionTypeOrReference (name)</th> <th>Value</th> <th>ConditionValue1</th> <th>ConditionValue2</th> <th>ConditionValue3</th> </tr> </thead> <tbody> <tr class=“odd”> <td>CONDITION_NONE</td> <td>0</td> <td>(Never used)</td> <td>(Never used)</td> <td>(Never used)</td> </tr> <tr class=“even”> <td>CONDITION_AURA</td> <td>1</td> <td>Spell ID from <a href=“http://www.azerothcore.org/wiki/Spell”>Spell.dbc</a></td> <td>Effect index (0-2)</td> <td>Always 0</td> </tr> <tr class=“odd”> <td>CONDITION_ITEM</td> <td>2</td> <td>item entry (<a href=“http://www.azerothcore.org/wiki/item_template#entry”>item_template.entry</a>)</td> <td>item count</td> <td>0 = not in bank, 1 = in bank</td> </tr> <tr class=“even”> <td>CONDITION_ITEM_EQUIPPED</td> <td>3</td> <td>item entry (<a href=“http://www.azerothcore.org/wiki/item_template#entry”>item_template.entry</a>)</td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“odd”> <td>CONDITION_ZONEID</td> <td>4</td> <td>Zone ID where this condition will be true.</td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td><br /> <br /> <br /> <br /> <br /> CONDITION_REPUTATION_RANK</td> <td><br /> <br /> <br /> <br /> <br /> 5</td> <td><p><br /> <br /> <br /> <br /> <br /> Faction template ID from <a href=“http://www.azerothcore.org/wiki/Faction”>Faction.dbc</a></p></td> <td><pre>

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

</pre> <p>Add the target ranks together for the condition to be true for all those ranks.</p></td> <td>Always 0</td> </tr> <tr class=“odd”> <td>CONDITION_TEAM</td> <td>6</td> <td>Team id :Alliance = 469 / Horde = 67</td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td>CONDITION_SKILL</td> <td>7</td> <td>Required skill. See <a href=“http://www.azerothcore.org/wiki/SkillLine”>SkillLine.dbc</a> .</td> <td>Skill rank value (e.g. from 1 to 450 for the 3.3.5 branch)</td> <td>Always 0</td> </tr> <tr class=“odd”> <td>CONDITION_QUESTREWARDED</td> <td>8</td> <td>Quest ID - see <a href=“http://www.azerothcore.org/wiki/quest_template#id”>quest_template.id</a></td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td>CONDITION_QUESTTAKEN</td> <td>9</td> <td>Quest ID - see <a href=“http://www.azerothcore.org/wiki/quest_template#id”>quest_template.id</a></td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“odd”> <td>CONDITION_DRUNKENSTATE</td> <td>10</td> <td>Sober=0; Tipsy=1, Drunk=2, Smashed=3</td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td>CONDITION_WORLD_STATE</td> <td>11</td> <td>World state index</td> <td>World state value</td> <td>Always 0</td> </tr> <tr class=“odd”> <td>CONDITION_ACTIVE_EVENT</td> <td>12</td> <td>Event entry (<a href=“http://www.azerothcore.org/wiki/game_event#evententry”>game_event.eventEntry</a>)</td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td><br /> CONDITION_INSTANCE_INFO</td> <td><br /> 13</td> <td><strong><br /> entry</strong> (see corresponding source script files for info)</td> <td><strong><br /> data</strong> (see corresponding script source files for more info)</td> <td><p>0=INSTANCE_INFO_DATA</p> <p>1=INSTANCE_INFO_GUID_DATA</p> <p>2=INSTANCE_INFO_BOSS_STATE</p> <p>3=INSTANCE_INFO_DATA64</p></td> </tr> <tr class=“odd”> <td>CONDITION_QUEST_NONE</td> <td>14</td> <td>Quest ID - see <a href=“http://www.azerothcore.org/wiki/quest_template#id”>quest_template.id</a></td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td><br /> CONDITION_CLASS</td> <td><br /> 15</td> <td>Class mask from <a href=“http://www.azerothcore.org/wiki/chrclasses”>ChrClasses.dbc</a><br /> Add flags together for all classes where condition is true.</td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“odd”> <td>CONDITION_RACE</td> <td>16</td> <td>Race mask from <a href=“http://www.azerothcore.org/wiki/chrraces”>ChrRaces.dbc</a> .<br /> Add flags together for all races where condition is true.</td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td>CONDITION_ACHIEVEMENT</td> <td>17</td> <td>Achievement ID from <a href=“http://www.azerothcore.org/wiki/Achievement”>Achievement.dbc</a></td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“odd”> <td>CONDITION_TITLE</td> <td>18</td> <td>Title ID from <a href=“http://www.azerothcore.org/wiki/CharTitles”>CharTitles.dbc</a></td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td>CONDITION_SPAWNMASK</td> <td>19</td> <td>spawnMask from<br /> <a href=“http://www.azerothcore.org/wiki/creature#spawnmask”>Creature.spawnMask</a> / <a href=“http://www.azerothcore.org/wiki/gameobject#spawnmask”>Gameobject.spawnMask</a></td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“odd”> <td>CONDITION_GENDER</td> <td>20</td> <td>0 = Male, 1 = Female, 2 = None</td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td>CONDITION_UNIT_STATE</td> <td>21</td> <td>UnitState (<a href=“https://github.com/azerothcore/azerothcore-wotlk/blob/master/src/server/game/Entities/Unit/Unit.h#L498”>enum from Unit.h</a>)</td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“odd”> <td>CONDITION_MAPID</td> <td>22</td> <td><p>Map entry from Map.dbc</p> <p>(0=Eastern Kingdoms, 1=Kalimdor, - and so on.)</p></td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td>CONDITION_AREAID</td> <td>23</td> <td>Area ID from AreaTable.dbc</td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“odd”> <td>CONDITION_CREATURE_TYPE</td> <td>24</td> <td><p>Creature type from <a href=“http://www.azerothcore.org/wiki/creature_template#creature_template-type”>creature_template.type</a></p> <p>True if creature_template.type == ConditionValue1</p></td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td>CONDITION_SPELL</td> <td>25</td> <td>Spell ID from <a href=“http://www.azerothcore.org/wiki/Spell”>Spell.dbc</a></td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“odd”> <td>CONDITION_PHASEMASK</td> <td>26</td> <td>phasemask value</td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td><br /> CONDITION_LEVEL</td> <td><br /> 27</td> <td><br /> Player level (1-80 in 3.3.5)</td> <td>Optional: 0 = Level must be equal, 1 = Level must be higher, 2 = Level must be lower,<br /> 3 = Level must be higher or equal, 4 = Level must be lower or equal.</td> <td>Always 0</td> </tr> <tr class=“odd”> <td>CONDITION_QUEST_COMPLETE</td> <td>28</td> <td>Quest ID - see <a href=“http://www.azerothcore.org/wiki/quest_template#id”>quest_template.id</a></td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td>CONDITION_NEAR_CREATURE</td> <td>29</td> <td>Creature entry from <a href=“http://www.azerothcore.org/wiki/creature_template#creature_template-entry”>creature_template.entry</a></td> <td>Distance in yards</td> <td>Alive=0 / Dead=1</td> </tr> <tr class=“odd”> <td>CONDITION_NEAR_GAMEOBJECT</td> <td>30</td> <td>Gameobject entry from <a href=“http://www.azerothcore.org/wiki/gameobject_template#entry”>gameobject_template.entry</a></td> <td>Distance in yards</td> <td>GoState<br/><br/> 0 = ignore, 1 = Ready, 2 = Not Ready</td> </tr> <tr class=“even”> <td><br /> <br /> CONDITION_OBJECT_ENTRY_GUID</td> <td><br /> <br /> 31</td> <td><p>TypeID. Available object types:<br /> 3 : TYPEID_UNIT<br /> 4 : TYPEID_PLAYER<br /> 5 : TYPEID_GAMEOBJECT<br /> 7 : TYPEID_CORPSE (player corpse, after spirit release)</p></td> <td><p><br /> 0 = Any object of given TypeID<br /> if TypeID = TYPEID_UNIT ⇒ Creature entry from <a href=“http://www.azerothcore.org/wiki/creature_template#creature_template-entry”>creature_template.entry<br /> if TypeID = TYPEID_GAMEOBJECT ⇒ Gameobject entry from </a><a href=“http://www.azerothcore.org/wiki/gameobject_template#entry”>gameobject_template.entry</a></p></td> <td><p><br /> 0 = Any object of given type</p> <p>1 - 500k : creature / gameobject GUID</p></td> </tr> <tr class=“odd”> <td><br /> <br /> CONDITION_TYPE_MASK</td> <td><br /> <br /> 32</td> <td><p>TypeMask - a bitmask of following object types:<br /> 0x0008 - TYPEMASK_UNIT (8)<br /> 0x0010 - TYPEMASK_PLAYER (16)<br /> 0x0020 - TYPEMASK_GAMEOBJECT (32)<br /> 0x0080 - TYPEMASK_CORPSE (player corpse after spirit release) (128)</p></td> <td>Always 0</td> <td>Always 0</td> </tr> <tr class=“even”> <td><br /> <br /> <br /> CONDITION_RELATION_TO</td> <td><br /> <br /> <br /> 33</td> <td><p><br /> <br /> <br /> Target to which relation is checked.<br />

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

See below

ConditionValue2

See below

ConditionValue3

See below

NegativeCondition

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.

ErrorType

Id from /src/server/game/Miscellaneous/SharedDefines.h#L830. Will be displayed only for the below condition source type:

CONDITION_SOURCE_TYPE_SPELL = 17

ErrorTextId

Id from /src/server/game/Miscellaneous/SharedDefines.h#L1024. Will be displayed only for the below condition source type:

CONDITION_SOURCE_TYPE_SPELL = 17

(ErrorType must be SPELL_FAILED_CUSTOM_ERROR (209) otherwise 0)

ScriptName

The ScriptName this condition uses, if any.

Comment

Explanation of this condition or reference

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)

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

Notes:

*CONDITION_SOURCE_TYPE_GOSSIP_MENU = 14

*CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION = 15

*CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE = 16

Note: creature entry must be a vehicle. Example: If this is used with CONDITION_AREA, the player will be dismounted from the vehicle if the mounted player leaves that area.

*CONDITION_SOURCE_TYPE_SPELL = 17

Notes:

*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

Note: it will show or hide spells in vehicle spell bar.

*CONDITION_SOURCE_TYPE_SMART_EVENT = 22

*CONDITION_SOURCE_TYPE_NPC_VENDOR = 23

*CONDITION_SOURCE_TYPE_SPELL_PROC = 24

Explanation of ConditionValueX fields

*CONDITION_NONE = 0

Never used

*CONDITION_AURA = 1

*CONDITION_ITEM = 2

*CONDITION_ITEM_EQUIPPED = 3

*CONDITION_ZONEID = 4

*CONDITION_REPUTATION_RANK = 5

*CONDITION_TEAM = 6

*CONDITION_SKILL = 7

*CONDITION_QUESTREWARDED = 8

*CONDITION_QUESTTAKEN = 9

*CONDITION_DRUNKENSTATE = 10

*CONDITION_WORLD_STATE = 11

*CONDITION_ACTIVE_EVENT= 12

*CONDITION_INSTANCE_INFO = 13

*CONDITION_QUEST_NONE = 14

*CONDITION_CLASS = 15

*CONDITION_RACE = 16

*CONDITION_ACHIEVEMENT = 17

*CONDITION_TITLE = 18

*CONDITION_SPAWNMASK = 19

*CONDITION_GENDER = 20

*CONDITION_UNIT_STATE = 21

*CONDITION_MAPID = 22

*CONDITION_AREAID = 23

*CONDITION_CREATURE_TYPE = 24

*CONDITION_SPELL = 25

*CONDITION_PHASEMASK = 26

*CONDITION_LEVEL = 27

*CONDITION_QUEST_COMPLETE = 28

Only if player has all quest objectives complete, but not yet rewarded.

*CONDITION_NEAR_CREATURE = 29

*CONDITION_NEAR_GAMEOBJECT = 30

*CONDITION_OBJECT_ENTRY_GUID= 31

*CONDITION_TYPE_MASK= 32

*CONDITION_RELATION_TO= 33

*CONDITION_REACTION_TO= 34

*CONDITION_DISTANCE_TO= 35

*CONDITION_ALIVE= 36

*CONDITION_HP_VAL = 37

*CONDITION_HP_PCT = 38

*CONDITION_REALM_ACHIEVEMENT = 39

*CONDITION_IN_WATER = 40

*CONDITION_STAND_STATE = 42

***REFERENCE TEMPLATES**

<!– –>