18#ifndef TRINITYCORE_QUEST_H
19#define TRINITYCORE_QUEST_H
36#define MAX_QUEST_LOG_SIZE 25
38#define QUEST_OBJECTIVES_COUNT 4
39#define QUEST_ITEM_OBJECTIVES_COUNT 6
40#define QUEST_ITEM_DROP_COUNT 4
41#define QUEST_REWARD_CHOICES_COUNT 6
42#define QUEST_REWARD_ITEM_COUNT 4
43#define QUEST_REWARD_REPUTATIONS_COUNT 5
44#define QUEST_EMOTE_COUNT 4
45#define QUEST_PVP_KILL_SLOT 0
207 void LoadQuestDetails(
Field* fields);
208 void LoadQuestRequestItems(
Field* fields);
209 void LoadQuestOfferReward(
Field* fields);
210 void LoadQuestTemplateAddon(
Field* fields);
211 void LoadQuestMailSender(
Field* fields);
214 int32 GetRewOrReqMoney(
Player const* player =
nullptr)
const;
225 static bool IsTakingQuestEnabled(
uint32 questId);
270 uint32 GetRewMoneyMaxLevel()
const;
286 bool IsAutoAccept()
const;
287 bool IsAutoComplete()
const;
296 bool IsRaidQuest(
Difficulty difficulty)
const;
297 bool IsAllowedInRaid(
Difficulty difficulty)
const;
300 bool CanIncreaseRewardedQuestCounters()
const;
304 std::array<uint32, QUEST_ITEM_OBJECTIVES_COUNT> RequiredItemId = { };
305 std::array<uint32, QUEST_ITEM_OBJECTIVES_COUNT> RequiredItemCount = { };
306 std::array<uint32, QUEST_ITEM_DROP_COUNT> ItemDrop = { };
307 std::array<uint32, QUEST_ITEM_DROP_COUNT> ItemDropQuantity = { };
308 std::array<int32, QUEST_OBJECTIVES_COUNT> RequiredNpcOrGo = { };
309 std::array<uint32, QUEST_OBJECTIVES_COUNT> RequiredNpcOrGoCount = { };
310 std::array<uint32, QUEST_REWARD_CHOICES_COUNT> RewardChoiceItemId = { };
311 std::array<uint32, QUEST_REWARD_CHOICES_COUNT> RewardChoiceItemCount = { };
312 std::array<uint32, QUEST_REWARD_ITEM_COUNT> RewardItemId = { };
313 std::array<uint32, QUEST_REWARD_ITEM_COUNT> RewardItemCount = { };
314 std::array<uint32, QUEST_REWARD_REPUTATIONS_COUNT> RewardFactionId = { };
315 std::array<int32, QUEST_REWARD_REPUTATIONS_COUNT> RewardFactionValue = { };
316 std::array<int32, QUEST_REWARD_REPUTATIONS_COUNT> RewardFactionOverride = { };
317 std::array<uint32, QUEST_EMOTE_COUNT> DetailsEmote = { };
318 std::array<uint32, QUEST_EMOTE_COUNT> DetailsEmoteDelay = { };
319 std::array<uint32, QUEST_EMOTE_COUNT> OfferRewardEmote = { };
320 std::array<uint32, QUEST_EMOTE_COUNT> OfferRewardEmoteDelay = { };
330 static void AddQuestLevelToTitle(std::string& title,
int32 level);
331 void InitializeQueryData();
382 float _rewardKillHonor = 0.f;
@ INVALIDREASON_DONT_HAVE_REQ
@ INVALIDREASON_QUEST_FAILED_CAIS
@ INVALIDREASON_QUEST_ALREADY_ON2
@ INVALIDREASON_QUEST_ALREADY_ON
@ INVALIDREASON_QUEST_FAILED_MISSING_ITEMS
@ INVALIDREASON_QUEST_FAILED_WRONG_RACE
@ INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY
@ INVALIDREASON_QUEST_ALREADY_DONE
@ INVALIDREASON_QUEST_ONLY_ONE_TIMED
@ INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY
@ INVALIDREASON_QUEST_FAILED_LOW_LEVEL
@ INVALIDREASON_DAILY_QUESTS_REMAINING
@ INVALIDREASON_QUEST_FAILED_EXPANSION
@ QUEST_TRSKILL_BLACKSMITHING
@ QUEST_TRSKILL_TAILORING
@ QUEST_TRSKILL_HERBALISM
@ QUEST_TRSKILL_JEWELCRAFTING
@ QUEST_TRSKILL_ENGINEERING
@ QUEST_TRSKILL_ENCHANTING
@ QUEST_TRSKILL_LEATHERWORKING
#define QUEST_ITEM_OBJECTIVES_COUNT
#define QUEST_OBJECTIVES_COUNT
@ QUEST_FLAGS_PARTY_ACCEPT
@ QUEST_FLAGS_HIDE_REWARD_POI
@ QUEST_FLAGS_NO_MONEY_FROM_XP
@ QUEST_FLAGS_HIDDEN_REWARDS
@ QUEST_FLAGS_DISPLAY_ITEM_IN_TRACKER
@ QUEST_FLAGS_HAS_CONDITION
@ QUEST_FLAGS_AUTO_ACCEPT
@ QUEST_FLAGS_EXPLORATION
@ QUEST_FLAGS_DEPRECATE_REPUTATION
@ QUEST_FLAGS_UNAVAILABLE
@ QUEST_FLAGS_AUTOCOMPLETE
@ DIALOG_STATUS_UNAVAILABLE
@ DIALOG_STATUS_AVAILABLE
@ DIALOG_STATUS_LOW_LEVEL_REWARD_REP
@ DIALOG_STATUS_LOW_LEVEL_AVAILABLE
@ DIALOG_STATUS_REWARD_REP
@ DIALOG_STATUS_INCOMPLETE
@ DIALOG_STATUS_LOW_LEVEL_AVAILABLE_REP
@ DIALOG_STATUS_AVAILABLE_REP
@ QUEST_STATUS_INCOMPLETE
@ QUEST_PARTY_MSG_FINISH_QUEST
@ QUEST_PARTY_MSG_CANT_TAKE_QUEST
@ QUEST_PARTY_MSG_NOT_ELIGIBLE_TODAY
@ QUEST_PARTY_MSG_ACCEPT_QUEST
@ QUEST_PARTY_MSG_HAVE_QUEST
@ QUEST_PARTY_MSG_SHARING_TIMER_EXPIRED
@ QUEST_PARTY_MSG_CANT_BE_SHARED_TODAY
@ QUEST_PARTY_MSG_SHARING_QUEST
@ QUEST_PARTY_MSG_LOG_FULL
@ QUEST_PARTY_MSG_NOT_IN_PARTY
@ QUEST_PARTY_MSG_DECLINE_QUEST
@ QUEST_SPECIAL_FLAGS_COMPLETED_AT_START
@ QUEST_SPECIAL_FLAGS_CAST
@ QUEST_SPECIAL_FLAGS_AUTO_ACCEPT
@ QUEST_SPECIAL_FLAGS_TIMED
@ QUEST_SPECIAL_FLAGS_DELIVER
@ QUEST_SPECIAL_FLAGS_REPEATABLE
@ QUEST_SPECIAL_FLAGS_KILL
@ QUEST_SPECIAL_FLAGS_DB_ALLOWED
@ QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT
@ QUEST_SPECIAL_FLAGS_DF_QUEST
@ QUEST_SPECIAL_FLAGS_NONE
@ QUEST_SPECIAL_FLAGS_SPEAKTO
@ QUEST_SPECIAL_FLAGS_MONTHLY
@ QUEST_SPECIAL_FLAGS_PLAYER_KILL
@ QUEST_SORT_LOVE_IS_IN_THE_AIR
@ QUEST_SORT_LUNAR_FESTIVAL
Class used to access individual fields of database query result.
int32 GetRewArenaPoints() const
std::string _areaDescription
int32 GetRepObjectiveValue() const
uint16 GetEventIdForQuest() const
uint32 GetSpecialFlags() const
Trinity::unique_weak_ptr< Quest > _weakRef
uint32 GetRewMailSenderEntry() const
uint32 GetRewTitle() const
int32 GetRepObjectiveValue2() const
std::string const & GetQuestCompletionLog() const
std::vector< uint32 > DependentBreadcrumbQuests
uint32 GetRepObjectiveFaction() const
uint32 GetReqItemsCount() const
uint32 GetRewMailTemplateId() const
bool HasSpecialFlag(QuestSpecialFlags flag) const
uint32 GetRepObjectiveFaction2() const
uint32 GetMaxLevel() const
std::string const & GetRequestItemsText() const
int32 GetRequiredMaxRepValue() const
int32 GetRequiredMinRepValue() const
uint32 GetMinLevel() const
bool IsUnavailable() const
std::string _questDescription
uint32 GetRewardReputationMask() const
uint32 GetPOIContinent() const
std::array< std::string, QUEST_OBJECTIVES_COUNT > ObjectiveText
uint32 GetSrcItemCount() const
uint32 GetXPDifficulty() const
std::string _requestItemsText
uint32 GetLimitTime() const
uint32 GetAllowableRaces() const
uint32 GetSrcSpell() const
uint32 GetRewDisplaySpell() const
bool IsRepeatable() const
int32 GetZoneOrSort() const
int32 GetQuestLevel() const
uint32 GetRewKillHonor() const
uint32 GetRequiredMinRepFaction() const
int32 GetPrevQuestId() const
uint32 GetPlayersSlain() const
std::string const & GetLogTitle() const
uint32 GetQuestType() const
std::vector< uint32 > DependentPreviousQuests
uint32 GetQuestId() const
std::string _logDescription
uint32 GetRequiredSkillValue() const
uint32 GetIncompleteEmoteDelay() const
uint32 GetRewMailDelaySecs() const
uint32 GetQuestInfoID() const
int32 GetExclusiveGroup() const
int32 GetRewSpell() const
uint32 GetCompleteEmoteDelay() const
int32 GetBreadcrumbForQuestId() const
std::string const & GetOfferRewardText() const
void SetEventIdForQuest(uint16 eventId)
Trinity::unique_weak_ptr< Quest > GetWeakPtr() const
std::string const & GetLogDescription() const
void SetSpecialFlag(QuestSpecialFlags flag)
uint32 GetRewItemsCount() const
std::string const & GetAreaDescription() const
uint32 GetRequiredSkill() const
uint32 GetRewChoiceItemsCount() const
uint32 GetIncompleteEmote() const
uint32 GetRewHonor() const
uint32 GetSrcItemId() const
uint32 GetNextQuestId() const
bool IsDailyOrWeekly() const
std::string _questCompletionLog
uint32 GetReqCreatureOrGOcount() const
uint32 GetCompleteEmote() const
std::string const & GetQuestDescription() const
uint32 GetAllowableClasses() const
uint32 GetBonusTalents() const
bool HasFlag(QuestFlags flag) const
std::string _offerRewardText
uint32 GetPOIPriority() const
uint32 GetRequiredMaxRepFaction() const
uint32 GetNextQuestInChain() const
uint32 GetSuggestedPlayers() const
Trinity::unique_trackable_ptr companion class, replicating what std::weak_ptr is to std::shared_ptr.
std::array< std::vector< std::string >, QUEST_OBJECTIVES_COUNT > ObjectiveText
std::vector< std::string > QuestCompletionLog
std::vector< std::string > LogDescription
std::vector< std::string > AreaDescription
std::vector< std::string > LogTitle
std::vector< std::string > QuestDescription
std::vector< std::string > RewardText
std::vector< std::string > CompletionText
uint16 ItemCount[QUEST_ITEM_OBJECTIVES_COUNT]
uint16 CreatureOrGOCount[QUEST_OBJECTIVES_COUNT]