conditions - Schmoozerd/mangos-wotlk GitHub Wiki

Back to world database list of tables.

With this table and the new conditions it is possible to create tree like and very complicated combined conditions (like HasAura && (HasItem || HasQuest))

The `conditions` table

Structure

Field Type Attributes Key Null Default
condition_entry mediumint(8) unsigned PRI YES NULL
type tinyint(3) signed NO 0
value1 mediumint(8) unsigned NO 0
value2 mediumint(8) unsigned NO 0

Description of the fields

condition_entry

Identifier

type

Type of the condition

value1

data field one for the condition

value2

data field one for the condition

condition

condition_value1-2 fields can provide conditions on when the gossip is aktive.

Value Condition Comments
-3 CONDITION_NOT NOT combination ob 2 other condition_entry *
-2 CONDITION_OR OR combination ob 2 other condition_entry *
-1 CONDITION_AND AND combination ob 2 other condition_entry *
0 CONDITION_NONE Regular drop
1 CONDITION_AURA Player looting must have an aura active
2 CONDITION_ITEM Player must have a number of items in his/her inventory
3 CONDITION_ITEM_EQUIPPED Player must have an item equipped
4 CONDITION_ZONEID Player must be in a certain zone
5 CONDITION_REPUTATION_RANK Player must have a certain reputation rank with a certain faction
6 CONDITION_TEAM Player must be part of the specified team (Alliance or Horde)
7 CONDITION_SKILL Player must have a certain skill value
8 CONDITION_QUESTREWARDED Player must have completed a quest first
9 CONDITION_QUESTTAKEN Players must have the quest in the quest log and not completed yet
10 CONDITION_AD_COMMISSION_AURA
11 CONDITION_NO_AURA Miss some aura.
12 CONDITION_ACTIVE_EVENT event]] is active.
13 CONDITION_AREA_FLAG
14 CONDITION_RACE_CLASS Has special race or class.
15 CONDITION_LEVEL Has special level.
16 CONDITION_NOITEM Has not enouth items yet.
17 CONDITION_SPELL Knows some spell.
18 CONDITION_INSTANCE_SCRIPT SD2-Based condition
19 CONDITION_QUESTAVAILABLE Some quest is availible.
20 CONDITION_ACHIEVEMENT Has or has no special achievement.
21 CONDITION_ACHIEVEMENT_REALM Realm-wideversion of 20.
22 CONDITION_QUEST_NONE Has not taken a quest yet.
23 CONDITION_ITEM_WITH_BANK Check’s presens of req. amount of items in inventory or bank.
24 CONDITION_NOITEM_WITH_BANK Check’s absentee of req. amount of items in inventory or bank.
25 CONDITION_NOT_ACTIVE_GAME_EVENT
26 CONDITION_ACTIVE_HOLIDAY
27 CONDITION_NOT_ACTIVE_HOLIDAY
28 CONDITION_LEARNABLE_ABILITY Check’s if the palyer has high enought skilllevel and may check if a special item is in the inventory.

(*) Meta-Condition types CONDITION_AND (-1) and CONDITION_OR (-2) which are used as: value1 (as condition_entry) AND / OR value2 (as condition_entry). With these meta-conditions it is possible to create tree like and very complicated combined conditions (like HasAura && (HasItem || HasQuest))

condition_value

The values in the condition_value1 and condition_value2 fields depend on what condition was put in condition.

  • CONDITION_AND
    • value1: condition_entry
    • value2: condition_entry
  • CONDITION_OR
    • value1: condition_entry
    • value2: condition_entry
  • CONDITION_AURA
    • value1: The spell ID from where the aura came from.
    • value2: The effect index of the spell that applied the aura (0, 1, or 2)
  • CONDITION_ITEM
    • value1: Item ID
    • value2: Count
  • CONDITION_ITEM_EQUIPPED
    • value1: Item ID
    • value2: Always 0
  • CONDITION_ZONEID
    • value1: Zone ID
    • value2: Always 0
  • CONDITION_REPUTATION_RANK
    • value1: Faction ID
    • value2: Minimum rank
  • CONDITION_TEAM
    • value1: Player team (469 – Alliance, 67 – Horde)
    • value2: Always 0
  • CONDITION_SKILL
    • value1: Skill ID (SkillLine.dbc)
    • value2: Skill value needed
  • CONDITION_QUESTREWARDED
    • value1: Quest ID
    • value2: Always 0
  • CONDITION_QUESTTAKEN
    • value1: Quest ID
    • value2: Always 0
  • CONDITION_AD_COMMISSION_AURA
    • value1: Always 0
    • value2: Always 0
  • CONDITION_NO_AURA
    • value1: spellid
    • value2: EffectIndex
  • CONDITION_ACTIVE_EVENT
    • value1: event
    • value2: Always 0
  • CONDITION_AREA_FLAG
    • value1: area_flag
    • value2: not_have_flag
  • CONDITION_RACE_CLASS
    • value1: race_mask
    • value2: class_mask
  • CONDITION_LEVEL
    • value1: level
    • value2: 0: equal to, 1: equal or higher than, 2: equal or less than
  • CONDITION_NOITEM
    • value1: itemid
    • value2: count
  • CONDITION_SPELL
    • value1: spellid
    • value2: 0: has spell, 1: has no spell
  • CONDITION_QUESTAVAILABLE
    • value1: questid
    • value2: 0
  • CONDITION_ACHIEVEMENT
    • value1: achievementid
    • value2: 0: has achievement, 1: has no achievement
  • CONDITION_ACHIEVEMENT_REALM
    • value1: achievementid
    • value2: 0: has achievement, 1: has no achievement
  • CONDITION_QUEST_NONE
    • value1: questid
    • value2: Always 0
  • CONDITION_ITEM_WITH_BANK
    • value1: item_id
    • value2: count
  • CONDITION_NOITEM_WITH_BANK
    • value1: item_id
    • value2: count
  • CONDITION_NOT_ACTIVE_GAME_EVENT
    • value1: event_id
    • value2: 0
  • CONDITION_ACTIVE_HOLIDAY
    • value1: holiday_id
    • value2: 0
  • CONDITION_NOT_ACTIVE_HOLIDAY
    • value1: holiday_id
    • value2: 0
  • CONDITION_LEARNABLE_ABILITY
    • value1: spell_id
    • value2: 0 or item_id
⚠️ **GitHub.com Fallback** ⚠️