OregonCore  revision fb2a440-git
Your Favourite TBC server
QuestDef.h File Reference
#include "Platform/Define.h"
#include "Database/DatabaseEnv.h"
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  QuestLocale
 
class  Quest
 
struct  QuestStatusData
 

Macros

#define MAX_QUEST_LOG_SIZE   25
 
#define QUEST_OBJECTIVES_COUNT   4
 
#define QUEST_SOURCE_ITEM_IDS_COUNT   4
 
#define QUEST_REWARD_CHOICES_COUNT   6
 
#define QUEST_REWARDS_COUNT   4
 
#define QUEST_DEPLINK_COUNT   10
 
#define QUEST_REPUTATIONS_COUNT   5
 
#define QUEST_EMOTE_COUNT   4
 

Enumerations

enum  QuestFailedReasons {
  INVALIDREASON_DONT_HAVE_REQ = 0, INVALIDREASON_QUEST_FAILED_LOW_LEVEL = 1, INVALIDREASON_QUEST_FAILED_WRONG_RACE = 6, INVALIDREASON_QUEST_ALREADY_DONE = 7,
  INVALIDREASON_QUEST_ONLY_ONE_TIMED = 12, INVALIDREASON_QUEST_ALREADY_ON = 13, INVALIDREASON_QUEST_FAILED_EXPANSION = 16, INVALIDREASON_QUEST_ALREADY_ON2 = 18,
  INVALIDREASON_QUEST_FAILED_MISSING_ITEMS = 21, INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY = 23, INVALIDREASON_DAILY_QUESTS_REMAINING = 26, INVALIDREASON_QUEST_FAILED_CAIS = 27
}
 
enum  QuestShareMessages {
  QUEST_PARTY_MSG_SHARING_QUEST = 0, QUEST_PARTY_MSG_CANT_TAKE_QUEST = 1, QUEST_PARTY_MSG_ACCEPT_QUEST = 2, QUEST_PARTY_MSG_REFUSE_QUEST = 3,
  QUEST_PARTY_MSG_TOO_FAR = 4, QUEST_PARTY_MSG_BUSY = 5, QUEST_PARTY_MSG_LOG_FULL = 6, QUEST_PARTY_MSG_HAVE_QUEST = 7,
  QUEST_PARTY_MSG_FINISH_QUEST = 8
}
 
enum  __QuestTradeSkill {
  QUEST_TRSKILL_NONE = 0, QUEST_TRSKILL_ALCHEMY = 1, QUEST_TRSKILL_BLACKSMITHING = 2, QUEST_TRSKILL_COOKING = 3,
  QUEST_TRSKILL_ENCHANTING = 4, QUEST_TRSKILL_ENGINEERING = 5, QUEST_TRSKILL_FIRSTAID = 6, QUEST_TRSKILL_HERBALISM = 7,
  QUEST_TRSKILL_LEATHERWORKING = 8, QUEST_TRSKILL_POISONS = 9, QUEST_TRSKILL_TAILORING = 10, QUEST_TRSKILL_MINING = 11,
  QUEST_TRSKILL_FISHING = 12, QUEST_TRSKILL_SKINNING = 13, QUEST_TRSKILL_JEWELCRAFTING = 14
}
 
enum  QuestStatus {
  QUEST_STATUS_NONE = 0, QUEST_STATUS_COMPLETE = 1, QUEST_STATUS_UNAVAILABLE = 2, QUEST_STATUS_INCOMPLETE = 3,
  QUEST_STATUS_AVAILABLE = 4, QUEST_STATUS_FAILED = 5, MAX_QUEST_STATUS
}
 
enum  __QuestGiverStatus {
  DIALOG_STATUS_NONE = 0, DIALOG_STATUS_UNAVAILABLE = 1, DIALOG_STATUS_CHAT = 2, DIALOG_STATUS_INCOMPLETE = 3,
  DIALOG_STATUS_REWARD_REP = 4, DIALOG_STATUS_AVAILABLE_REP = 5, DIALOG_STATUS_AVAILABLE = 6, DIALOG_STATUS_REWARD2 = 7,
  DIALOG_STATUS_REWARD = 8, DIALOG_STATUS_SCRIPTED_NO_STATUS = 0x1000
}
 
enum  QuestFlags {
  QUEST_FLAGS_STAY_ALIVE = 0x00000001, QUEST_FLAGS_PARTY_ACCEPT = 0x00000002, QUEST_FLAGS_EXPLORATION = 0x00000004, QUEST_FLAGS_SHARABLE = 0x00000008,
  QUEST_FLAGS_EPIC = 0x00000020, QUEST_FLAGS_RAID = 0x00000040, QUEST_FLAGS_TBC = 0x00000080, QUEST_FLAGS_UNK2 = 0x00000100,
  QUEST_FLAGS_HIDDEN_REWARDS = 0x00000200, QUEST_FLAGS_AUTO_REWARDED = 0x00000400, QUEST_FLAGS_TBC_RACES = 0x00000800, QUEST_FLAGS_DAILY = 0x00001000
}
 
enum  QuestSpecialFlags {
  QUEST_SPECIAL_FLAGS_NONE = 0x000, QUEST_SPECIAL_FLAGS_REPEATABLE = 0x001, QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT = 0x002, QUEST_SPECIAL_FLAGS_AUTO_ACCEPT = 0x004,
  QUEST_SPECIAL_FLAGS_CAST = 0x020, QUEST_SPECIAL_FLAGS_DB_ALLOWED = QUEST_SPECIAL_FLAGS_REPEATABLE | QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT | QUEST_SPECIAL_FLAGS_CAST, QUEST_SPECIAL_FLAGS_DELIVER = 0x080, QUEST_SPECIAL_FLAGS_SPEAKTO = 0x100,
  QUEST_SPECIAL_FLAGS_KILL = 0x200, QUEST_SPECIAL_FLAGS_TIMED = 0x400
}
 
enum  QuestUpdateState { QUEST_UNCHANGED = 0, QUEST_CHANGED = 1, QUEST_NEW = 2 }
 

Macro Definition Documentation

#define QUEST_DEPLINK_COUNT   10

Definition at line 37 of file QuestDef.h.

#define QUEST_EMOTE_COUNT   4
#define QUEST_REPUTATIONS_COUNT   5

Definition at line 38 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), Quest::Quest(), and Player::RewardReputation().

#define QUEST_REWARDS_COUNT   4
#define QUEST_SOURCE_ITEM_IDS_COUNT   4

Enumeration Type Documentation

Enumerator
DIALOG_STATUS_NONE 
DIALOG_STATUS_UNAVAILABLE 
DIALOG_STATUS_CHAT 
DIALOG_STATUS_INCOMPLETE 
DIALOG_STATUS_REWARD_REP 
DIALOG_STATUS_AVAILABLE_REP 
DIALOG_STATUS_AVAILABLE 
DIALOG_STATUS_REWARD2 
DIALOG_STATUS_REWARD 
DIALOG_STATUS_SCRIPTED_NO_STATUS 

Definition at line 100 of file QuestDef.h.

101 {
102  DIALOG_STATUS_NONE = 0,
104  DIALOG_STATUS_CHAT = 2,
109  DIALOG_STATUS_REWARD2 = 7, // not yellow dot on minimap
110  DIALOG_STATUS_REWARD = 8, // yellow dot on minimap
111 
112  // Custom value meaning that script call did not return any valid quest status
114 };
Enumerator
QUEST_TRSKILL_NONE 
QUEST_TRSKILL_ALCHEMY 
QUEST_TRSKILL_BLACKSMITHING 
QUEST_TRSKILL_COOKING 
QUEST_TRSKILL_ENCHANTING 
QUEST_TRSKILL_ENGINEERING 
QUEST_TRSKILL_FIRSTAID 
QUEST_TRSKILL_HERBALISM 
QUEST_TRSKILL_LEATHERWORKING 
QUEST_TRSKILL_POISONS 
QUEST_TRSKILL_TAILORING 
QUEST_TRSKILL_MINING 
QUEST_TRSKILL_FISHING 
QUEST_TRSKILL_SKINNING 
QUEST_TRSKILL_JEWELCRAFTING 

Definition at line 70 of file QuestDef.h.

Enumerator
INVALIDREASON_DONT_HAVE_REQ 
INVALIDREASON_QUEST_FAILED_LOW_LEVEL 
INVALIDREASON_QUEST_FAILED_WRONG_RACE 
INVALIDREASON_QUEST_ALREADY_DONE 
INVALIDREASON_QUEST_ONLY_ONE_TIMED 
INVALIDREASON_QUEST_ALREADY_ON 
INVALIDREASON_QUEST_FAILED_EXPANSION 
INVALIDREASON_QUEST_ALREADY_ON2 
INVALIDREASON_QUEST_FAILED_MISSING_ITEMS 
INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY 
INVALIDREASON_DAILY_QUESTS_REMAINING 
INVALIDREASON_QUEST_FAILED_CAIS 

Definition at line 41 of file QuestDef.h.

42 {
44  INVALIDREASON_QUEST_FAILED_LOW_LEVEL = 1, //You are not high enough level for that quest.
45  INVALIDREASON_QUEST_FAILED_WRONG_RACE = 6, //That quest is not available to your race.
46  INVALIDREASON_QUEST_ALREADY_DONE = 7, //You have completed that quest.
47  INVALIDREASON_QUEST_ONLY_ONE_TIMED = 12, //You can only be on one timed quest at a time.
48  INVALIDREASON_QUEST_ALREADY_ON = 13, //You are already on that quest
49  INVALIDREASON_QUEST_FAILED_EXPANSION = 16, //This quest requires an expansion enabled account.
50  INVALIDREASON_QUEST_ALREADY_ON2 = 18, //You are already on that quest
51  INVALIDREASON_QUEST_FAILED_MISSING_ITEMS = 21, //You don't have the required items with you. Check storage.
52  INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY = 23, //You don't have enough money for that quest.
53  INVALIDREASON_DAILY_QUESTS_REMAINING = 26, //You have already completed 10 daily quests today
54  INVALIDREASON_QUEST_FAILED_CAIS = 27, //You cannot complete quests once you have reached tired time
55 };
enum QuestFlags
Enumerator
QUEST_FLAGS_STAY_ALIVE 
QUEST_FLAGS_PARTY_ACCEPT 
QUEST_FLAGS_EXPLORATION 
QUEST_FLAGS_SHARABLE 
QUEST_FLAGS_EPIC 
QUEST_FLAGS_RAID 
QUEST_FLAGS_TBC 
QUEST_FLAGS_UNK2 
QUEST_FLAGS_HIDDEN_REWARDS 
QUEST_FLAGS_AUTO_REWARDED 
QUEST_FLAGS_TBC_RACES 
QUEST_FLAGS_DAILY 

Definition at line 116 of file QuestDef.h.

117 {
118  // Flags used at server and sent to client
119  QUEST_FLAGS_STAY_ALIVE = 0x00000001, // Not used currently
120  QUEST_FLAGS_PARTY_ACCEPT = 0x00000002, // If player in party, all players that can accept this quest will receive confirmation box to accept quest CMSG_QUEST_CONFIRM_ACCEPT/SMSG_QUEST_CONFIRM_ACCEPT
121  QUEST_FLAGS_EXPLORATION = 0x00000004, // Not used currently
122  QUEST_FLAGS_SHARABLE = 0x00000008, // Can be shared: Player::CanShareQuest()
123  //QUEST_FLAGS_NONE2 = 0x00000010, // Not used currently
124  QUEST_FLAGS_EPIC = 0x00000020, // Not used currently: Unsure of content
125  QUEST_FLAGS_RAID = 0x00000040, // Not used currently
126  QUEST_FLAGS_TBC = 0x00000080, // Not used currently: Available if TBC expansion enabled only
127  QUEST_FLAGS_UNK2 = 0x00000100, // Not used currently: _DELIVER_MORE Quest needs more than normal _q-item_ drops from mobs
128  QUEST_FLAGS_HIDDEN_REWARDS = 0x00000200, // Items and money rewarded only sent in SMSG_QUESTGIVER_OFFER_REWARD (not in SMSG_QUESTGIVER_QUEST_DETAILS or in client quest log(SMSG_QUEST_QUERY_RESPONSE))
129  QUEST_FLAGS_AUTO_REWARDED = 0x00000400, // These quests are automatically rewarded on quest complete and they will never appear in quest log client side.
130  QUEST_FLAGS_TBC_RACES = 0x00000800, // Not used currently: Blood elf/Draenei starting zone quests
131  QUEST_FLAGS_DAILY = 0x00001000, // Used to know quest is Daily one
132 
133 };
Enumerator
QUEST_PARTY_MSG_SHARING_QUEST 
QUEST_PARTY_MSG_CANT_TAKE_QUEST 
QUEST_PARTY_MSG_ACCEPT_QUEST 
QUEST_PARTY_MSG_REFUSE_QUEST 
QUEST_PARTY_MSG_TOO_FAR 
QUEST_PARTY_MSG_BUSY 
QUEST_PARTY_MSG_LOG_FULL 
QUEST_PARTY_MSG_HAVE_QUEST 
QUEST_PARTY_MSG_FINISH_QUEST 

Definition at line 57 of file QuestDef.h.

Enumerator
QUEST_SPECIAL_FLAGS_NONE 
QUEST_SPECIAL_FLAGS_REPEATABLE 
QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT 
QUEST_SPECIAL_FLAGS_AUTO_ACCEPT 
QUEST_SPECIAL_FLAGS_CAST 
QUEST_SPECIAL_FLAGS_DB_ALLOWED 
QUEST_SPECIAL_FLAGS_DELIVER 
QUEST_SPECIAL_FLAGS_SPEAKTO 
QUEST_SPECIAL_FLAGS_KILL 
QUEST_SPECIAL_FLAGS_TIMED 

Definition at line 135 of file QuestDef.h.

136 {
137  QUEST_SPECIAL_FLAGS_NONE = 0x000,
138  // Oregon flags for set SpecialFlags in DB if required but used only at server
139  QUEST_SPECIAL_FLAGS_REPEATABLE = 0x001, // Set by 1 in SpecialFlags from DB
140  QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT = 0x002, // Set by 2 in SpecialFlags from DB (if required area explore, spell SPELL_EFFECT_QUEST_COMPLETE casting, table `*_script` command SCRIPT_COMMAND_QUEST_EXPLORED use, set from script DLL)
141  QUEST_SPECIAL_FLAGS_AUTO_ACCEPT = 0x004, // Set by 4 in SpecialFlags in DB if the quest is to be auto-accepted.
142  QUEST_SPECIAL_FLAGS_CAST = 0x020, // Set by 32 in SpecialFlags in DB if the quest requires RequiredOrNpcGo killcredit but NOT kill (a spell cast)
143 
145 
146  // Oregon flags for internal use only
147  QUEST_SPECIAL_FLAGS_DELIVER = 0x080, // Internal flag computed only
148  QUEST_SPECIAL_FLAGS_SPEAKTO = 0x100, // Internal flag computed only
149  QUEST_SPECIAL_FLAGS_KILL = 0x200, // Internal flag computed only
150  QUEST_SPECIAL_FLAGS_TIMED = 0x400, // Internal flag computed only
151 };
Enumerator
QUEST_STATUS_NONE 
QUEST_STATUS_COMPLETE 
QUEST_STATUS_UNAVAILABLE 
QUEST_STATUS_INCOMPLETE 
QUEST_STATUS_AVAILABLE 
QUEST_STATUS_FAILED 
MAX_QUEST_STATUS 

Definition at line 89 of file QuestDef.h.

Enumerator
QUEST_UNCHANGED 
QUEST_CHANGED 
QUEST_NEW 

Definition at line 472 of file QuestDef.h.

473 {
474  QUEST_UNCHANGED = 0,
475  QUEST_CHANGED = 1,
476  QUEST_NEW = 2
477 };