quest_template Table¶
Defines all quest data: objectives, rewards, requirements, text, and emote sequences.
Schema Summary¶
| Field | Type | Key | Null | Default | Extra |
|---|---|---|---|---|---|
entry |
mediumint(8) unsigned | PRI | NO | 0 | |
patch |
tinyint(3) unsigned | PRI | NO | 0 | |
Method |
tinyint(3) unsigned | NO | 2 | ||
ZoneOrSort |
smallint(6) | NO | 0 | ||
MinLevel |
tinyint(3) unsigned | NO | 0 | ||
MaxLevel |
tinyint(3) unsigned | NO | 0 | ||
QuestLevel |
tinyint(3) unsigned | NO | 0 | ||
Type |
smallint(5) unsigned | NO | 0 | ||
RequiredClasses |
smallint(5) unsigned | NO | 0 | ||
RequiredRaces |
smallint(5) unsigned | NO | 0 | ||
RequiredSkill |
smallint(5) unsigned | NO | 0 | ||
RequiredSkillValue |
smallint(5) unsigned | NO | 0 | ||
RequiredCondition |
mediumint(8) unsigned | NO | 0 | ||
RepObjectiveFaction |
smallint(5) unsigned | NO | 0 | ||
RepObjectiveValue |
mediumint(9) | NO | 0 | ||
RequiredMinRepFaction |
smallint(5) unsigned | NO | 0 | ||
RequiredMinRepValue |
mediumint(9) | NO | 0 | ||
RequiredMaxRepFaction |
smallint(5) unsigned | NO | 0 | ||
RequiredMaxRepValue |
mediumint(9) | NO | 0 | ||
SuggestedPlayers |
tinyint(3) unsigned | NO | 0 | ||
LimitTime |
int(10) unsigned | NO | 0 | ||
QuestFlags |
smallint(5) unsigned | NO | 0 | ||
SpecialFlags |
tinyint(3) unsigned | NO | 0 | ||
PrevQuestId |
mediumint(9) | NO | 0 | ||
NextQuestId |
mediumint(9) | NO | 0 | ||
ExclusiveGroup |
mediumint(9) | NO | 0 | ||
BreadcrumbForQuestId |
mediumint(9) unsigned | NO | 0 | ||
NextQuestInChain |
mediumint(8) unsigned | NO | 0 | ||
SrcItemId |
mediumint(8) unsigned | NO | 0 | ||
SrcItemCount |
tinyint(3) unsigned | NO | 0 | ||
SrcSpell |
smallint(5) unsigned | NO | 0 | ||
Title |
text | YES | |||
Details |
text | YES | |||
Objectives |
text | YES | |||
OfferRewardText |
text | YES | |||
RequestItemsText |
text | YES | |||
EndText |
text | YES | |||
ObjectiveText1 |
text | YES | |||
ObjectiveText2 |
text | YES | |||
ObjectiveText3 |
text | YES | |||
ObjectiveText4 |
text | YES | |||
ReqItemId1 |
mediumint(8) unsigned | NO | 0 | ||
ReqItemId2 |
mediumint(8) unsigned | NO | 0 | ||
ReqItemId3 |
mediumint(8) unsigned | NO | 0 | ||
ReqItemId4 |
mediumint(8) unsigned | NO | 0 | ||
ReqItemCount1 |
smallint(5) unsigned | NO | 0 | ||
ReqItemCount2 |
smallint(5) unsigned | NO | 0 | ||
ReqItemCount3 |
smallint(5) unsigned | NO | 0 | ||
ReqItemCount4 |
smallint(5) unsigned | NO | 0 | ||
ReqSourceId1 |
mediumint(8) unsigned | NO | 0 | ||
ReqSourceId2 |
mediumint(8) unsigned | NO | 0 | ||
ReqSourceId3 |
mediumint(8) unsigned | NO | 0 | ||
ReqSourceId4 |
mediumint(8) unsigned | NO | 0 | ||
ReqSourceCount1 |
mediumint(8) unsigned | NO | 0 | ||
ReqSourceCount2 |
mediumint(8) unsigned | NO | 0 | ||
ReqSourceCount3 |
mediumint(8) unsigned | NO | 0 | ||
ReqSourceCount4 |
mediumint(8) unsigned | NO | 0 | ||
ReqCreatureOrGOId1 |
mediumint(9) | NO | 0 | ||
ReqCreatureOrGOId2 |
mediumint(9) | NO | 0 | ||
ReqCreatureOrGOId3 |
mediumint(9) | NO | 0 | ||
ReqCreatureOrGOId4 |
mediumint(9) | NO | 0 | ||
ReqCreatureOrGOCount1 |
smallint(5) unsigned | NO | 0 | ||
ReqCreatureOrGOCount2 |
smallint(5) unsigned | NO | 0 | ||
ReqCreatureOrGOCount3 |
smallint(5) unsigned | NO | 0 | ||
ReqCreatureOrGOCount4 |
smallint(5) unsigned | NO | 0 | ||
ReqSpellCast1 |
smallint(5) unsigned | NO | 0 | ||
ReqSpellCast2 |
smallint(5) unsigned | NO | 0 | ||
ReqSpellCast3 |
smallint(5) unsigned | NO | 0 | ||
ReqSpellCast4 |
smallint(5) unsigned | NO | 0 | ||
RewChoiceItemId1 |
mediumint(8) unsigned | NO | 0 | ||
RewChoiceItemId2 |
mediumint(8) unsigned | NO | 0 | ||
RewChoiceItemId3 |
mediumint(8) unsigned | NO | 0 | ||
RewChoiceItemId4 |
mediumint(8) unsigned | NO | 0 | ||
RewChoiceItemId5 |
mediumint(8) unsigned | NO | 0 | ||
RewChoiceItemId6 |
mediumint(8) unsigned | NO | 0 | ||
RewChoiceItemCount1 |
smallint(5) unsigned | NO | 0 | ||
RewChoiceItemCount2 |
smallint(5) unsigned | NO | 0 | ||
RewChoiceItemCount3 |
smallint(5) unsigned | NO | 0 | ||
RewChoiceItemCount4 |
smallint(5) unsigned | NO | 0 | ||
RewChoiceItemCount5 |
smallint(5) unsigned | NO | 0 | ||
RewChoiceItemCount6 |
smallint(5) unsigned | NO | 0 | ||
RewItemId1 |
mediumint(8) unsigned | NO | 0 | ||
RewItemId2 |
mediumint(8) unsigned | NO | 0 | ||
RewItemId3 |
mediumint(8) unsigned | NO | 0 | ||
RewItemId4 |
mediumint(8) unsigned | NO | 0 | ||
RewItemCount1 |
smallint(5) unsigned | NO | 0 | ||
RewItemCount2 |
smallint(5) unsigned | NO | 0 | ||
RewItemCount3 |
smallint(5) unsigned | NO | 0 | ||
RewItemCount4 |
smallint(5) unsigned | NO | 0 | ||
RewRepFaction1 |
smallint(5) unsigned | NO | 0 | ||
RewRepFaction2 |
smallint(5) unsigned | NO | 0 | ||
RewRepFaction3 |
smallint(5) unsigned | NO | 0 | ||
RewRepFaction4 |
smallint(5) unsigned | NO | 0 | ||
RewRepFaction5 |
smallint(5) unsigned | NO | 0 | ||
RewRepValue1 |
mediumint(9) | NO | 0 | ||
RewRepValue2 |
mediumint(9) | NO | 0 | ||
RewRepValue3 |
mediumint(9) | NO | 0 | ||
RewRepValue4 |
mediumint(9) | NO | 0 | ||
RewRepValue5 |
mediumint(9) | NO | 0 | ||
RewRepSpilloverMask |
tinyint(3) unsigned | NO | 0 | ||
RewXP |
mediumint(9) unsigned | NO | 0 | ||
RewOrReqMoney |
int(11) | NO | 0 | ||
RewMoneyMaxLevel |
int(10) unsigned | NO | 0 | ||
RewSpell |
smallint(5) unsigned | NO | 0 | ||
RewSpellCast |
smallint(5) unsigned | NO | 0 | ||
RewMailTemplateId |
mediumint(8) | NO | 0 | ||
RewMailDelaySecs |
int(11) unsigned | NO | 0 | ||
RewMailMoney |
int(10) unsigned | NO | 0 | ||
PointMapId |
smallint(5) unsigned | NO | 0 | ||
PointX |
float | NO | 0 | ||
PointY |
float | NO | 0 | ||
PointOpt |
mediumint(8) unsigned | NO | 0 | ||
DetailsEmote1 |
smallint(5) unsigned | NO | 0 | ||
DetailsEmote2 |
smallint(5) unsigned | NO | 0 | ||
DetailsEmote3 |
smallint(5) unsigned | NO | 0 | ||
DetailsEmote4 |
smallint(5) unsigned | NO | 0 | ||
DetailsEmoteDelay1 |
int(11) unsigned | NO | 0 | ||
DetailsEmoteDelay2 |
int(11) unsigned | NO | 0 | ||
DetailsEmoteDelay3 |
int(11) unsigned | NO | 0 | ||
DetailsEmoteDelay4 |
int(11) unsigned | NO | 0 | ||
IncompleteEmote |
smallint(5) unsigned | NO | 0 | ||
CompleteEmote |
smallint(5) unsigned | NO | 0 | ||
OfferRewardEmote1 |
smallint(5) unsigned | NO | 0 | ||
OfferRewardEmote2 |
smallint(5) unsigned | NO | 0 | ||
OfferRewardEmote3 |
smallint(5) unsigned | NO | 0 | ||
OfferRewardEmote4 |
smallint(5) unsigned | NO | 0 | ||
OfferRewardEmoteDelay1 |
int(11) unsigned | NO | 0 | ||
OfferRewardEmoteDelay2 |
int(11) unsigned | NO | 0 | ||
OfferRewardEmoteDelay3 |
int(11) unsigned | NO | 0 | ||
OfferRewardEmoteDelay4 |
int(11) unsigned | NO | 0 | ||
StartScript |
mediumint(8) unsigned | NO | 0 | ||
CompleteScript |
mediumint(8) unsigned | NO | 0 |
Field Breakdown¶
entry- Primary Key. Unique quest ID.patch- Primary Key. Client patch version.Method- Quest method:0auto-complete,1disabled,2deliver (normal).ZoneOrSort- Zone ID or sort index (negative for sorting).MinLevel/MaxLevel- Level requirements.QuestLevel- Quest difficulty level.Type- Quest type (QuestInfo.dbc):0normal,1elite,41PvP,62raid,81dungeon.RequiredClasses/RequiredRaces- Class/race masks.RequiredSkill/RequiredSkillValue- Skill requirement.RequiredCondition- Condition ID.RepObjectiveFaction/RepObjectiveValue- Reputation goal.RequiredMinRepFaction/RequiredMinRepValue- Minimum reputation requirement.RequiredMaxRepFaction/RequiredMaxRepValue- Maximum reputation (for hostile quests).SuggestedPlayers- Suggested group size.LimitTime- Time limit (seconds).QuestFlags- Flags.SpecialFlags- Special flags (e.g.,1repeatable,2exploration/event).PrevQuestId/NextQuestId- Quest chain links.ExclusiveGroup- Shared group (only one quest in group can be active).BreadcrumbForQuestId- Lead-in quest pointing at the target quest X given here. This quest is acceptable only while X itself is takeable (it hides behind X's own prerequisites); while this breadcrumb is active/incomplete, X cannot be accepted.NextQuestInChain- Next quest in chain.SrcItemId/SrcItemCount- Source item required.SrcSpell- Spell cast to start quest.Title/Details/Objectives- Quest text.OfferRewardText- Text shown when completing.RequestItemsText- Text shown when turning in.EndText- Final dialogue.ObjectiveText1-4- Objective descriptions.ReqItemId1-4/ReqItemCount1-4- Required items.ReqSourceId1-4/ReqSourceCount1-4- Required source items.ReqCreatureOrGOId1-4/ReqCreatureOrGOCount1-4- Required kills/interactions.ReqSpellCast1-4- Required spell casts.RewChoiceItemId1-6/RewChoiceItemCount1-6- Choice rewards.RewItemId1-4/RewItemCount1-4- Fixed item rewards.RewRepFaction1-5/RewRepValue1-5- Reputation rewards.RewRepSpilloverMask- Bitmask overRewRepFaction1..5indexes (bit 0 = faction 1 ... bit 4 = faction 5). A set bit disables reputation spillover from that reward faction.RewXP- Experience reward.RewOrReqMoney- Money reward (or cost).RewMoneyMaxLevel- Max-level money reward.RewSpell- Spell reward (learn spell).RewSpellCast- Spell cast on completion.RewMailTemplateId/RewMailDelaySecs/RewMailMoney- Mail reward.PointMapId/PointX/PointY/PointOpt- Map POI for quest objective.DetailsEmote1-4/DetailsEmoteDelay1-4- Emotes during quest details.IncompleteEmote/CompleteEmote- Emotes for incomplete/complete state.OfferRewardEmote1-4/OfferRewardEmoteDelay1-4- Emotes during reward offering.StartScript- Script ID for quest start.CompleteScript- Script ID for quest completion.
Flag Bitmasks¶
Values from src/game/QuestDef.h.
QuestFlags (client-visible)¶
| Flag | Name | Effect |
|---|---|---|
| 0x00000000 | NONE | no flags |
| 0x00000001 | STAY_ALIVE | (not used currently) |
| 0x00000002 | PARTY_ACCEPT | whole party gets a confirmation popup to accept |
| 0x00000004 | EXPLORATION | (not used currently) |
| 0x00000008 | SHARABLE | quest can be shared with party members (CanShareQuest) |
| 0x00000010 | - | reserved / unused |
| 0x00000020 | EPIC | (unused) |
| 0x00000040 | RAID | (unused) |
| 0x00000100 | UNK2 | - |
| 0x00000200 | HIDDEN_REWARDS | rewards hidden in the offer window & quest log |
| 0x00000400 | AUTO_REWARDED | auto-completes; never appears in the quest log |
SpecialFlags (server-side)¶
Set with |value syntax in DB:
| Value | Name | Effect |
|---|---|---|
| 1 | REPEATABLE | quest can be repeated (resets on completion) |
| 2 | EXPLORATION_OR_EVENT | completes via area exploration, the QUEST_EXPLORED script command, or the quest-complete spell effect |
Values 0x008+ (DELIVER, SPEAKTO, KILL_OR_CAST, TIMED) are internal flags computed by the core from your objective columns; never set them manually.
Interaction With Other Systems¶
- Timed quests:
LimitTime > 0sets the countdown (internal TIMED flag). - Exploration completion pairs
SpecialFlags = 2with an areatrigger id inareatrigger_involvedrelation. - Repeatable daily/weekly rotation is driven by
game events +
QUEST_SPECIAL_FLAG_REPEATABLE. - Reward visibility for surprise rewards uses HIDDEN_REWARDS.