TrinityCore
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 "EnumFlag.h"
24#include "LootItemType.h"
25#include "Optional.h"
26#include "RaceMask.h"
27#include "SharedDefines.h"
28#include "WorldPacket.h"
29#include <bitset>
30#include <vector>
31
32class Player;
33enum Difficulty : uint8;
34
35namespace WorldPackets
36{
37 namespace Quest
38 {
39 struct QuestRewards;
40 }
41}
42
43#define MAX_QUEST_LOG_SIZE 35
44
45#define QUEST_ITEM_DROP_COUNT 4
46#define QUEST_REWARD_CHOICES_COUNT 6
47#define QUEST_REWARD_ITEM_COUNT 4
48#define QUEST_DEPLINK_COUNT 10
49#define QUEST_REWARD_REPUTATIONS_COUNT 5
50#define QUEST_EMOTE_COUNT 4
51#define QUEST_REWARD_CURRENCY_COUNT 4
52#define QUEST_REWARD_DISPLAY_SPELL_COUNT 3
53
54// EnumUtils: DESCRIBE THIS
56{
58 QUEST_ERR_FAILED_LOW_LEVEL = 1, // DESCRIPTION "You are not high enough level for that quest.""
59 QUEST_ERR_FAILED_WRONG_RACE = 6, // DESCRIPTION "That quest is not available to your race."
60 QUEST_ERR_ALREADY_DONE = 7, // DESCRIPTION "You have completed that daily quest today."
61 QUEST_ERR_ONLY_ONE_TIMED = 12, // DESCRIPTION "You can only be on one timed quest at a time"
62 QUEST_ERR_ALREADY_ON1 = 13, // DESCRIPTION "You are already on that quest"
63 QUEST_ERR_FAILED_EXPANSION = 16, // DESCRIPTION "This quest requires an expansion enabled account."
64 QUEST_ERR_ALREADY_ON2 = 18, // DESCRIPTION "You are already on that quest"
65 QUEST_ERR_FAILED_MISSING_ITEMS = 21, // DESCRIPTION "You don't have the required items with you. Check storage."
66 QUEST_ERR_FAILED_NOT_ENOUGH_MONEY = 23, // DESCRIPTION "You don't have enough money for that quest"
67 QUEST_ERR_FAILED_CAIS = 24, // DESCRIPTION "You cannot complete quests once you have reached tired time"
68 QUEST_ERR_ALREADY_DONE_DAILY = 26, // DESCRIPTION "You have completed that daily quest today."
69 QUEST_ERR_FAILED_SPELL = 28, // DESCRIPTION "You haven't learned the required spell."
70 QUEST_ERR_HAS_IN_PROGRESS = 30 // DESCRIPTION "Progress Bar objective not completed"
71};
72
73// EnumUtils: DESCRIBE THIS
75{
76 Success = 0, // "Sharing quest with %s..."
77 Invalid = 1, // "%s is not eligible for that quest"
78 InvalidToRecipient = 2, // "%s's attempt to share quest "%s" failed. You are not eligible for that quest."
79 Accepted = 3, // "%s has accepted your quest"
80 Declined = 4, // "%s has declined your quest"
81 Busy = 5, // "%s is busy"
82 Dead = 6, // "%s is dead."
83 DeadToRecipient = 7, // "%s's attempt to share quest "%s" failed. You are dead."
84 LogFull = 8, // "%s's quest log is full"
85 LogFullToRecipient = 9, // "%s's attempt to share quest "%s" failed. Your quest log is full."
86 OnQuest = 10, // "%s is already on that quest"
87 OnQuestToRecipient = 11, // "%s's attempt to share quest "%s" failed. You are already on that quest."
88 AlreadyDone = 12, // "%s has completed that quest"
89 AlreadyDoneToRecipient = 13, // "%s's attempt to share quest "%s" failed. You have completed that quest."
90 NotDaily = 14, // "That quest cannot be shared today"
91 TimerExpired = 15, // "Quest sharing timer has expired"
92 NotInParty = 16, // "You are not in a party"
93 DifferentServerDaily = 17, // "%s is not eligible for that quest today"
94 DifferentServerDailyToRecipient = 18, // "%s's attempt to share quest "%s" failed. You are not eligible for that quest today."
95 NotAllowed = 19, // "That quest cannot be shared"
96 Prerequisite = 20, // "%s hasn't completed all of the prerequisite quests required for that quest."
97 PrerequisiteToRecipient = 21, // "%s's attempt to share quest "%s" failed. You must complete all of the prerequisite quests first."
98 LowLevel = 22, // "%s is too low level for that quest."
99 LowLevelToRecipient = 23, // "%s's attempt to share quest "%s" failed. You are too low level for that quest."
100 HighLevel = 24, // "%s is too high level for that quest."
101 HighLevelToRecipient = 25, // "%s's attempt to share quest "%s" failed. You are too high level for that quest."
102 Class = 26, // "%s is the wrong class for that quest."
103 ClassToRecipient = 27, // "%s's attempt to share quest "%s" failed. You are the wrong class for that quest."
104 Race = 28, // "%s is the wrong race for that quest."
105 RaceToRecipient = 29, // "%s's attempt to share quest "%s" failed. You are the wrong race for that quest."
106 LowFaction = 30, // "%s's reputation is too low for that quest."
107 LowFactionToRecipient = 31, // "%s's attempt to share quest "%s" failed. Your reputation is too low for that quest."
108 Expansion = 32, // "%s doesn't own the required expansion for that quest."
109 ExpansionToRecipient = 33, // "%s's attempt to share quest "%s" failed. You do not own the required expansion for that quest."
110 NotGarrisonOwner = 34, // "%s must own a garrison to accept that quest."
111 NotGarrisonOwnerToRecipient = 35, // "%s's attempt to share quest "%s" failed. You must own a garrison to accept that quest."
112 WrongCovenant = 36, // "%s is in the wrong covenant for that quest."
113 WrongCovenantToRecipient = 37, // "%s's attempt to share quest "%s" failed. You are in the wrong covenant for that quest."
114 NewPlayerExperience = 38, // "%s must complete Exile's Reach to accept that quest."
115 NewPlayerExperienceToRecipient = 39, // "%s's attempt to share quest "%s" failed. You must complete Exile's Reach to accept that quest."
116 WrongFaction = 40, // "%s is the wrong faction for that quest."
117 WrongFactionToRecipient = 41 // "%s's attempt to share quest "%s" failed. You are the wrong faction for that quest."
118};
119
121{
138
140{
143 //QUEST_STATUS_UNAVAILABLE = 2,
145 //QUEST_STATUS_AVAILABLE = 4,
147 QUEST_STATUS_REWARDED = 6, // Not used in DB
150
152{
153 None = 0x000000000,
154 Future = 0x000000002,
155 Trivial = 0x000000004,
156 TrivialRepeatableTurnin = 0x000000008,
157 TrivialDailyQuest = 0x000000010,
158 Reward = 0x000000020,
159 JourneyReward = 0x000000040,
160 CovenantCallingReward = 0x000000080,
161 RepeatableTurnin = 0x000000100,
162 DailyQuest = 0x000000200,
163 Quest = 0x000000400,
164 RewardCompleteNoPOI = 0x000000800,
165 RewardCompletePOI = 0x000001000,
166 LegendaryQuest = 0x000002000,
167 LegendaryRewardCompleteNoPOI = 0x000004000,
168 LegendaryRewardCompletePOI = 0x000008000,
169 JourneyQuest = 0x000010000,
170 JourneyRewardCompleteNoPOI = 0x000020000,
171 JourneyRewardCompletePOI = 0x000040000,
172 CovenantCallingQuest = 0x000080000,
175 TrivialLegendaryQuest = 0x000400000,
176 FutureLegendaryQuest = 0x000800000,
177 LegendaryReward = 0x001000000,
178 ImportantQuest = 0x002000000,
179 ImportantReward = 0x004000000,
180 TrivialImportantQuest = 0x008000000,
181 FutureImportantQuest = 0x010000000,
184 TrivialJourneyQuest = 0x080000000,
185 FutureJourneyQuest = 0x100000000,
186};
187
189
191{
192 QUEST_FLAGS_NONE = 0x00000000,
196 QUEST_FLAGS_SHARABLE = 0x00000008, // Can be shared: Player::CanShareQuest()
197 QUEST_FLAGS_HAS_CONDITION = 0x00000010, // Not used currently
198 QUEST_FLAGS_HIDE_REWARD_POI = 0x00000020, // Hides questgiver turn-in minimap icon
199 QUEST_FLAGS_RAID_GROUP_OK = 0x00000040, // Can be completed while in raid
200 QUEST_FLAGS_WAR_MODE_REWARDS_OPT_IN = 0x00000080, // Not used currently
201 QUEST_FLAGS_NO_MONEY_FOR_XP = 0x00000100, // Experience is not converted to gold at max level
202 QUEST_FLAGS_HIDE_REWARD = 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))
203 QUEST_FLAGS_TRACKING_EVENT = 0x00000400, // These quests are automatically rewarded on quest complete and they will never appear in quest log client side.
204 QUEST_FLAGS_DEPRECATE_REPUTATION = 0x00000800, // Not used currently
205 QUEST_FLAGS_DAILY = 0x00001000, // Used to know quest is Daily one
206 QUEST_FLAGS_FLAGS_PVP = 0x00002000, // Having this quest in log forces PvP flag
207 QUEST_FLAGS_DEPRECATED = 0x00004000, // Used on quests that are not generally available
208 QUEST_FLAGS_WEEKLY = 0x00008000,
209 QUEST_FLAGS_AUTO_COMPLETE = 0x00010000, // Quests with this flag player submit automatically by special button in player gui
210 QUEST_FLAGS_DISPLAY_ITEM_IN_TRACKER = 0x00020000, // Displays usable item in quest tracker
211 QUEST_FLAGS_DISABLE_COMPLETION_TEXT = 0x00040000, // use Objective text as Complete text
212 QUEST_FLAGS_AUTO_ACCEPT = 0x00080000, // The client recognizes this flag as auto-accept.
213 QUEST_FLAGS_PLAYER_CAST_ACCEPT = 0x00100000, // Accept Spell Player Cast
214 QUEST_FLAGS_PLAYER_CAST_COMPLETE = 0x00200000, // Complete Spell Player Cast
215 QUEST_FLAGS_UPDATE_PHASESHIFT = 0x00400000, // Update Phase Shift
216 QUEST_FLAGS_SOR_WHITELIST = 0x00800000, // Scroll of Resurrection Whitelist
217 QUEST_FLAGS_LAUNCH_GOSSIP_COMPLETE = 0x01000000, // Gossip on Quest Completion - Force Gossip
218 QUEST_FLAGS_REMOVE_SURPLUS_ITEMS = 0x02000000, // Remove all items from inventory that have the same id as the objective, not just the amount required by quest
219 QUEST_FLAGS_WELL_KNOWN = 0x04000000, // Well-Known
220 QUEST_FLAGS_PORTRAIT_IN_QUEST_LOG = 0x08000000, // Portrait from Log
221 QUEST_FLAGS_SHOW_ITEM_WHEN_COMPLETED = 0x10000000, // Show Item When Completed
222 QUEST_FLAGS_LAUNCH_GOSSIP_ACCEPT = 0x20000000, // Gossip on Quest Accept - Force Gossip
223 QUEST_FLAGS_ITEMS_GLOW_WHEN_COMPLETE = 0x40000000, // Items Glow When Done
224 QUEST_FLAGS_FAIL_ON_LOGOUT = 0x80000000 // Fail on Logout
226
227// last checked in 19802
229{
231 QUEST_FLAGS_EX_NO_ITEM_REMOVAL = 0x00000001, // Keep Additional Items
232 QUEST_FLAGS_EX_SUPPRESS_GOSSIP_COMPLETE = 0x00000002, // Gossip on Quest Completion - Suppress Gossip
233 QUEST_FLAGS_EX_SUPPRESS_GOSSIP_ACCEPT = 0x00000004, // Gossip on Quest Accept - Suppress Gossip
234 QUEST_FLAGS_EX_DENY_PLAYER_QUESTGIVER = 0x00000008, // Disallow Player as Questgiver (advanced)
235 QUEST_FLAGS_EX_DISPLAY_CLASS_CHOICE_REWARDS = 0x00000010, // Choice Reward Filter - Matches Class
236 QUEST_FLAGS_EX_DISPLAY_SPEC_CHOICE_REWARDS = 0x00000020, // Choice Reward Filter - Matches Spec
237 QUEST_FLAGS_EX_REMOVE_ON_PERIODIC_RESET = 0x00000040, // Remove from Log on Periodic Reset
238 QUEST_FLAGS_EX_ACCOUNT = 0x00000080, // Account-Level Quest
239 QUEST_FLAGS_EX_LEGENDARY = 0x00000100, // Legendary Quest
240 QUEST_FLAGS_EX_NO_GUILD_XP = 0x00000200, // No Guild XP
241 QUEST_FLAGS_EX_RESET_CACHE_ON_ACCEPT = 0x00000400, // Reset Cache on Accept (internal)
242 QUEST_FLAGS_EX_NO_ABANDON_ONCE_BEGUN = 0x00000800, // No Abandon Once Any Objective Complete
243 QUEST_FLAGS_EX_RECAST_ACCEPT_SPELL_ON_LOGIN = 0x00001000, // Recast accept spell on login
244 QUEST_FLAGS_EX_UPDATE_ZONE_AURAS = 0x00002000, // Update Zone Auras
245 QUEST_FLAGS_EX_NO_CREDIT_FOR_PROXY = 0x00004000, // No Credit for Proxy Creatures
246 QUEST_FLAGS_EX_DISPLAY_AS_DAILY = 0x00008000, // Display As Daily Quest
248 QUEST_FLAGS_EX_INTERNAL_BUILDS_ONLY = 0x00020000, // Quest for Internal Builds ONLY
249 QUEST_FLAGS_EX_SUPPRESS_SPELL_LEARN_TEXT = 0x00040000, // Suppress spell learn text line (for followers)
250 QUEST_FLAGS_EX_DISPLAY_AS_OBJECTIVE = 0x00080000, // Display Header as Objective for Tasks
251 QUEST_FLAGS_EX_ALLOW_ALL_IN_GARRISON = 0x00100000, // Garrison non-owners allowed
252 QUEST_FLAGS_EX_REMOVE_ON_WEEKLY_RESET = 0x00200000, // Remove quest on weekly reset
253 QUEST_FLAGS_EX_SUPPRESS_GREETINGS_ON_ACCEPT = 0x00400000, // Suppress farewell audio after quest accept
254 QUEST_FLAGS_EX_REWARDS_IGNORE_CAPS = 0x00800000, // Rewards bypass weekly caps and Season Total
255 QUEST_FLAGS_EX_IS_WORLD_QUEST = 0x01000000, // Is a World Quest
256 QUEST_FLAGS_EX_NOT_IGNORABLE = 0x02000000, // Not Ignorable
257 QUEST_FLAGS_EX_AUTO_PUSH = 0x04000000, // Auto Push
258 QUEST_FLAGS_EX_NO_SPELL_COMPLETE_EFFECTS = 0x08000000, // No Complete Quest Spell Effect
259 QUEST_FLAGS_EX_DO_NOT_TOAST_HONOR_REWARD = 0x10000000, // Do Not Toast Honor Reward
260 QUEST_FLAGS_EX_KEEP_REPEATABLE_QUEST_ON_FACTION_CHANGE = 0x20000000, // Keep repeatable quest on faction change
261 QUEST_FLAGS_EX_KEEP_PROGRESS_ON_FACTION_CHANGE = 0x40000000, // Keep quest progress on faction change
264
266{
291};
292
294{
296 // Trinity flags for set SpecialFlags in DB if required but used only at server
297 QUEST_SPECIAL_FLAGS_REPEATABLE = 0x001, // Set by 1 in SpecialFlags from DB
298 QUEST_SPECIAL_FLAGS_AUTO_PUSH_TO_PARTY = 0x002, // Set by 2 in SpecialFlags from DB will make quest be pushed to entire party when one member accepts it
299 QUEST_SPECIAL_FLAGS_AUTO_ACCEPT = 0x004, // Set by 4 in SpecialFlags in DB if the quest is to be auto-accepted.
300 QUEST_SPECIAL_FLAGS_DF_QUEST = 0x008, // Set by 8 in SpecialFlags in DB if the quest is used by Dungeon Finder.
301 QUEST_SPECIAL_FLAGS_MONTHLY = 0x010, // Set by 16 in SpecialFlags in DB if the quest is reset at the begining of the month
302 // room for more custom flags
303
305
306 QUEST_SPECIAL_FLAGS_SEQUENCED_OBJECTIVES = 0x020, // Internal flag computed only
307};
308
309enum class QuestTagType
310{
311 Tag,
313 Normal,
314 Pvp,
315 PetBattle,
316 Bounty,
317 Dungeon,
318 Invasion,
319 Raid,
324 Islands,
325 Threat,
327};
328
330{
347 QUEST_OBJECTIVE_HAVE_CURRENCY = 16, // requires the player to have X currency when turning in but does not consume it
348 QUEST_OBJECTIVE_OBTAIN_CURRENCY = 17, // requires the player to gain X currency after starting the quest but not required to keep it until the end (does not consume)
349 QUEST_OBJECTIVE_INCREASE_REPUTATION = 18, // requires the player to gain X reputation with a faction
353
356
358{
359 QUEST_OBJECTIVE_FLAG_TRACKED_ON_MINIMAP = 0x0001, // client displays large yellow blob on minimap for creature/gameobject
360 QUEST_OBJECTIVE_FLAG_SEQUENCED = 0x0002, // client will not see the objective displayed until all previous objectives are completed
361 QUEST_OBJECTIVE_FLAG_OPTIONAL = 0x0004, // not required to complete the quest
362 QUEST_OBJECTIVE_FLAG_HIDDEN = 0x0008, // never displayed in quest log
363 QUEST_OBJECTIVE_FLAG_HIDE_CREDIT_MSG = 0x0010, // skip showing item objective progress
365 QUEST_OBJECTIVE_FLAG_PART_OF_PROGRESS_BAR = 0x0040, // hidden objective used to calculate progress bar percent (quests are limited to a single progress bar objective)
369};
370
372{
373 QUEST_OBJECTIVE_FLAG_2_QUEST_BOUND_ITEM = 0x1 // Item is bound to a single objective, only increments the counter for one quest if multiple require the same item and is not stored in inventory
375
377{
378 LegacyBehavior = 0,
379 Follower = 1,
380 Tradeskill = 2,
381 Ability = 3,
382 Aura = 4,
383 Spell = 5,
384 Unlock = 6,
385 Companion = 7,
386 Max
387};
388
390{
393 std::string Text;
394
396 QuestGreeting(uint16 emoteType, uint32 emoteDelay, std::string text)
397 : EmoteType(emoteType), EmoteDelay(emoteDelay), Text(std::move(text)) { }
398};
399
401{
402 std::vector<std::string> Greeting;
403};
404
406{
407 std::vector<std::string> LogTitle;
408 std::vector<std::string> LogDescription;
409 std::vector<std::string> QuestDescription;
410 std::vector<std::string> AreaDescription;
411 std::vector<std::string> PortraitGiverText;
412 std::vector<std::string> PortraitGiverName;
413 std::vector<std::string> PortraitTurnInText;
414 std::vector<std::string> PortraitTurnInName;
415 std::vector<std::string> QuestCompletionLog;
416};
417
419{
420 std::vector<std::string> CompletionText;
421};
422
424{
425 std::vector<std::string> Description;
426};
427
429{
430 std::vector<std::string> RewardText;
431};
432
434{
438 bool UpdatePhaseShift = false;
439 bool UpdateZoneAuras = false;
440};
441
443{
452 float ProgressBarWeight = 0.0f;
453 std::string Description;
454 std::vector<int32> VisualEffects;
456
457 bool IsStoringValue() const
458 {
459 switch (Type)
460 {
471 return true;
472 default:
473 break;
474 }
475 return false;
476 }
477
478 bool IsStoringFlag() const
479 {
480 switch (Type)
481 {
488 return true;
489 default:
490 break;
491 }
492 return false;
493 }
494
496 {
497 switch (type)
498 {
507 return true;
508 default:
509 break;
510 }
511 return false;
512 }
513};
514
515using QuestObjectives = std::vector<QuestObjective>;
516
518{
520 QuestRewardDisplaySpell(uint32 spellId, uint32 playerConditionId, QuestCompleteSpellType type) : SpellId(spellId), PlayerConditionId(playerConditionId), Type(type) { }
521
525};
526
528{
531 std::vector<std::string> Text;
532};
533
534// This Quest class provides a convenient way to access a few pretotaled (cached) quest details,
535// all base quest information, and any utility functions such as generating the amount of
536// xp to give
538{
539 friend class ObjectMgr;
540 friend class Player;
541 friend class PlayerMenu;
542 public:
543 // Loading data. All queries are in ObjectMgr::LoadQuests()
544 explicit Quest(Field* questRecord);
545 ~Quest();
546 void LoadRewardDisplaySpell(Field* fields);
547 void LoadRewardChoiceItems(Field* fields);
548 void LoadQuestDetails(Field* fields);
549 void LoadQuestRequestItems(Field* fields);
550 void LoadQuestOfferReward(Field* fields);
551 void LoadQuestTemplateAddon(Field* fields);
552 void LoadQuestMailSender(Field* fields);
553 void LoadQuestObjective(Field* fields);
554 void LoadQuestObjectiveVisualEffect(Field* fields);
555 void LoadConditionalConditionalQuestDescription(Field* fields);
556 void LoadConditionalConditionalRequestItemsText(Field* fields);
557 void LoadConditionalConditionalOfferRewardText(Field* fields);
558 void LoadConditionalConditionalQuestCompletionLog(Field* fields);
559
560 uint32 XPValue(Player const* player) const;
561 static uint32 XPValue(Player const* player, uint32 contentTuningId, uint32 xpDifficulty, float xpMultiplier = 1.0f, int32 expansion = -1);
562 uint32 MoneyValue(Player const* player) const;
563 uint32 MaxMoneyValue() const;
564 uint32 GetMaxMoneyReward() const;
565 Optional<QuestTagType> GetQuestTag() const;
566 bool IsImportant() const;
567
568 bool HasFlag(QuestFlags flag) const { return (_flags & uint32(flag)) != 0; }
569 bool HasFlagEx(QuestFlagsEx flag) const { return (_flagsEx & uint32(flag)) != 0; }
570 bool HasFlagEx2(QuestFlagsEx2 flag) const { return (_flagsEx2 & uint32(flag)) != 0; }
571
572 bool HasSpecialFlag(QuestSpecialFlags flag) const { return (_specialFlags & flag) != 0; }
573 void SetSpecialFlag(QuestSpecialFlags flag) { _specialFlags |= flag; }
574 bool HasQuestObjectiveType(QuestObjectiveType type) const { return _usedQuestObjectiveTypes[type]; }
575
576 bool IsAutoPush() const { return HasFlagEx(QUEST_FLAGS_EX_AUTO_PUSH); }
577 bool IsWorldQuest() const { return HasFlagEx(QUEST_FLAGS_EX_IS_WORLD_QUEST); }
578
579 // Possibly deprecated flag
580 bool IsUnavailable() const { return HasFlag(QUEST_FLAGS_DEPRECATED); }
581
582 // whether the quest is globally enabled (spawned by pool, game event active etc.)
583 static bool IsTakingQuestEnabled(uint32 questId);
584
585 // table data accessors:
586 uint32 GetQuestId() const { return _id; }
587 uint32 GetQuestType() const { return _type; }
588 uint32 GetQuestPackageID() const { return _packageID; }
589 uint32 GetContentTuningId() const { return _contentTuningID; }
590 int32 GetZoneOrSort() const { return _questSortID; }
591 uint32 GetMaxLevel() const { return _maxLevel; }
592 uint32 GetQuestInfoID() const { return _questInfoID; }
593 uint32 GetAllowableClasses() const { return _allowableClasses; }
594 Trinity::RaceMask<uint64> GetAllowableRaces() const { return _allowableRaces; }
595 uint32 GetRequiredSkill() const { return _requiredSkillId; }
596 uint32 GetRequiredSkillValue() const { return _requiredSkillPoints; }
597 uint32 GetRequiredMinRepFaction() const { return _requiredMinRepFaction; }
598 int32 GetRequiredMinRepValue() const { return _requiredMinRepValue; }
599 uint32 GetRequiredMaxRepFaction() const { return _requiredMaxRepFaction; }
600 int32 GetRequiredMaxRepValue() const { return _requiredMaxRepValue; }
601 uint32 GetSuggestedPlayers() const { return _suggestedPlayers; }
602 int64 GetLimitTime() const { return _limitTime; }
603 int32 GetPrevQuestId() const { return _prevQuestID; }
604 uint32 GetNextQuestId() const { return _nextQuestID; }
605 int32 GetExclusiveGroup() const { return _exclusiveGroup; }
606 int32 GetBreadcrumbForQuestId() const { return _breadcrumbForQuestId; }
607 uint32 GetNextQuestInChain() const { return _nextQuestInChain; }
608 int32 GetRewArenaPoints() const {return _rewardArenaPoints; }
609 uint32 GetXPDifficulty() const { return _rewardXPDifficulty; }
610 float GetXPMultiplier() const { return _rewardXPMultiplier; }
611 float GetMoneyMultiplier() const { return _rewardMoneyMultiplier; }
612 uint32 GetSrcItemId() const { return _sourceItemId; }
613 uint32 GetSrcItemCount() const { return _sourceItemIdCount; }
614 uint32 GetSrcSpell() const { return _sourceSpellID; }
615 std::string const& GetLogTitle() const { return _logTitle; }
616 std::string const& GetLogDescription() const { return _logDescription; }
617 std::string const& GetQuestDescription() const { return _questDescription; }
618 std::vector<QuestConditionalText> const& GetConditionalQuestDescription() const { return _conditionalQuestDescription; }
619 std::string const& GetAreaDescription() const { return _areaDescription; }
620 std::string const& GetOfferRewardText() const { return _offerRewardText; }
621 std::vector<QuestConditionalText> const& GetConditionalOfferRewardText() const { return _conditionalOfferRewardText; }
622 std::string const& GetRequestItemsText() const { return _requestItemsText; }
623 std::vector<QuestConditionalText> const& GetConditionalRequestItemsText() const { return _conditionalRequestItemsText; }
624 std::string const& GetQuestCompletionLog() const { return _questCompletionLog; }
625 std::vector<QuestConditionalText> const& GetConditionalQuestCompletionLog() const { return _conditionalQuestCompletionLog; }
626 std::string const& GetPortraitGiverText() const { return _portraitGiverText; }
627 std::string const& GetPortraitGiverName() const { return _portraitGiverName; }
628 std::string const& GetPortraitTurnInText() const { return _portraitTurnInText; }
629 std::string const& GetPortraitTurnInName() const { return _portraitTurnInName; }
630 QuestObjectives const& GetObjectives() const { return Objectives; }
631 uint32 GetRewMoneyDifficulty() const { return _rewardMoneyDifficulty; }
632 uint32 GetRewHonor() const { return _rewardHonor; }
633 uint32 GetRewKillHonor() const { return _rewardKillHonor; }
634 uint32 GetArtifactXPDifficulty() const { return _rewardArtifactXPDifficulty; }
635 float GetArtifactXPMultiplier() const { return _rewardArtifactXPMultiplier; }
636 uint32 GetArtifactCategoryId() const { return _rewardArtifactCategoryID; }
637 uint32 GetRewMoneyMaxLevel() const; // use in XP calculation at client
638 uint32 GetRewSpell() const { return _rewardSpell; }
639 uint32 GetRewMailTemplateId() const { return _rewardMailTemplateId; }
640 uint32 GetRewMailDelaySecs() const { return _rewardMailDelay; }
641 uint32 GetRewMailSenderEntry() const { return _rewardMailSenderEntry; }
642 uint32 GetRewTitle() const { return _rewardTitleId; }
643 uint32 GetPOIContinent() const { return _poiContinent; }
644 float GetPOIx() const { return _poix; }
645 float GetPOIy() const { return _poiy; }
646 uint32 GetPOIPriority() const { return _poiPriority; }
647 uint32 GetSoundAccept() const { return _soundAccept; }
648 uint32 GetSoundTurnIn() const { return _soundTurnIn; }
649 uint32 GetIncompleteEmote() const { return _emoteOnIncomplete; }
650 uint32 GetCompleteEmote() const { return _emoteOnComplete; }
651 uint32 GetIncompleteEmoteDelay() const { return _emoteOnIncompleteDelay; }
652 uint32 GetCompleteEmoteDelay() const { return _emoteOnCompleteDelay; }
653 bool IsRepeatable() const { return _specialFlags & QUEST_SPECIAL_FLAGS_REPEATABLE; }
654 bool IsAutoAccept() const;
655 bool IsTurnIn() const;
656 uint32 GetFlags() const { return _flags; }
657 uint32 GetFlagsEx() const { return _flagsEx; }
658 uint32 GetFlagsEx2() const { return _flagsEx2; }
659 uint32 GetSpecialFlags() const { return _specialFlags; }
660 uint32 GetScriptId() const { return _scriptId; }
661 uint32 GetAreaGroupID() const { return _areaGroupID; }
662 uint32 GetRewardSkillId() const { return _rewardSkillId; }
663 uint32 GetRewardSkillPoints() const { return _rewardSkillPoints; }
664 uint32 GetRewardReputationMask() const { return _rewardReputationMask; }
665 int32 GetTreasurePickerId() const { return _treasurePickerID; }
666 int32 GetExpansion() const { return _expansion; }
667 int32 GetManagedWorldStateId() const { return _managedWorldStateID; }
668 int32 GetQuestSessionBonus() const { return _questSessionBonus; }
669 uint32 GetQuestGiverPortrait() const { return _questGiverPortrait; }
670 int32 GetQuestGiverPortraitMount() const { return _questGiverPortraitMount; }
671 int32 GetQuestGiverPortraitModelSceneId() const { return _questGiverPortraitModelSceneId; }
672 uint32 GetQuestTurnInPortrait() const { return _questTurnInPortrait; }
673 bool IsDaily() const { return (_flags & QUEST_FLAGS_DAILY) != 0; }
674 bool IsWeekly() const { return (_flags & QUEST_FLAGS_WEEKLY) != 0; }
675 bool IsMonthly() const { return (_specialFlags & QUEST_SPECIAL_FLAGS_MONTHLY) != 0; }
676 bool IsSeasonal() const { return (_questSortID == -QUEST_SORT_SEASONAL || _questSortID == -QUEST_SORT_SPECIAL || _questSortID == -QUEST_SORT_LUNAR_FESTIVAL || _questSortID == -QUEST_SORT_MIDSUMMER || _questSortID == -QUEST_SORT_BREWFEST || _questSortID == -QUEST_SORT_LOVE_IS_IN_THE_AIR || _questSortID == -QUEST_SORT_NOBLEGARDEN) && !IsRepeatable(); }
677 bool IsDailyOrWeekly() const { return (_flags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY)) != 0; }
678 bool IsRaidQuest(Difficulty difficulty) const;
679 bool IsAllowedInRaid(Difficulty difficulty) const;
680 bool IsDFQuest() const { return (_specialFlags & QUEST_SPECIAL_FLAGS_DF_QUEST) != 0; }
682 uint32 CalculateHonorGain(uint8 level) const;
683 bool CanIncreaseRewardedQuestCounters() const;
684
685 // multiple values
686 std::vector<QuestRewardDisplaySpell> RewardDisplaySpell;
687 std::array<uint32, QUEST_REWARD_ITEM_COUNT> RewardItemId = { };
688 std::array<uint32, QUEST_REWARD_ITEM_COUNT> RewardItemCount = { };
689 std::array<uint32, QUEST_ITEM_DROP_COUNT> ItemDrop = { };
690 std::array<uint32, QUEST_ITEM_DROP_COUNT> ItemDropQuantity = { };
691 std::array<LootItemType, QUEST_REWARD_CHOICES_COUNT> RewardChoiceItemType = { };
692 std::array<uint32, QUEST_REWARD_CHOICES_COUNT> RewardChoiceItemId = { };
693 std::array<uint32, QUEST_REWARD_CHOICES_COUNT> RewardChoiceItemCount = { };
694 std::array<uint32, QUEST_REWARD_CHOICES_COUNT> RewardChoiceItemDisplayId = { };
695 std::array<uint32, QUEST_REWARD_REPUTATIONS_COUNT> RewardFactionId = { };
696 std::array<int32, QUEST_REWARD_REPUTATIONS_COUNT> RewardFactionValue = { };
697 std::array<int32, QUEST_REWARD_REPUTATIONS_COUNT> RewardFactionOverride = { };
698 std::array<int32, QUEST_REWARD_REPUTATIONS_COUNT> RewardFactionCapIn = { };
699 std::array<uint32, QUEST_REWARD_CURRENCY_COUNT> RewardCurrencyId = { };
700 std::array<uint32, QUEST_REWARD_CURRENCY_COUNT> RewardCurrencyCount = { };
702 std::array<uint32, QUEST_EMOTE_COUNT> DetailsEmote = { };
703 std::array<uint32, QUEST_EMOTE_COUNT> DetailsEmoteDelay = { };
704 std::array<int32, QUEST_EMOTE_COUNT> OfferRewardEmote = { };
705 std::array<uint32, QUEST_EMOTE_COUNT> OfferRewardEmoteDelay = { };
706
707 uint32 GetRewChoiceItemsCount() const { return _rewChoiceItemsCount; }
708 uint32 GetRewItemsCount() const { return _rewItemsCount; }
709 uint32 GetRewCurrencyCount() const { return _rewCurrencyCount; }
710
711 void SetEventIdForQuest(uint16 eventId) { _eventIdForQuest = eventId; }
712 uint16 GetEventIdForQuest() const { return _eventIdForQuest; }
713
714 void InitializeQueryData();
715 WorldPacket BuildQueryData(LocaleConstant loc, Player* player) const;
716
717 void BuildQuestRewards(WorldPackets::Quest::QuestRewards& rewards, Player* player) const;
718
719 // Helpers
720 static uint32 RoundXPValue(uint32 xp);
721
722 std::vector<uint32> DependentPreviousQuests;
723 std::vector<uint32> DependentBreadcrumbQuests;
724 std::array<WorldPacket, TOTAL_LOCALES> QueryData;
725
726 private:
727 uint32 _rewChoiceItemsCount = 0;
728 uint32 _rewItemsCount = 0;
729 uint16 _eventIdForQuest = 0;
730 uint32 _rewCurrencyCount = 0;
731
732 // wdb data (quest query response)
733 uint32 _id = 0;
734 uint32 _type = 0;
735 uint32 _packageID = 0;
736 uint32 _contentTuningID = 0;
737 int32 _questSortID = 0;
738 uint32 _questInfoID = 0;
739 uint32 _suggestedPlayers = 0;
740 uint32 _nextQuestInChain = 0;
741 uint32 _rewardXPDifficulty = 0;
742 float _rewardXPMultiplier = 0.f;
743 uint32 _rewardMoneyDifficulty = 0;
744 float _rewardMoneyMultiplier = 0.f;
745 uint32 _rewardBonusMoney = 0;
746 uint32 _rewardSpell = 0;
747 uint32 _rewardHonor = 0;
748 uint32 _rewardKillHonor = 0;
749 uint32 _rewardArtifactXPDifficulty = 0;
750 float _rewardArtifactXPMultiplier = 0.f;
751 uint32 _rewardArtifactCategoryID = 0;
752 uint32 _sourceItemId = 0;
753 uint32 _flags = 0;
754 uint32 _flagsEx = 0;
755 uint32 _flagsEx2 = 0;
756 uint32 _poiContinent = 0;
757 float _poix = 0.f;
758 float _poiy = 0.f;
759 uint32 _poiPriority = 0;
760 uint32 _rewardTitleId = 0;
761 int32 _rewardArenaPoints = 0;
762 uint32 _rewardSkillId = 0;
763 uint32 _rewardSkillPoints = 0;
764 uint32 _questGiverPortrait = 0;
765 int32 _questGiverPortraitMount = 0;
766 int32 _questGiverPortraitModelSceneId = 0;
767 uint32 _questTurnInPortrait = 0;
769 uint32 _soundAccept = 0;
770 uint32 _soundTurnIn = 0;
771 uint32 _areaGroupID = 0;
772 int64 _limitTime = 0;
774 int32 _treasurePickerID = 0;
775 int32 _expansion = 0;
776 int32 _managedWorldStateID = 0;
777 int32 _questSessionBonus = 0;
778 std::string _logTitle;
779 std::string _logDescription;
780 std::string _questDescription;
781 std::string _areaDescription;
787
788 // quest_description_conditional
789 std::vector<QuestConditionalText> _conditionalQuestDescription;
790
791 // quest_completion_log_conditional
792 std::vector<QuestConditionalText> _conditionalQuestCompletionLog;
793
794 // quest_request_items table
795 uint32 _emoteOnComplete = 0;
796 uint32 _emoteOnIncomplete = 0;
797 uint32 _emoteOnCompleteDelay = 0;
798 uint32 _emoteOnIncompleteDelay = 0;
799 std::string _requestItemsText;
800
801 // quest_request_items_conditional
802 std::vector<QuestConditionalText> _conditionalRequestItemsText;
803
804 // quest_offer_reward table
805 std::string _offerRewardText;
806
807 // quest_offer_reward_conditional
808 std::vector<QuestConditionalText> _conditionalOfferRewardText;
809
810 // quest_template_addon table (custom data)
811 uint32 _maxLevel = 0;
812 uint32 _allowableClasses = 0;
813 uint32 _sourceSpellID = 0;
814 int32 _prevQuestID = 0;
815 uint32 _nextQuestID = 0;
816 int32 _exclusiveGroup = 0;
817 int32 _breadcrumbForQuestId = 0;
818 uint32 _rewardMailTemplateId = 0;
819 uint32 _rewardMailDelay = 0;
820 uint32 _requiredSkillId = 0;
821 uint32 _requiredSkillPoints = 0;
822 uint32 _requiredMinRepFaction = 0;
823 int32 _requiredMinRepValue = 0;
824 uint32 _requiredMaxRepFaction = 0;
825 int32 _requiredMaxRepValue = 0;
826 uint32 _sourceItemIdCount = 0;
827 uint32 _rewardMailSenderEntry = 0;
828 uint32 _specialFlags = 0; // custom flags, not sniffed/WDB
829 std::bitset<MAX_QUEST_OBJECTIVE_TYPE> _usedQuestObjectiveTypes;
830 uint32 _scriptId = 0;
831};
832
834{
837 time_t AcceptTime = time_t(0);
839 bool Explored = false;
840};
841
842#endif
LocaleConstant
Definition: Common.h:48
Difficulty
Definition: DBCEnums.h:873
#define TC_GAME_API
Definition: Define.h:124
uint8_t uint8
Definition: Define.h:145
int64_t int64
Definition: Define.h:138
int8_t int8
Definition: Define.h:141
int32_t int32
Definition: Define.h:139
uint64_t uint64
Definition: Define.h:142
uint16_t uint16
Definition: Define.h:144
uint32_t uint32
Definition: Define.h:143
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Optional.h:25
QuestCompleteSpellType
Definition: QuestDef.h:377
QuestTagType
Definition: QuestDef.h:310
QuestFailedReason
Definition: QuestDef.h:56
@ QUEST_ERR_ALREADY_DONE
Definition: QuestDef.h:60
@ QUEST_ERR_FAILED_EXPANSION
Definition: QuestDef.h:63
@ QUEST_ERR_FAILED_WRONG_RACE
Definition: QuestDef.h:59
@ QUEST_ERR_ALREADY_ON2
Definition: QuestDef.h:64
@ QUEST_ERR_ONLY_ONE_TIMED
Definition: QuestDef.h:61
@ QUEST_ERR_ALREADY_DONE_DAILY
Definition: QuestDef.h:68
@ QUEST_ERR_FAILED_LOW_LEVEL
Definition: QuestDef.h:58
@ QUEST_ERR_FAILED_NOT_ENOUGH_MONEY
Definition: QuestDef.h:66
@ QUEST_ERR_FAILED_MISSING_ITEMS
Definition: QuestDef.h:65
@ QUEST_ERR_NONE
Definition: QuestDef.h:57
@ QUEST_ERR_HAS_IN_PROGRESS
Definition: QuestDef.h:70
@ QUEST_ERR_FAILED_SPELL
Definition: QuestDef.h:69
@ QUEST_ERR_ALREADY_ON1
Definition: QuestDef.h:62
@ QUEST_ERR_FAILED_CAIS
Definition: QuestDef.h:67
QuestPushReason
Definition: QuestDef.h:75
@ NewPlayerExperienceToRecipient
@ DifferentServerDailyToRecipient
std::vector< QuestObjective > QuestObjectives
Definition: QuestDef.h:515
DEFINE_ENUM_FLAG(QuestGiverStatus)
QuestTradeSkill
Definition: QuestDef.h:121
@ QUEST_TRSKILL_ALCHEMY
Definition: QuestDef.h:123
@ QUEST_TRSKILL_FISHING
Definition: QuestDef.h:134
@ QUEST_TRSKILL_BLACKSMITHING
Definition: QuestDef.h:124
@ QUEST_TRSKILL_TAILORING
Definition: QuestDef.h:132
@ QUEST_TRSKILL_MINING
Definition: QuestDef.h:133
@ QUEST_TRSKILL_HERBALISM
Definition: QuestDef.h:129
@ QUEST_TRSKILL_JEWELCRAFTING
Definition: QuestDef.h:136
@ QUEST_TRSKILL_SKINNING
Definition: QuestDef.h:135
@ QUEST_TRSKILL_COOKING
Definition: QuestDef.h:125
@ QUEST_TRSKILL_NONE
Definition: QuestDef.h:122
@ QUEST_TRSKILL_ENGINEERING
Definition: QuestDef.h:127
@ QUEST_TRSKILL_FIRSTAID
Definition: QuestDef.h:128
@ QUEST_TRSKILL_ENCHANTING
Definition: QuestDef.h:126
@ QUEST_TRSKILL_LEATHERWORKING
Definition: QuestDef.h:130
@ QUEST_TRSKILL_POISONS
Definition: QuestDef.h:131
QuestObjectiveType
Definition: QuestDef.h:330
@ QUEST_OBJECTIVE_DEFEATBATTLEPET
Definition: QuestDef.h:343
@ QUEST_OBJECTIVE_WINPVPPETBATTLES
Definition: QuestDef.h:344
@ QUEST_OBJECTIVE_INCREASE_REPUTATION
Definition: QuestDef.h:349
@ MAX_QUEST_OBJECTIVE_TYPE
Definition: QuestDef.h:354
@ QUEST_OBJECTIVE_HAVE_CURRENCY
Definition: QuestDef.h:347
@ QUEST_OBJECTIVE_WINPETBATTLEAGAINSTNPC
Definition: QuestDef.h:342
@ QUEST_OBJECTIVE_MONSTER
Definition: QuestDef.h:331
@ QUEST_OBJECTIVE_TALKTO
Definition: QuestDef.h:334
@ QUEST_OBJECTIVE_KILL_WITH_LABEL
Definition: QuestDef.h:352
@ QUEST_OBJECTIVE_CRITERIA_TREE
Definition: QuestDef.h:345
@ QUEST_OBJECTIVE_OBTAIN_CURRENCY
Definition: QuestDef.h:348
@ QUEST_OBJECTIVE_PROGRESS_BAR
Definition: QuestDef.h:346
@ QUEST_OBJECTIVE_PLAYERKILLS
Definition: QuestDef.h:340
@ QUEST_OBJECTIVE_ITEM
Definition: QuestDef.h:332
@ QUEST_OBJECTIVE_MONEY
Definition: QuestDef.h:339
@ QUEST_OBJECTIVE_MAX_REPUTATION
Definition: QuestDef.h:338
@ QUEST_OBJECTIVE_AREA_TRIGGER_EXIT
Definition: QuestDef.h:351
@ QUEST_OBJECTIVE_AREATRIGGER
Definition: QuestDef.h:341
@ QUEST_OBJECTIVE_CURRENCY
Definition: QuestDef.h:335
@ QUEST_OBJECTIVE_LEARNSPELL
Definition: QuestDef.h:336
@ QUEST_OBJECTIVE_AREA_TRIGGER_ENTER
Definition: QuestDef.h:350
@ QUEST_OBJECTIVE_GAMEOBJECT
Definition: QuestDef.h:333
@ QUEST_OBJECTIVE_MIN_REPUTATION
Definition: QuestDef.h:337
QuestGiverStatus
Definition: QuestDef.h:152
@ ImportantQuestRewardCompletePOI
@ CovenantCallingRewardCompletePOI
@ ImportantQuestRewardCompleteNoPOI
@ CovenantCallingRewardCompleteNoPOI
QuestObjectiveFlags2
Definition: QuestDef.h:372
@ QUEST_OBJECTIVE_FLAG_2_QUEST_BOUND_ITEM
Definition: QuestDef.h:373
#define MAX_QUEST_LOG_SIZE
Definition: QuestDef.h:43
QuestObjectiveFlags
Definition: QuestDef.h:358
@ QUEST_OBJECTIVE_FLAG_SEQUENCED
Definition: QuestDef.h:360
@ QUEST_OBJECTIVE_FLAG_KILL_PLAYERS_SAME_FACTION
Definition: QuestDef.h:366
@ QUEST_OBJECTIVE_FLAG_IGNORE_SOULBOUND_ITEMS
Definition: QuestDef.h:368
@ QUEST_OBJECTIVE_FLAG_PRESERVE_QUEST_ITEMS
Definition: QuestDef.h:364
@ QUEST_OBJECTIVE_FLAG_HIDDEN
Definition: QuestDef.h:362
@ QUEST_OBJECTIVE_FLAG_PART_OF_PROGRESS_BAR
Definition: QuestDef.h:365
@ QUEST_OBJECTIVE_FLAG_TRACKED_ON_MINIMAP
Definition: QuestDef.h:359
@ QUEST_OBJECTIVE_FLAG_NO_SHARE_PROGRESS
Definition: QuestDef.h:367
@ QUEST_OBJECTIVE_FLAG_OPTIONAL
Definition: QuestDef.h:361
@ QUEST_OBJECTIVE_FLAG_HIDE_CREDIT_MSG
Definition: QuestDef.h:363
QuestFlagsEx
Definition: QuestDef.h:229
@ QUEST_FLAGS_EX_NO_ITEM_REMOVAL
Definition: QuestDef.h:231
@ QUEST_FLAGS_EX_LEGENDARY
Definition: QuestDef.h:239
@ QUEST_FLAGS_EX_DISPLAY_AS_OBJECTIVE
Definition: QuestDef.h:250
@ QUEST_FLAGS_EX_NO_SPELL_COMPLETE_EFFECTS
Definition: QuestDef.h:258
@ QUEST_FLAGS_EX_KEEP_PROGRESS_ON_FACTION_CHANGE
Definition: QuestDef.h:261
@ QUEST_FLAGS_EX_DISPLAY_QUEST_LINE
Definition: QuestDef.h:247
@ QUEST_FLAGS_EX_ACCOUNT
Definition: QuestDef.h:238
@ QUEST_FLAGS_EX_REWARDS_IGNORE_CAPS
Definition: QuestDef.h:254
@ QUEST_FLAGS_EX_DENY_PLAYER_QUESTGIVER
Definition: QuestDef.h:234
@ QUEST_FLAGS_EX_SUPPRESS_SPELL_LEARN_TEXT
Definition: QuestDef.h:249
@ QUEST_FLAGS_EX_AUTO_PUSH
Definition: QuestDef.h:257
@ QUEST_FLAGS_EX_DO_NOT_TOAST_HONOR_REWARD
Definition: QuestDef.h:259
@ QUEST_FLAGS_EX_SUPPRESS_GOSSIP_ACCEPT
Definition: QuestDef.h:233
@ QUEST_FLAGS_EX_DISPLAY_AS_DAILY
Definition: QuestDef.h:246
@ QUEST_FLAGS_EX_INTERNAL_BUILDS_ONLY
Definition: QuestDef.h:248
@ QUEST_FLAGS_EX_SUPPRESS_GREETINGS_ON_ACCEPT
Definition: QuestDef.h:253
@ QUEST_FLAGS_EX_REMOVE_ON_PERIODIC_RESET
Definition: QuestDef.h:237
@ QUEST_FLAGS_EX_PUSH_TEAM_QUEST_USING_MAP_CONTROLLER
Definition: QuestDef.h:262
@ QUEST_FLAGS_EX_NO_CREDIT_FOR_PROXY
Definition: QuestDef.h:245
@ QUEST_FLAGS_EX_UPDATE_ZONE_AURAS
Definition: QuestDef.h:244
@ QUEST_FLAGS_EX_IS_WORLD_QUEST
Definition: QuestDef.h:255
@ QUEST_FLAGS_EX_NONE
Definition: QuestDef.h:230
@ QUEST_FLAGS_EX_DISPLAY_CLASS_CHOICE_REWARDS
Definition: QuestDef.h:235
@ QUEST_FLAGS_EX_DISPLAY_SPEC_CHOICE_REWARDS
Definition: QuestDef.h:236
@ QUEST_FLAGS_EX_NO_ABANDON_ONCE_BEGUN
Definition: QuestDef.h:242
@ QUEST_FLAGS_EX_SUPPRESS_GOSSIP_COMPLETE
Definition: QuestDef.h:232
@ QUEST_FLAGS_EX_REMOVE_ON_WEEKLY_RESET
Definition: QuestDef.h:252
@ QUEST_FLAGS_EX_NO_GUILD_XP
Definition: QuestDef.h:240
@ QUEST_FLAGS_EX_RECAST_ACCEPT_SPELL_ON_LOGIN
Definition: QuestDef.h:243
@ QUEST_FLAGS_EX_NOT_IGNORABLE
Definition: QuestDef.h:256
@ QUEST_FLAGS_EX_RESET_CACHE_ON_ACCEPT
Definition: QuestDef.h:241
@ QUEST_FLAGS_EX_KEEP_REPEATABLE_QUEST_ON_FACTION_CHANGE
Definition: QuestDef.h:260
@ QUEST_FLAGS_EX_ALLOW_ALL_IN_GARRISON
Definition: QuestDef.h:251
QuestStatus
Definition: QuestDef.h:140
@ QUEST_STATUS_REWARDED
Definition: QuestDef.h:147
@ QUEST_STATUS_FAILED
Definition: QuestDef.h:146
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:144
@ QUEST_STATUS_NONE
Definition: QuestDef.h:141
@ MAX_QUEST_STATUS
Definition: QuestDef.h:148
@ QUEST_STATUS_COMPLETE
Definition: QuestDef.h:142
QuestFlagsEx2
Definition: QuestDef.h:266
@ QUEST_FLAGS_EX2_HIDE_REQUIRED_ITEMS_PRE_TURN_IN
Definition: QuestDef.h:290
@ QUEST_FLAGS_EX2_DISPLAY_TIME_REMAINING
Definition: QuestDef.h:284
@ QUEST_FLAGS_EX2_RESET_ON_GAME_MILESTONE
Definition: QuestDef.h:267
@ QUEST_FLAGS_EX2_NOT_REPLAYABLE
Definition: QuestDef.h:270
@ QUEST_FLAGS_EX2_AWARD_HIGHEST_PROFESSION
Definition: QuestDef.h:269
@ QUEST_FLAGS_EX2_HIDE_REQUIRED_ITEMS_ON_TURN_IN
Definition: QuestDef.h:287
@ QUEST_FLAGS_EX2_SUPPRESS_GREETINGS_ON_COMPLETE
Definition: QuestDef.h:286
@ QUEST_FLAGS_EX2_SKIP_DISABLED_CHECK
Definition: QuestDef.h:281
@ QUEST_FLAGS_EX2_ENFORCE_MAXIMUM_QUEST_LEVEL
Definition: QuestDef.h:282
@ QUEST_FLAGS_EX2_HIDE_TASK_ON_MAIN_MAP
Definition: QuestDef.h:279
@ QUEST_FLAGS_EX2_NO_REPLAY_REWARDS
Definition: QuestDef.h:271
@ QUEST_FLAGS_EX2_DISABLE_WAYPOINT_PATHING
Definition: QuestDef.h:272
@ QUEST_FLAGS_EX2_IGNORE_SOULBOUND_ITEMS
Definition: QuestDef.h:288
@ QUEST_FLAGS_EX2_BONUS_LOOT_ALWAYS
Definition: QuestDef.h:278
@ QUEST_FLAGS_EX2_RESET_ON_MYTHIC_PLUS_SEASON
Definition: QuestDef.h:273
@ QUEST_FLAGS_EX2_FORCE_STARTING_LOC_ON_ZONE_MAP
Definition: QuestDef.h:276
@ QUEST_FLAGS_EX2_WAR_MODE_REWARDS_OPT_OUT
Definition: QuestDef.h:268
@ QUEST_FLAGS_EX2_CONTENT_ALERT
Definition: QuestDef.h:283
@ QUEST_FLAGS_EX2_RESET_ON_PVP_SEASON
Definition: QuestDef.h:274
@ QUEST_FLAGS_EX2_DONT_DEFER_START_EFFECTS
Definition: QuestDef.h:289
@ QUEST_FLAGS_EX2_HIDE_TASK_IN_TRACKER
Definition: QuestDef.h:280
@ QUEST_FLAGS_EX2_CLEAR_TASK_PROGRESS_WHEN_ABANDONED
Definition: QuestDef.h:285
@ QUEST_FLAGS_EX2_ENABLE_OVERRIDE_SORT_ORDER
Definition: QuestDef.h:275
@ QUEST_FLAGS_EX2_BONUS_LOOT_NEVER
Definition: QuestDef.h:277
QuestFlags
Definition: QuestDef.h:191
@ QUEST_FLAGS_DISABLE_COMPLETION_TEXT
Definition: QuestDef.h:211
@ QUEST_FLAGS_FLAGS_PVP
Definition: QuestDef.h:206
@ QUEST_FLAGS_DAILY
Definition: QuestDef.h:205
@ QUEST_FLAGS_NONE
Definition: QuestDef.h:192
@ QUEST_FLAGS_HIDE_REWARD_POI
Definition: QuestDef.h:198
@ QUEST_FLAGS_AUTO_COMPLETE
Definition: QuestDef.h:209
@ QUEST_FLAGS_REMOVE_SURPLUS_ITEMS
Definition: QuestDef.h:218
@ QUEST_FLAGS_LAUNCH_GOSSIP_ACCEPT
Definition: QuestDef.h:222
@ QUEST_FLAGS_DEPRECATED
Definition: QuestDef.h:207
@ QUEST_FLAGS_WEEKLY
Definition: QuestDef.h:208
@ QUEST_FLAGS_DISPLAY_ITEM_IN_TRACKER
Definition: QuestDef.h:210
@ QUEST_FLAGS_HAS_CONDITION
Definition: QuestDef.h:197
@ QUEST_FLAGS_COMPLETION_AREA_TRIGGER
Definition: QuestDef.h:195
@ QUEST_FLAGS_RAID_GROUP_OK
Definition: QuestDef.h:199
@ QUEST_FLAGS_AUTO_ACCEPT
Definition: QuestDef.h:212
@ QUEST_FLAGS_UPDATE_PHASESHIFT
Definition: QuestDef.h:215
@ QUEST_FLAGS_COMPLETION_NO_DEATH
Definition: QuestDef.h:193
@ QUEST_FLAGS_SOR_WHITELIST
Definition: QuestDef.h:216
@ QUEST_FLAGS_HIDE_REWARD
Definition: QuestDef.h:202
@ QUEST_FLAGS_WAR_MODE_REWARDS_OPT_IN
Definition: QuestDef.h:200
@ QUEST_FLAGS_SHOW_ITEM_WHEN_COMPLETED
Definition: QuestDef.h:221
@ QUEST_FLAGS_PORTRAIT_IN_QUEST_LOG
Definition: QuestDef.h:220
@ QUEST_FLAGS_SHARABLE
Definition: QuestDef.h:196
@ QUEST_FLAGS_PLAYER_CAST_COMPLETE
Definition: QuestDef.h:214
@ QUEST_FLAGS_DEPRECATE_REPUTATION
Definition: QuestDef.h:204
@ QUEST_FLAGS_COMPLETION_EVENT
Definition: QuestDef.h:194
@ QUEST_FLAGS_ITEMS_GLOW_WHEN_COMPLETE
Definition: QuestDef.h:223
@ QUEST_FLAGS_LAUNCH_GOSSIP_COMPLETE
Definition: QuestDef.h:217
@ QUEST_FLAGS_FAIL_ON_LOGOUT
Definition: QuestDef.h:224
@ QUEST_FLAGS_WELL_KNOWN
Definition: QuestDef.h:219
@ QUEST_FLAGS_PLAYER_CAST_ACCEPT
Definition: QuestDef.h:213
@ QUEST_FLAGS_NO_MONEY_FOR_XP
Definition: QuestDef.h:201
@ QUEST_FLAGS_TRACKING_EVENT
Definition: QuestDef.h:203
QuestSpecialFlags
Definition: QuestDef.h:294
@ QUEST_SPECIAL_FLAGS_SEQUENCED_OBJECTIVES
Definition: QuestDef.h:306
@ QUEST_SPECIAL_FLAGS_AUTO_ACCEPT
Definition: QuestDef.h:299
@ QUEST_SPECIAL_FLAGS_REPEATABLE
Definition: QuestDef.h:297
@ QUEST_SPECIAL_FLAGS_DB_ALLOWED
Definition: QuestDef.h:304
@ QUEST_SPECIAL_FLAGS_AUTO_PUSH_TO_PARTY
Definition: QuestDef.h:298
@ QUEST_SPECIAL_FLAGS_DF_QUEST
Definition: QuestDef.h:300
@ QUEST_SPECIAL_FLAGS_NONE
Definition: QuestDef.h:295
@ QUEST_SPECIAL_FLAGS_MONTHLY
Definition: QuestDef.h:301
@ 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:90
int32 GetRewArenaPoints() const
Definition: QuestDef.h:608
std::string _areaDescription
Definition: QuestDef.h:781
std::vector< QuestConditionalText > _conditionalRequestItemsText
Definition: QuestDef.h:802
std::string _portraitTurnInName
Definition: QuestDef.h:785
float GetXPMultiplier() const
Definition: QuestDef.h:610
uint32 GetRewSpell() const
Definition: QuestDef.h:638
uint16 GetEventIdForQuest() const
Definition: QuestDef.h:712
uint32 GetSpecialFlags() const
Definition: QuestDef.h:659
uint32 GetFlagsEx2() const
Definition: QuestDef.h:658
uint32 GetRewMailSenderEntry() const
Definition: QuestDef.h:641
uint32 GetRewTitle() const
Definition: QuestDef.h:642
std::string const & GetQuestCompletionLog() const
Definition: QuestDef.h:624
std::vector< uint32 > DependentBreadcrumbQuests
Definition: QuestDef.h:723
uint32 GetRewardSkillId() const
Definition: QuestDef.h:662
uint32 GetSoundAccept() const
Definition: QuestDef.h:647
uint32 GetArtifactXPDifficulty() const
Definition: QuestDef.h:634
std::string const & GetPortraitGiverName() const
Definition: QuestDef.h:627
int32 GetQuestSessionBonus() const
Definition: QuestDef.h:668
uint32 GetRewMailTemplateId() const
Definition: QuestDef.h:639
bool HasQuestObjectiveType(QuestObjectiveType type) const
Definition: QuestDef.h:574
std::string const & GetPortraitTurnInName() const
Definition: QuestDef.h:629
bool HasSpecialFlag(QuestSpecialFlags flag) const
Definition: QuestDef.h:572
Trinity::RaceMask< uint64 > _allowableRaces
Definition: QuestDef.h:773
float GetArtifactXPMultiplier() const
Definition: QuestDef.h:635
uint32 GetMaxLevel() const
Definition: QuestDef.h:591
std::string const & GetRequestItemsText() const
Definition: QuestDef.h:622
int32 GetRequiredMaxRepValue() const
Definition: QuestDef.h:600
float GetPOIy() const
Definition: QuestDef.h:645
int32 GetRequiredMinRepValue() const
Definition: QuestDef.h:598
bool IsUnavailable() const
Definition: QuestDef.h:580
std::string _questDescription
Definition: QuestDef.h:780
int32 GetExpansion() const
Definition: QuestDef.h:666
std::vector< QuestConditionalText > const & GetConditionalQuestCompletionLog() const
Definition: QuestDef.h:625
uint32 GetContentTuningId() const
Definition: QuestDef.h:589
uint32 GetQuestPackageID() const
Definition: QuestDef.h:588
std::string _portraitGiverText
Definition: QuestDef.h:782
uint32 GetRewardReputationMask() const
Definition: QuestDef.h:664
uint32 GetQuestGiverPortrait() const
Definition: QuestDef.h:669
uint32 GetPOIContinent() const
Definition: QuestDef.h:643
uint32 GetSrcItemCount() const
Definition: QuestDef.h:613
uint32 GetQuestTurnInPortrait() const
Definition: QuestDef.h:672
bool IsDFQuest() const
Definition: QuestDef.h:680
QuestObjectives Objectives
Definition: QuestDef.h:701
uint32 GetXPDifficulty() const
Definition: QuestDef.h:609
bool IsPushedToPartyOnAccept() const
Definition: QuestDef.h:681
std::string _requestItemsText
Definition: QuestDef.h:799
uint32 GetSrcSpell() const
Definition: QuestDef.h:614
bool IsRepeatable() const
Definition: QuestDef.h:653
int32 GetZoneOrSort() const
Definition: QuestDef.h:590
int64 GetLimitTime() const
Definition: QuestDef.h:602
int32 GetManagedWorldStateId() const
Definition: QuestDef.h:667
uint32 _rewardReputationMask
Definition: QuestDef.h:768
uint32 GetRewKillHonor() const
Definition: QuestDef.h:633
std::bitset< MAX_QUEST_OBJECTIVE_TYPE > _usedQuestObjectiveTypes
Definition: QuestDef.h:829
std::vector< QuestConditionalText > _conditionalQuestDescription
Definition: QuestDef.h:789
uint32 GetArtifactCategoryId() const
Definition: QuestDef.h:636
uint32 GetRequiredMinRepFaction() const
Definition: QuestDef.h:597
std::string _portraitTurnInText
Definition: QuestDef.h:784
uint32 GetFlags() const
Definition: QuestDef.h:656
int32 GetPrevQuestId() const
Definition: QuestDef.h:603
std::string const & GetLogTitle() const
Definition: QuestDef.h:615
uint32 GetQuestType() const
Definition: QuestDef.h:587
std::vector< uint32 > DependentPreviousQuests
Definition: QuestDef.h:722
uint32 GetQuestId() const
Definition: QuestDef.h:586
std::string _logTitle
Definition: QuestDef.h:778
std::string _logDescription
Definition: QuestDef.h:779
uint32 GetRequiredSkillValue() const
Definition: QuestDef.h:596
std::string _portraitGiverName
Definition: QuestDef.h:783
uint32 GetIncompleteEmoteDelay() const
Definition: QuestDef.h:651
std::string const & GetPortraitGiverText() const
Definition: QuestDef.h:626
bool HasFlagEx2(QuestFlagsEx2 flag) const
Definition: QuestDef.h:570
uint32 GetRewMailDelaySecs() const
Definition: QuestDef.h:640
bool IsDaily() const
Definition: QuestDef.h:673
uint32 GetQuestInfoID() const
Definition: QuestDef.h:592
int32 GetExclusiveGroup() const
Definition: QuestDef.h:605
std::vector< QuestConditionalText > const & GetConditionalOfferRewardText() const
Definition: QuestDef.h:621
uint32 GetCompleteEmoteDelay() const
Definition: QuestDef.h:652
std::vector< QuestConditionalText > _conditionalQuestCompletionLog
Definition: QuestDef.h:792
int32 GetBreadcrumbForQuestId() const
Definition: QuestDef.h:606
int32 GetQuestGiverPortraitMount() const
Definition: QuestDef.h:670
bool IsWorldQuest() const
Definition: QuestDef.h:577
std::array< WorldPacket, TOTAL_LOCALES > QueryData
Definition: QuestDef.h:724
std::string const & GetPortraitTurnInText() const
Definition: QuestDef.h:628
uint32 GetFlagsEx() const
Definition: QuestDef.h:657
uint32 GetAreaGroupID() const
Definition: QuestDef.h:661
std::string const & GetOfferRewardText() const
Definition: QuestDef.h:620
void SetEventIdForQuest(uint16 eventId)
Definition: QuestDef.h:711
int32 GetQuestGiverPortraitModelSceneId() const
Definition: QuestDef.h:671
std::vector< QuestConditionalText > const & GetConditionalRequestItemsText() const
Definition: QuestDef.h:623
uint32 GetSoundTurnIn() const
Definition: QuestDef.h:648
std::string const & GetLogDescription() const
Definition: QuestDef.h:616
void SetSpecialFlag(QuestSpecialFlags flag)
Definition: QuestDef.h:573
uint32 GetScriptId() const
Definition: QuestDef.h:660
uint32 GetRewItemsCount() const
Definition: QuestDef.h:708
std::string const & GetAreaDescription() const
Definition: QuestDef.h:619
float GetMoneyMultiplier() const
Definition: QuestDef.h:611
uint32 GetRequiredSkill() const
Definition: QuestDef.h:595
Trinity::RaceMask< uint64 > GetAllowableRaces() const
Definition: QuestDef.h:594
uint32 GetRewChoiceItemsCount() const
Definition: QuestDef.h:707
uint32 GetIncompleteEmote() const
Definition: QuestDef.h:649
uint32 GetRewHonor() const
Definition: QuestDef.h:632
uint32 GetSrcItemId() const
Definition: QuestDef.h:612
bool IsWeekly() const
Definition: QuestDef.h:674
uint32 GetNextQuestId() const
Definition: QuestDef.h:604
std::vector< QuestConditionalText > _conditionalOfferRewardText
Definition: QuestDef.h:808
bool IsSeasonal() const
Definition: QuestDef.h:676
bool IsDailyOrWeekly() const
Definition: QuestDef.h:677
int32 GetTreasurePickerId() const
Definition: QuestDef.h:665
bool IsAutoPush() const
Definition: QuestDef.h:576
std::string _questCompletionLog
Definition: QuestDef.h:786
uint32 GetRewMoneyDifficulty() const
Definition: QuestDef.h:631
float GetPOIx() const
Definition: QuestDef.h:644
uint32 GetCompleteEmote() const
Definition: QuestDef.h:650
QuestObjectives const & GetObjectives() const
Definition: QuestDef.h:630
bool HasFlagEx(QuestFlagsEx flag) const
Definition: QuestDef.h:569
uint32 GetRewCurrencyCount() const
Definition: QuestDef.h:709
std::string const & GetQuestDescription() const
Definition: QuestDef.h:617
bool IsMonthly() const
Definition: QuestDef.h:675
uint32 GetAllowableClasses() const
Definition: QuestDef.h:593
bool HasFlag(QuestFlags flag) const
Definition: QuestDef.h:568
std::string _offerRewardText
Definition: QuestDef.h:805
uint32 GetRewardSkillPoints() const
Definition: QuestDef.h:663
std::vector< QuestRewardDisplaySpell > RewardDisplaySpell
Definition: QuestDef.h:686
uint32 GetPOIPriority() const
Definition: QuestDef.h:646
std::vector< QuestConditionalText > const & GetConditionalQuestDescription() const
Definition: QuestDef.h:618
uint32 GetRequiredMaxRepFaction() const
Definition: QuestDef.h:599
uint32 GetNextQuestInChain() const
Definition: QuestDef.h:607
uint32 GetSuggestedPlayers() const
Definition: QuestDef.h:601
Definition: Spell.h:254
STL namespace.
int32 QuestgiverCreatureId
Definition: QuestDef.h:530
std::vector< std::string > Text
Definition: QuestDef.h:531
std::vector< std::string > Greeting
Definition: QuestDef.h:402
uint32 EmoteDelay
Definition: QuestDef.h:392
QuestGreeting(uint16 emoteType, uint32 emoteDelay, std::string text)
Definition: QuestDef.h:396
uint16 EmoteType
Definition: QuestDef.h:391
std::string Text
Definition: QuestDef.h:393
Optional< uint32 > SpellId
Definition: QuestDef.h:436
Optional< uint32 > ConversationId
Definition: QuestDef.h:437
Optional< uint32 > GameEventId
Definition: QuestDef.h:435
bool IsStoringFlag() const
Definition: QuestDef.h:478
static constexpr bool CanAlwaysBeProgressedInRaid(QuestObjectiveType type)
Definition: QuestDef.h:495
QuestObjectiveAction * CompletionEffect
Definition: QuestDef.h:455
int32 ObjectID
Definition: QuestDef.h:448
uint32 Flags2
Definition: QuestDef.h:451
bool IsStoringValue() const
Definition: QuestDef.h:457
std::string Description
Definition: QuestDef.h:453
int8 StorageIndex
Definition: QuestDef.h:447
std::vector< int32 > VisualEffects
Definition: QuestDef.h:454
uint32 Flags
Definition: QuestDef.h:450
uint32 QuestID
Definition: QuestDef.h:445
int32 Amount
Definition: QuestDef.h:449
float ProgressBarWeight
Definition: QuestDef.h:452
std::vector< std::string > Description
Definition: QuestDef.h:425
std::vector< std::string > RewardText
Definition: QuestDef.h:430
std::vector< std::string > CompletionText
Definition: QuestDef.h:420
QuestCompleteSpellType Type
Definition: QuestDef.h:524
QuestRewardDisplaySpell(uint32 spellId, uint32 playerConditionId, QuestCompleteSpellType type)
Definition: QuestDef.h:520
uint32 Timer
Definition: QuestDef.h:838
QuestStatus Status
Definition: QuestDef.h:836
time_t AcceptTime
Definition: QuestDef.h:837
std::vector< std::string > PortraitTurnInText
Definition: QuestDef.h:413
std::vector< std::string > QuestCompletionLog
Definition: QuestDef.h:415
std::vector< std::string > LogTitle
Definition: QuestDef.h:407
std::vector< std::string > PortraitGiverName
Definition: QuestDef.h:412
std::vector< std::string > PortraitTurnInName
Definition: QuestDef.h:414
std::vector< std::string > QuestDescription
Definition: QuestDef.h:409
std::vector< std::string > LogDescription
Definition: QuestDef.h:408
std::vector< std::string > PortraitGiverText
Definition: QuestDef.h:411
std::vector< std::string > AreaDescription
Definition: QuestDef.h:410