TrinityCore
Loading...
Searching...
No Matches
QuestDef.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef TRINITYCORE_QUEST_H
19#define TRINITYCORE_QUEST_H
20
21#include "Common.h"
22#include "DatabaseEnvFwd.h"
23#include "DBCEnums.h"
24#include "SharedDefines.h"
25#include "UniqueTrackablePtr.h"
26#include "WorldPacket.h"
27#include <vector>
28
29class Player;
30
32{
33 struct QuestRewards;
34}
35
36#define MAX_QUEST_LOG_SIZE 25
37
38#define QUEST_OBJECTIVES_COUNT 4
39#define QUEST_ITEM_OBJECTIVES_COUNT 6
40#define QUEST_SOURCE_ITEM_IDS_COUNT 4
41#define QUEST_REWARD_CHOICES_COUNT 6
42#define QUEST_REWARDS_COUNT 4
43#define QUEST_DEPLINK_COUNT 10
44#define QUEST_REPUTATIONS_COUNT 5
45#define QUEST_EMOTE_COUNT 4
46#define QUEST_PVP_KILL_SLOT 0
47
48// EnumUtils: DESCRIBE THIS
50{
52 INVALIDREASON_QUEST_FAILED_LOW_LEVEL = 1, // DESCRIPTION You are not high enough level for that quest.
53 INVALIDREASON_QUEST_FAILED_WRONG_RACE = 6, // DESCRIPTION That quest is not available to your race.
54 INVALIDREASON_QUEST_ALREADY_DONE = 7, // DESCRIPTION You have completed that quest.
55 INVALIDREASON_QUEST_ONLY_ONE_TIMED = 12, // DESCRIPTION You can only be on one timed quest at a time.
56 INVALIDREASON_QUEST_ALREADY_ON = 13, // DESCRIPTION You are already on that quest.
57 INVALIDREASON_QUEST_FAILED_EXPANSION = 16, // DESCRIPTION This quest requires an expansion enabled account.
58 INVALIDREASON_QUEST_ALREADY_ON2 = 18, // DESCRIPTION You are already on that quest.
59 INVALIDREASON_QUEST_FAILED_MISSING_ITEMS = 21, // DESCRIPTION You don't have the required items with you. Check storage.
60 INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY = 23, // DESCRIPTION You don't have enough money for that quest.
61 INVALIDREASON_DAILY_QUESTS_REMAINING = 26, // DESCRIPTION You have already completed 25 daily quests today.
62 INVALIDREASON_QUEST_FAILED_CAIS = 27, // DESCRIPTION You cannot complete quests once you have reached tired time.
63 INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY = 29 // DESCRIPTION You have completed that daily quest today.
64};
65
66// EnumUtils: DESCRIBE THIS
82
101
103{
106 //QUEST_STATUS_UNAVAILABLE = 2,
108 //QUEST_STATUS_AVAILABLE = 4,
110 QUEST_STATUS_REWARDED = 6, // Not used in DB
113
128
130{
131 // Flags used at server and sent to client
132 QUEST_FLAGS_NONE = 0x00000000,
133 QUEST_FLAGS_STAY_ALIVE = 0x00000001, // Not used currently
134 QUEST_FLAGS_PARTY_ACCEPT = 0x00000002, // Not used currently. 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
135 QUEST_FLAGS_EXPLORATION = 0x00000004, // Not used currently
136 QUEST_FLAGS_SHARABLE = 0x00000008, // Can be shared: Player::CanShareQuest()
137 QUEST_FLAGS_HAS_CONDITION = 0x00000010, // Not used currently
138 QUEST_FLAGS_HIDE_REWARD_POI = 0x00000020, // Not used currently: Unsure of content
139 QUEST_FLAGS_RAID = 0x00000040, // Can be completed while in raid
140 QUEST_FLAGS_TBC = 0x00000080, // Not used currently: Available if TBC expansion enabled only
141 QUEST_FLAGS_NO_MONEY_FROM_XP = 0x00000100, // Not used currently: Experience is not converted to gold at max level
142 QUEST_FLAGS_HIDDEN_REWARDS = 0x00000200, // Items and money rewarded only sent in SMSG_QUESTGIVER_OFFER_REWARD (not in SMSG_QUEST_GIVER_QUEST_DETAILS or in client quest log(SMSG_QUEST_QUERY_RESPONSE))
143 QUEST_FLAGS_TRACKING = 0x00000400, // These quests are automatically rewarded on quest complete and they will never appear in quest log client side.
144 QUEST_FLAGS_DEPRECATE_REPUTATION = 0x00000800, // Not used currently
145 QUEST_FLAGS_DAILY = 0x00001000, // Used to know quest is Daily one
146 QUEST_FLAGS_FLAGS_PVP = 0x00002000, // Having this quest in log forces PvP flag
147 QUEST_FLAGS_UNAVAILABLE = 0x00004000, // Used on quests that are not generically available
148 QUEST_FLAGS_WEEKLY = 0x00008000,
149 QUEST_FLAGS_AUTOCOMPLETE = 0x00010000, // Quests with this flag cause the client to automatically send CMSG_QUESTGIVER_COMPLETE_QUEST after accepting if the quest has any objectives and they are completed before accepting (none of 3.3.5a quests fit this criteria)
150 QUEST_FLAGS_DISPLAY_ITEM_IN_TRACKER = 0x00020000, // Displays usable item in quest tracker
151 QUEST_FLAGS_OBJ_TEXT = 0x00040000, // use Objective text as Complete text
152 QUEST_FLAGS_AUTO_ACCEPT = 0x00080000, // The client recognizes this flag as auto-accept. However, NONE of the current quests (3.3.5a) have this flag. Maybe blizz used to use it, or will use it in the future.
153
154 // ... 4.x added flags up to 0x80000000 - all unknown for now
155};
156
158{
160 // Trinity flags for set SpecialFlags in DB if required but used only at server
161 QUEST_SPECIAL_FLAGS_REPEATABLE = 0x001, // Set by 1 in SpecialFlags from DB
162 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 `FECT_QUEST_COMPLETE casting, table `*_script` command SCRIPT_COMMAND_QUEST_EXPLORED use, set from script)
163 QUEST_SPECIAL_FLAGS_AUTO_ACCEPT = 0x004, // Set by 4 in SpecialFlags in DB if the quest is to be auto-accepted.
164 QUEST_SPECIAL_FLAGS_DF_QUEST = 0x008, // Set by 8 in SpecialFlags in DB if the quest is used by Dungeon Finder.
165 QUEST_SPECIAL_FLAGS_MONTHLY = 0x010, // Set by 16 in SpecialFlags in DB if the quest is reset at the begining of the month
166 QUEST_SPECIAL_FLAGS_CAST = 0x020, // Set by 32 in SpecialFlags in DB if the quest requires RequiredOrNpcGo killcredit but NOT kill (a spell cast)
167 // room for more custom flags
168
170
171 QUEST_SPECIAL_FLAGS_DELIVER = 0x080, // Internal flag computed only
172 QUEST_SPECIAL_FLAGS_SPEAKTO = 0x100, // Internal flag computed only
173 QUEST_SPECIAL_FLAGS_KILL = 0x200, // Internal flag computed only
174 QUEST_SPECIAL_FLAGS_TIMED = 0x400, // Internal flag computed only
175 QUEST_SPECIAL_FLAGS_PLAYER_KILL = 0x800, // Internal flag computed only
176 QUEST_SPECIAL_FLAGS_COMPLETED_AT_START = 0x1000 // Internal flag computed only
178
180{
182
183 std::vector<std::string> Title;
184 std::vector<std::string> Details;
185 std::vector<std::string> Objectives;
186 std::vector<std::string> OfferRewardText;
187 std::vector<std::string> RequestItemsText;
188 std::vector<std::string> AreaDescription;
189 std::vector<std::string> CompletedText;
190 std::vector<std::vector<std::string>> ObjectiveText;
191};
192
194{
195 std::vector<std::string> CompletionText;
196};
197
199{
200 std::vector<std::string> RewardText;
201};
202
203// This Quest class provides a convenient way to access a few pretotaled (cached) quest details,
204// all base quest information, and any utility functions such as generating the amount of
205// xp to give
207{
208 friend class ObjectMgr;
209 public:
210 Quest(Field* questRecord);
211 void LoadQuestDetails(Field* fields);
212 void LoadQuestRequestItems(Field* fields);
213 void LoadQuestOfferReward(Field* fields);
214 void LoadQuestTemplateAddon(Field* fields);
215 void LoadQuestMailSender(Field* fields);
216
217 uint32 GetXPReward(Player const* player) const;
218
219 bool HasFlag(uint32 flag) const { return (_flags & flag) != 0; }
220 void SetFlag(uint32 flag) { _flags |= flag; }
221
222 bool HasSpecialFlag(uint32 flag) const { return (_specialFlags & flag) != 0; }
223 void SetSpecialFlag(uint32 flag) { _specialFlags |= flag; }
224
225 // whether the quest is globally enabled (spawned by pool, game event active etc.)
226 static bool IsTakingQuestEnabled(uint32 questId);
227
228 // table data accessors:
229 uint32 GetQuestId() const { return _id; }
230 uint32 GetQuestMethod() const { return _method; }
231 int32 GetZoneOrSort() const { return _zoneOrSort; }
232 uint32 GetMinLevel() const { return _minLevel; }
233 uint32 GetMaxLevel() const { return _maxLevel; }
234 int32 GetQuestLevel() const { return _level; }
235 uint32 GetType() const { return _type; }
236 uint32 GetRequiredClasses() const { return _requiredClasses; }
237 uint32 GetAllowableRaces() const { return _allowableRaces; }
238 uint32 GetRequiredSkill() const { return _requiredSkillId; }
239 uint32 GetRequiredSkillValue() const { return _requiredSkillPoints; }
240 uint32 GetRepObjectiveFaction() const { return _requiredFactionId1; }
241 int32 GetRepObjectiveValue() const { return _requiredFactionValue1; }
242 uint32 GetRepObjectiveFaction2() const { return _requiredFactionId2; }
243 int32 GetRepObjectiveValue2() const { return _requiredFactionValue2; }
244 uint32 GetRequiredMinRepFaction() const { return _requiredMinRepFaction; }
245 int32 GetRequiredMinRepValue() const { return _requiredMinRepValue; }
246 uint32 GetRequiredMaxRepFaction() const { return _requiredMaxRepFaction; }
247 int32 GetRequiredMaxRepValue() const { return _requiredMaxRepValue; }
248 uint32 GetSuggestedPlayers() const { return _suggestedPlayers; }
249 uint32 GetTimeAllowed() const { return _timeAllowed; }
250 int32 GetPrevQuestId() const { return _prevQuestId; }
251 uint32 GetNextQuestId() const { return _nextQuestId; }
252 int32 GetExclusiveGroup() const { return _exclusiveGroup; }
253 int32 GetBreadcrumbForQuestId() const { return _breadcrumbForQuestId; }
254 uint32 GetNextQuestInChain() const { return _rewardNextQuest; }
255 uint32 GetCharTitleId() const { return _rewardTitleId; }
256 uint32 GetPlayersSlain() const { return _requiredPlayerKills; }
257 uint32 GetBonusTalents() const { return _rewardTalents; }
258 int32 GetRewArenaPoints() const {return _rewardArenaPoints; }
259 uint32 GetXPId() const { return _rewardXPDifficulty; }
260 uint32 GetSrcItemId() const { return _startItem; }
261 uint32 GetSrcItemCount() const { return _startItemCount; }
262 uint32 GetSrcSpell() const { return _sourceSpellid; }
263 std::string const& GetTitle() const { return _title; }
264 std::string const& GetDetails() const { return _details; }
265 std::string const& GetObjectives() const { return _objectives; }
266 std::string const& GetOfferRewardText() const { return _offerRewardText; }
267 std::string const& GetRequestItemsText() const { return _requestItemsText; }
268 std::string const& GetAreaDescription() const { return _areaDescription; }
269 std::string const& GetCompletedText() const { return _completedText; }
270 int32 GetRewOrReqMoney(Player const* player = nullptr) const;
271 uint32 GetRewHonorAddition() const { return _rewardHonor; }
272 float GetRewHonorMultiplier() const { return _rewardKillHonor; }
273 uint32 GetRewMoneyMaxLevel() const; // use in XP calculation at client
274 uint32 GetRewSpell() const { return _rewardDisplaySpell; }
275 int32 GetRewSpellCast() const { return _rewardSpell; }
276 uint32 GetRewMailTemplateId() const { return _rewardMailTemplateId; }
277 uint32 GetRewMailDelaySecs() const { return _rewardMailDelay; }
278 uint32 GetRewMailSenderEntry() const { return _rewardMailSenderEntry; }
279 uint32 GetPOIContinent() const { return _poiContinent; }
280 float GetPOIx() const { return _poiX; }
281 float GetPOIy() const { return _poiY; }
282 uint32 GetPointOpt() const { return _poiPriority; }
283 uint32 GetIncompleteEmote() const { return _emoteOnIncomplete; }
284 uint32 GetCompleteEmote() const { return _emoteOnComplete; }
285 bool IsRepeatable() const { return _specialFlags & QUEST_SPECIAL_FLAGS_REPEATABLE; }
286 bool IsAutoAccept() const;
287 bool IsAutoComplete() const;
288 uint32 GetFlags() const { return _flags; }
289 bool IsDaily() const { return (_flags & QUEST_FLAGS_DAILY) != 0; }
290 bool IsWeekly() const { return (_flags & QUEST_FLAGS_WEEKLY) != 0; }
291 bool IsMonthly() const { return (_specialFlags & QUEST_SPECIAL_FLAGS_MONTHLY) != 0; }
292 bool IsSeasonal() const { return (_zoneOrSort == -QUEST_SORT_SEASONAL || _zoneOrSort == -QUEST_SORT_SPECIAL || _zoneOrSort == -QUEST_SORT_LUNAR_FESTIVAL || _zoneOrSort == -QUEST_SORT_MIDSUMMER || _zoneOrSort == -QUEST_SORT_BREWFEST || _zoneOrSort == -QUEST_SORT_LOVE_IS_IN_THE_AIR || _zoneOrSort == -QUEST_SORT_NOBLEGARDEN) && !IsRepeatable(); }
293 bool IsDailyOrWeekly() const { return (_flags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY)) != 0; }
294 bool IsRaidQuest(Difficulty difficulty) const;
295 bool IsAllowedInRaid(Difficulty difficulty) const;
296 bool IsDFQuest() const { return (_specialFlags & QUEST_SPECIAL_FLAGS_DF_QUEST) != 0; }
297 uint32 CalculateHonorGain(uint8 level) const;
298 bool CanIncreaseRewardedQuestCounters() const;
299
300 // multiple values
301
302 std::string ObjectiveText[QUEST_OBJECTIVES_COUNT];
303
304 uint32 RequiredItemId[QUEST_ITEM_OBJECTIVES_COUNT] = { };
305 uint32 RequiredItemCount[QUEST_ITEM_OBJECTIVES_COUNT] = { };
307 uint32 ItemDropQuantity[QUEST_SOURCE_ITEM_IDS_COUNT] = { };
308 int32 RequiredNpcOrGo[QUEST_OBJECTIVES_COUNT] = { }; // >0 Creature <0 Gameobject
309 uint32 RequiredNpcOrGoCount[QUEST_OBJECTIVES_COUNT] = { };
310 uint32 RewardChoiceItemId[QUEST_REWARD_CHOICES_COUNT] = { };
311 uint32 RewardChoiceItemCount[QUEST_REWARD_CHOICES_COUNT] = { };
312 uint32 RewardItemId[QUEST_REWARDS_COUNT] = { };
313 uint32 RewardItemIdCount[QUEST_REWARDS_COUNT] = { };
314 uint32 RewardFactionId[QUEST_REPUTATIONS_COUNT] = { };
315 int32 RewardFactionValueId[QUEST_REPUTATIONS_COUNT] = { };
316 int32 RewardFactionValueIdOverride[QUEST_REPUTATIONS_COUNT] = { };
317 uint32 DetailsEmote[QUEST_EMOTE_COUNT] = { };
318 uint32 DetailsEmoteDelay[QUEST_EMOTE_COUNT] = { };
319 uint32 OfferRewardEmote[QUEST_EMOTE_COUNT] = { };
320 uint32 OfferRewardEmoteDelay[QUEST_EMOTE_COUNT] = { };
321
322 uint32 GetReqItemsCount() const { return _reqItemsCount; }
323 uint32 GetReqCreatureOrGOcount() const { return _reqCreatureOrGOcount; }
324 uint32 GetRewChoiceItemsCount() const { return _rewChoiceItemsCount; }
325 uint32 GetRewItemsCount() const { return _rewItemsCount; }
326
327 void SetEventIdForQuest(uint16 eventId) { _eventIdForQuest = eventId; }
328 uint16 GetEventIdForQuest() const { return _eventIdForQuest; }
329
330 static void AddQuestLevelToTitle(std::string& title, int32 level);
331 void InitializeQueryData();
332 WorldPacket BuildQueryData(LocaleConstant loc) const;
333
334 void BuildQuestRewards(WorldPackets::Quest::QuestRewards& rewards, Player* player, bool sendHiddenRewards = false) const;
335
336 Trinity::unique_weak_ptr<Quest> GetWeakPtr() const { return _weakRef; }
337
338 std::vector<uint32> DependentPreviousQuests;
339 std::vector<uint32> DependentBreadcrumbQuests;
341
342 // cached data
343 private:
344 uint32 _reqItemsCount = 0;
345 uint32 _reqCreatureOrGOcount = 0;
346 uint32 _rewChoiceItemsCount = 0;
347 uint32 _rewItemsCount = 0;
348 uint16 _eventIdForQuest = 0;
349
350 // table data
351 uint32 _id = 0;
352 uint32 _method = 0;
353 int32 _zoneOrSort = 0;
354 uint32 _minLevel = 0;
355 int32 _level = 0;
356 uint32 _type = 0;
357 uint32 _allowableRaces = 0;
358 uint32 _requiredFactionId1 = 0;
359 int32 _requiredFactionValue1 = 0;
360 uint32 _requiredFactionId2 = 0;
361 int32 _requiredFactionValue2 = 0;
362 uint32 _suggestedPlayers = 0;
363 uint32 _timeAllowed = 0;
364 uint32 _flags = 0;
365 uint32 _rewardTitleId = 0;
366 uint32 _requiredPlayerKills = 0;
367 uint32 _rewardTalents = 0;
368 int32 _rewardArenaPoints = 0;
369 uint32 _rewardNextQuest = 0;
370 uint32 _rewardXPDifficulty = 0;
371 uint32 _startItem = 0;
372 std::string _title;
373 std::string _details;
374 std::string _objectives;
375 std::string _offerRewardText;
376 std::string _requestItemsText;
377 std::string _areaDescription;
378 std::string _completedText;
379 uint32 _rewardHonor = 0;
380 float _rewardKillHonor = 0.f;
381 int32 _rewardMoney = 0;
382 uint32 _rewardBonusMoney = 0;
383 uint32 _rewardDisplaySpell = 0;
384 int32 _rewardSpell = 0;
385 uint32 _poiContinent = 0;
386 float _poiX = 0.f;
387 float _poiY = 0.f;
388 uint32 _poiPriority = 0;
389 uint32 _emoteOnIncomplete = 0;
390 uint32 _emoteOnComplete = 0;
391
392 // quest_template_addon table (custom data)
393 uint32 _maxLevel = 0;
394 uint32 _requiredClasses = 0;
395 uint32 _sourceSpellid = 0;
396 int32 _prevQuestId = 0;
397 uint32 _nextQuestId = 0;
398 int32 _exclusiveGroup = 0;
399 int32 _breadcrumbForQuestId = 0;
400 uint32 _rewardMailTemplateId = 0;
401 uint32 _rewardMailDelay = 0;
402 uint32 _requiredSkillId = 0;
403 uint32 _requiredSkillPoints = 0;
404 uint32 _requiredMinRepFaction = 0;
405 int32 _requiredMinRepValue = 0;
406 uint32 _requiredMaxRepFaction = 0;
407 int32 _requiredMaxRepValue = 0;
408 uint32 _startItemCount = 0;
409 uint32 _rewardMailSenderEntry = 0;
410 uint32 _specialFlags = 0; // custom flags, not sniffed/WDB
411
412 // Helpers
413 static uint32 RoundXPValue(uint32 xp);
414
416};
417
427#endif
LocaleConstant
Definition Common.h:48
@ TOTAL_LOCALES
Definition Common.h:59
Difficulty
Definition DBCEnums.h:279
#define TC_GAME_API
Definition Define.h:114
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint16_t uint16
Definition Define.h:134
uint32_t uint32
Definition Define.h:133
#define QUEST_REWARDS_COUNT
Definition QuestDef.h:42
QuestFailedReason
Definition QuestDef.h:50
@ INVALIDREASON_DONT_HAVE_REQ
Definition QuestDef.h:51
@ INVALIDREASON_QUEST_FAILED_CAIS
Definition QuestDef.h:62
@ INVALIDREASON_QUEST_ALREADY_ON2
Definition QuestDef.h:58
@ INVALIDREASON_QUEST_ALREADY_ON
Definition QuestDef.h:56
@ INVALIDREASON_QUEST_FAILED_MISSING_ITEMS
Definition QuestDef.h:59
@ INVALIDREASON_QUEST_FAILED_WRONG_RACE
Definition QuestDef.h:53
@ INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY
Definition QuestDef.h:63
@ INVALIDREASON_QUEST_ALREADY_DONE
Definition QuestDef.h:54
@ INVALIDREASON_QUEST_ONLY_ONE_TIMED
Definition QuestDef.h:55
@ INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY
Definition QuestDef.h:60
@ INVALIDREASON_QUEST_FAILED_LOW_LEVEL
Definition QuestDef.h:52
@ INVALIDREASON_DAILY_QUESTS_REMAINING
Definition QuestDef.h:61
@ INVALIDREASON_QUEST_FAILED_EXPANSION
Definition QuestDef.h:57
QuestTradeSkill
Definition QuestDef.h:84
@ QUEST_TRSKILL_ALCHEMY
Definition QuestDef.h:86
@ QUEST_TRSKILL_FISHING
Definition QuestDef.h:97
@ QUEST_TRSKILL_BLACKSMITHING
Definition QuestDef.h:87
@ QUEST_TRSKILL_TAILORING
Definition QuestDef.h:95
@ QUEST_TRSKILL_MINING
Definition QuestDef.h:96
@ QUEST_TRSKILL_HERBALISM
Definition QuestDef.h:92
@ QUEST_TRSKILL_JEWELCRAFTING
Definition QuestDef.h:99
@ QUEST_TRSKILL_SKINNING
Definition QuestDef.h:98
@ QUEST_TRSKILL_COOKING
Definition QuestDef.h:88
@ QUEST_TRSKILL_NONE
Definition QuestDef.h:85
@ QUEST_TRSKILL_ENGINEERING
Definition QuestDef.h:90
@ QUEST_TRSKILL_FIRSTAID
Definition QuestDef.h:91
@ QUEST_TRSKILL_ENCHANTING
Definition QuestDef.h:89
@ QUEST_TRSKILL_LEATHERWORKING
Definition QuestDef.h:93
@ QUEST_TRSKILL_POISONS
Definition QuestDef.h:94
#define QUEST_ITEM_OBJECTIVES_COUNT
Definition QuestDef.h:39
#define QUEST_EMOTE_COUNT
Definition QuestDef.h:45
#define QUEST_OBJECTIVES_COUNT
Definition QuestDef.h:38
QuestFlags
Definition QuestDef.h:130
@ QUEST_FLAGS_TRACKING
Definition QuestDef.h:143
@ QUEST_FLAGS_PARTY_ACCEPT
Definition QuestDef.h:134
@ QUEST_FLAGS_FLAGS_PVP
Definition QuestDef.h:146
@ QUEST_FLAGS_DAILY
Definition QuestDef.h:145
@ QUEST_FLAGS_NONE
Definition QuestDef.h:132
@ QUEST_FLAGS_HIDE_REWARD_POI
Definition QuestDef.h:138
@ QUEST_FLAGS_NO_MONEY_FROM_XP
Definition QuestDef.h:141
@ QUEST_FLAGS_HIDDEN_REWARDS
Definition QuestDef.h:142
@ QUEST_FLAGS_WEEKLY
Definition QuestDef.h:148
@ QUEST_FLAGS_DISPLAY_ITEM_IN_TRACKER
Definition QuestDef.h:150
@ QUEST_FLAGS_HAS_CONDITION
Definition QuestDef.h:137
@ QUEST_FLAGS_AUTO_ACCEPT
Definition QuestDef.h:152
@ QUEST_FLAGS_TBC
Definition QuestDef.h:140
@ QUEST_FLAGS_STAY_ALIVE
Definition QuestDef.h:133
@ QUEST_FLAGS_SHARABLE
Definition QuestDef.h:136
@ QUEST_FLAGS_EXPLORATION
Definition QuestDef.h:135
@ QUEST_FLAGS_DEPRECATE_REPUTATION
Definition QuestDef.h:144
@ QUEST_FLAGS_UNAVAILABLE
Definition QuestDef.h:147
@ QUEST_FLAGS_AUTOCOMPLETE
Definition QuestDef.h:149
@ QUEST_FLAGS_RAID
Definition QuestDef.h:139
@ QUEST_FLAGS_OBJ_TEXT
Definition QuestDef.h:151
QuestStatus
Definition QuestDef.h:103
@ QUEST_STATUS_REWARDED
Definition QuestDef.h:110
@ QUEST_STATUS_FAILED
Definition QuestDef.h:109
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:107
@ QUEST_STATUS_NONE
Definition QuestDef.h:104
@ MAX_QUEST_STATUS
Definition QuestDef.h:111
@ QUEST_STATUS_COMPLETE
Definition QuestDef.h:105
QuestShareMessages
Definition QuestDef.h:68
@ QUEST_PARTY_MSG_FINISH_QUEST
Definition QuestDef.h:76
@ QUEST_PARTY_MSG_CANT_TAKE_QUEST
Definition QuestDef.h:70
@ QUEST_PARTY_MSG_NOT_ELIGIBLE_TODAY
Definition QuestDef.h:80
@ QUEST_PARTY_MSG_BUSY
Definition QuestDef.h:73
@ QUEST_PARTY_MSG_ACCEPT_QUEST
Definition QuestDef.h:71
@ QUEST_PARTY_MSG_HAVE_QUEST
Definition QuestDef.h:75
@ QUEST_PARTY_MSG_SHARING_TIMER_EXPIRED
Definition QuestDef.h:78
@ QUEST_PARTY_MSG_CANT_BE_SHARED_TODAY
Definition QuestDef.h:77
@ QUEST_PARTY_MSG_SHARING_QUEST
Definition QuestDef.h:69
@ QUEST_PARTY_MSG_LOG_FULL
Definition QuestDef.h:74
@ QUEST_PARTY_MSG_NOT_IN_PARTY
Definition QuestDef.h:79
@ QUEST_PARTY_MSG_DECLINE_QUEST
Definition QuestDef.h:72
#define QUEST_REPUTATIONS_COUNT
Definition QuestDef.h:44
#define QUEST_SOURCE_ITEM_IDS_COUNT
Definition QuestDef.h:40
#define QUEST_REWARD_CHOICES_COUNT
Definition QuestDef.h:41
QuestGiverStatus
Definition QuestDef.h:115
@ DIALOG_STATUS_UNAVAILABLE
Definition QuestDef.h:117
@ DIALOG_STATUS_NONE
Definition QuestDef.h:116
@ DIALOG_STATUS_AVAILABLE
Definition QuestDef.h:124
@ DIALOG_STATUS_LOW_LEVEL_REWARD_REP
Definition QuestDef.h:119
@ DIALOG_STATUS_REWARD
Definition QuestDef.h:126
@ DIALOG_STATUS_LOW_LEVEL_AVAILABLE
Definition QuestDef.h:118
@ DIALOG_STATUS_REWARD_REP
Definition QuestDef.h:122
@ DIALOG_STATUS_REWARD2
Definition QuestDef.h:125
@ DIALOG_STATUS_INCOMPLETE
Definition QuestDef.h:121
@ DIALOG_STATUS_LOW_LEVEL_AVAILABLE_REP
Definition QuestDef.h:120
@ DIALOG_STATUS_AVAILABLE_REP
Definition QuestDef.h:123
QuestSpecialFlags
Definition QuestDef.h:158
@ QUEST_SPECIAL_FLAGS_COMPLETED_AT_START
Definition QuestDef.h:176
@ QUEST_SPECIAL_FLAGS_CAST
Definition QuestDef.h:166
@ QUEST_SPECIAL_FLAGS_AUTO_ACCEPT
Definition QuestDef.h:163
@ QUEST_SPECIAL_FLAGS_TIMED
Definition QuestDef.h:174
@ QUEST_SPECIAL_FLAGS_DELIVER
Definition QuestDef.h:171
@ QUEST_SPECIAL_FLAGS_REPEATABLE
Definition QuestDef.h:161
@ QUEST_SPECIAL_FLAGS_KILL
Definition QuestDef.h:173
@ QUEST_SPECIAL_FLAGS_DB_ALLOWED
Definition QuestDef.h:169
@ QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT
Definition QuestDef.h:162
@ QUEST_SPECIAL_FLAGS_DF_QUEST
Definition QuestDef.h:164
@ QUEST_SPECIAL_FLAGS_NONE
Definition QuestDef.h:159
@ QUEST_SPECIAL_FLAGS_SPEAKTO
Definition QuestDef.h:172
@ QUEST_SPECIAL_FLAGS_MONTHLY
Definition QuestDef.h:165
@ QUEST_SPECIAL_FLAGS_PLAYER_KILL
Definition QuestDef.h:175
@ QUEST_SORT_LOVE_IS_IN_THE_AIR
@ QUEST_SORT_SPECIAL
@ QUEST_SORT_BREWFEST
@ QUEST_SORT_NOBLEGARDEN
@ QUEST_SORT_MIDSUMMER
@ QUEST_SORT_LUNAR_FESTIVAL
@ QUEST_SORT_SEASONAL
Class used to access individual fields of database query result.
Definition Field.h:92
int32 GetRewArenaPoints() const
Definition QuestDef.h:258
std::string _areaDescription
Definition QuestDef.h:377
bool HasSpecialFlag(uint32 flag) const
Definition QuestDef.h:222
int32 GetRepObjectiveValue() const
Definition QuestDef.h:241
bool HasFlag(uint32 flag) const
Definition QuestDef.h:219
uint32 GetRewSpell() const
Definition QuestDef.h:274
uint16 GetEventIdForQuest() const
Definition QuestDef.h:328
std::string _details
Definition QuestDef.h:373
Trinity::unique_weak_ptr< Quest > _weakRef
Definition QuestDef.h:415
uint32 GetRewMailSenderEntry() const
Definition QuestDef.h:278
int32 GetRepObjectiveValue2() const
Definition QuestDef.h:243
std::vector< uint32 > DependentBreadcrumbQuests
Definition QuestDef.h:339
uint32 GetRepObjectiveFaction() const
Definition QuestDef.h:240
uint32 GetReqItemsCount() const
Definition QuestDef.h:322
uint32 GetRewMailTemplateId() const
Definition QuestDef.h:276
void SetSpecialFlag(uint32 flag)
Definition QuestDef.h:223
uint32 GetRepObjectiveFaction2() const
Definition QuestDef.h:242
uint32 GetCharTitleId() const
Definition QuestDef.h:255
uint32 GetMaxLevel() const
Definition QuestDef.h:233
std::string const & GetRequestItemsText() const
Definition QuestDef.h:267
int32 GetRequiredMaxRepValue() const
Definition QuestDef.h:247
float GetPOIy() const
Definition QuestDef.h:281
int32 GetRequiredMinRepValue() const
Definition QuestDef.h:245
uint32 GetMinLevel() const
Definition QuestDef.h:232
std::string const & GetObjectives() const
Definition QuestDef.h:265
uint32 GetPOIContinent() const
Definition QuestDef.h:279
uint32 GetSrcItemCount() const
Definition QuestDef.h:261
bool IsDFQuest() const
Definition QuestDef.h:296
uint32 GetRequiredClasses() const
Definition QuestDef.h:236
std::string _requestItemsText
Definition QuestDef.h:376
std::string const & GetDetails() const
Definition QuestDef.h:264
uint32 GetAllowableRaces() const
Definition QuestDef.h:237
uint32 GetSrcSpell() const
Definition QuestDef.h:262
bool IsRepeatable() const
Definition QuestDef.h:285
int32 GetZoneOrSort() const
Definition QuestDef.h:231
std::string _objectives
Definition QuestDef.h:374
int32 GetQuestLevel() const
Definition QuestDef.h:234
float GetRewHonorMultiplier() const
Definition QuestDef.h:272
uint32 GetRewHonorAddition() const
Definition QuestDef.h:271
uint32 GetRequiredMinRepFaction() const
Definition QuestDef.h:244
uint32 GetFlags() const
Definition QuestDef.h:288
int32 GetPrevQuestId() const
Definition QuestDef.h:250
uint32 GetPlayersSlain() const
Definition QuestDef.h:256
std::string const & GetCompletedText() const
Definition QuestDef.h:269
std::vector< uint32 > DependentPreviousQuests
Definition QuestDef.h:338
uint32 GetQuestId() const
Definition QuestDef.h:229
uint32 GetRequiredSkillValue() const
Definition QuestDef.h:239
uint32 GetType() const
Definition QuestDef.h:235
uint32 GetRewMailDelaySecs() const
Definition QuestDef.h:277
bool IsDaily() const
Definition QuestDef.h:289
int32 GetExclusiveGroup() const
Definition QuestDef.h:252
uint32 GetPointOpt() const
Definition QuestDef.h:282
int32 GetBreadcrumbForQuestId() const
Definition QuestDef.h:253
std::string _title
Definition QuestDef.h:372
std::string const & GetOfferRewardText() const
Definition QuestDef.h:266
void SetEventIdForQuest(uint16 eventId)
Definition QuestDef.h:327
uint32 GetXPId() const
Definition QuestDef.h:259
Trinity::unique_weak_ptr< Quest > GetWeakPtr() const
Definition QuestDef.h:336
uint32 GetRewItemsCount() const
Definition QuestDef.h:325
std::string const & GetAreaDescription() const
Definition QuestDef.h:268
uint32 GetRequiredSkill() const
Definition QuestDef.h:238
uint32 GetRewChoiceItemsCount() const
Definition QuestDef.h:324
uint32 GetIncompleteEmote() const
Definition QuestDef.h:283
uint32 GetSrcItemId() const
Definition QuestDef.h:260
bool IsWeekly() const
Definition QuestDef.h:290
uint32 GetNextQuestId() const
Definition QuestDef.h:251
bool IsSeasonal() const
Definition QuestDef.h:292
bool IsDailyOrWeekly() const
Definition QuestDef.h:293
std::string const & GetTitle() const
Definition QuestDef.h:263
uint32 GetReqCreatureOrGOcount() const
Definition QuestDef.h:323
float GetPOIx() const
Definition QuestDef.h:280
uint32 GetCompleteEmote() const
Definition QuestDef.h:284
void SetFlag(uint32 flag)
Definition QuestDef.h:220
int32 GetRewSpellCast() const
Definition QuestDef.h:275
bool IsMonthly() const
Definition QuestDef.h:291
std::string _completedText
Definition QuestDef.h:378
uint32 GetBonusTalents() const
Definition QuestDef.h:257
std::string _offerRewardText
Definition QuestDef.h:375
uint32 GetQuestMethod() const
Definition QuestDef.h:230
uint32 GetTimeAllowed() const
Definition QuestDef.h:249
uint32 GetRequiredMaxRepFaction() const
Definition QuestDef.h:246
uint32 GetNextQuestInChain() const
Definition QuestDef.h:254
uint32 GetSuggestedPlayers() const
Definition QuestDef.h:248
Trinity::unique_trackable_ptr companion class, replicating what std::weak_ptr is to std::shared_ptr.
std::vector< std::string > AreaDescription
Definition QuestDef.h:188
std::vector< std::string > RequestItemsText
Definition QuestDef.h:187
std::vector< std::string > OfferRewardText
Definition QuestDef.h:186
std::vector< std::string > CompletedText
Definition QuestDef.h:189
std::vector< std::string > Title
Definition QuestDef.h:183
std::vector< std::string > Objectives
Definition QuestDef.h:185
std::vector< std::vector< std::string > > ObjectiveText
Definition QuestDef.h:190
std::vector< std::string > Details
Definition QuestDef.h:184
std::vector< std::string > RewardText
Definition QuestDef.h:200
std::vector< std::string > CompletionText
Definition QuestDef.h:195
uint16 PlayerCount
Definition QuestDef.h:424
uint16 ItemCount[QUEST_ITEM_OBJECTIVES_COUNT]
Definition QuestDef.h:422
QuestStatus Status
Definition QuestDef.h:420
uint16 CreatureOrGOCount[QUEST_OBJECTIVES_COUNT]
Definition QuestDef.h:423