AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Quest Class Reference

#include "QuestDef.h"

Public Types

typedef std::vector< int32PrevQuests
 
typedef std::vector< uint32PrevChainQuests
 

Public Member Functions

 Quest (Field *questRecord)
 
void LoadQuestDetails (Field *fields)
 
void LoadQuestRequestItems (Field *fields)
 
void LoadQuestOfferReward (Field *fields)
 
void LoadQuestTemplateAddon (Field *fields)
 
uint32 XPValue (uint8 playerLevel=0) const
 
bool HasFlag (uint32 flag) const
 
void SetFlag (uint32 flag)
 
bool HasSpecialFlag (uint32 flag) const
 
void SetSpecialFlag (uint32 flag)
 
uint32 GetQuestId () const
 
uint32 GetQuestMethod () const
 
int32 GetZoneOrSort () const
 
uint32 GetMinLevel () const
 
uint32 GetMaxLevel () const
 
int32 GetQuestLevel () const
 
uint32 GetType () const
 
uint32 GetRequiredClasses () const
 
uint32 GetAllowableRaces () const
 
uint32 GetRequiredSkill () const
 
uint32 GetRequiredSkillValue () const
 
uint32 GetRepObjectiveFaction () const
 
int32 GetRepObjectiveValue () const
 
uint32 GetRepObjectiveFaction2 () const
 
int32 GetRepObjectiveValue2 () const
 
uint32 GetRequiredMinRepFaction () const
 
int32 GetRequiredMinRepValue () const
 
uint32 GetRequiredMaxRepFaction () const
 
int32 GetRequiredMaxRepValue () const
 
uint32 GetSuggestedPlayers () const
 
uint32 GetTimeAllowed () const
 
int32 GetPrevQuestId () const
 
uint32 GetNextQuestId () const
 
int32 GetExclusiveGroup () const
 
uint32 GetBreadcrumbForQuestId () const
 
uint32 GetNextQuestInChain () const
 
uint32 GetCharTitleId () const
 
uint32 GetPlayersSlain () const
 
uint32 GetBonusTalents () const
 
int32 GetRewArenaPoints () const
 
uint32 GetXPId () const
 
uint32 GetSrcItemId () const
 
uint32 GetSrcItemCount () const
 
uint32 GetSrcSpell () const
 
std::string const & GetTitle () const
 
std::string const & GetDetails () const
 
std::string const & GetObjectives () const
 
std::string const & GetOfferRewardText () const
 
std::string const & GetRequestItemsText () const
 
std::string const & GetAreaDescription () const
 
std::string const & GetCompletedText () const
 
int32 GetRewOrReqMoney (uint8 playerLevel=0) const
 
uint32 GetRewHonorAddition () const
 
float GetRewHonorMultiplier () const
 
uint32 GetRewMoneyMaxLevel () const
 
uint32 GetRewSpell () const
 
int32 GetRewSpellCast () const
 
uint32 GetRewMailTemplateId () const
 
uint32 GetRewMailDelaySecs () const
 
uint32 GetRewMailSenderEntry () const
 
uint32 GetPOIContinent () const
 
float GetPOIx () const
 
float GetPOIy () const
 
uint32 GetPointOpt () const
 
uint32 GetIncompleteEmote () const
 
uint32 GetCompleteEmote () const
 
bool IsRepeatable () const
 
bool IsAutoAccept () const
 
bool IsAutoComplete () const
 
uint32 GetFlags () const
 
bool IsDaily () const
 
bool IsWeekly () const
 
bool IsMonthly () const
 
bool IsSeasonal () const
 
bool IsDailyOrWeekly () const
 
bool IsRaidQuest (Difficulty difficulty) const
 
bool IsAllowedInRaid (Difficulty difficulty) const
 
bool IsDFQuest () const
 
bool IsPVPQuest () const
 
uint32 CalculateHonorGain (uint8 level) const
 
uint32 GetReqItemsCount () const
 
uint32 GetReqCreatureOrGOcount () const
 
uint32 GetRewChoiceItemsCount () const
 
uint32 GetRewItemsCount () const
 
void InitializeQueryData ()
 
void SetEventIdForQuest (uint16 eventId)
 
uint16 GetEventIdForQuest () const
 

Public Attributes

std::string ObjectiveText [QUEST_OBJECTIVES_COUNT]
 
uint32 RequiredItemId [QUEST_ITEM_OBJECTIVES_COUNT]
 
uint32 RequiredItemCount [QUEST_ITEM_OBJECTIVES_COUNT]
 
uint32 ItemDrop [QUEST_SOURCE_ITEM_IDS_COUNT]
 
uint32 ItemDropQuantity [QUEST_SOURCE_ITEM_IDS_COUNT]
 
int32 RequiredNpcOrGo [QUEST_OBJECTIVES_COUNT]
 
uint32 RequiredNpcOrGoCount [QUEST_OBJECTIVES_COUNT]
 
uint32 RewardChoiceItemId [QUEST_REWARD_CHOICES_COUNT]
 
uint32 RewardChoiceItemCount [QUEST_REWARD_CHOICES_COUNT]
 
uint32 RewardItemId [QUEST_REWARDS_COUNT]
 
uint32 RewardItemIdCount [QUEST_REWARDS_COUNT]
 
uint32 RewardFactionId [QUEST_REPUTATIONS_COUNT]
 
int32 RewardFactionValueId [QUEST_REPUTATIONS_COUNT]
 
int32 RewardFactionValueIdOverride [QUEST_REPUTATIONS_COUNT]
 
uint32 DetailsEmote [QUEST_EMOTE_COUNT]
 
uint32 DetailsEmoteDelay [QUEST_EMOTE_COUNT]
 
uint32 OfferRewardEmote [QUEST_EMOTE_COUNT]
 
uint32 OfferRewardEmoteDelay [QUEST_EMOTE_COUNT]
 
PrevQuests prevQuests
 
PrevChainQuests prevChainQuests
 
WorldPacket queryData
 

Protected Attributes

uint32 Id
 
uint32 Method
 
int32 ZoneOrSort
 
uint32 MinLevel
 
int32 Level
 
uint32 Type
 
uint32 AllowableRaces
 
uint32 RequiredFactionId1
 
int32 RequiredFactionValue1
 
uint32 RequiredFactionId2
 
int32 RequiredFactionValue2
 
uint32 SuggestedPlayers
 
uint32 TimeAllowed
 
uint32 Flags
 
uint32 RewardTitleId
 
uint32 RequiredPlayerKills
 
uint32 RewardTalents
 
int32 RewardArenaPoints
 
uint32 RewardNextQuest
 
uint32 RewardXPDifficulty
 
uint32 StartItem
 
std::string Title
 
std::string Details
 
std::string Objectives
 
std::string OfferRewardText
 
std::string RequestItemsText
 
std::string AreaDescription
 
std::string CompletedText
 
uint32 RewardHonor
 
float RewardKillHonor
 
int32 RewardMoney
 
uint32 RewardMoneyDifficulty
 
uint32 RewardDisplaySpell
 
int32 RewardSpell
 
uint32 POIContinent
 
float POIx
 
float POIy
 
uint32 POIPriority
 
uint32 EmoteOnIncomplete
 
uint32 EmoteOnComplete
 
uint32 MaxLevel = 0
 
uint32 RequiredClasses = 0
 
uint32 SourceSpellid = 0
 
int32 PrevQuestId = 0
 
uint32 NextQuestId = 0
 
int32 ExclusiveGroup = 0
 
uint32 BreadcrumbForQuestId = 0
 
uint32 RewardMailTemplateId = 0
 
uint32 RewardMailDelay = 0
 
uint32 RequiredSkillId = 0
 
uint32 RequiredSkillPoints = 0
 
uint32 RequiredMinRepFaction = 0
 
int32 RequiredMinRepValue = 0
 
uint32 RequiredMaxRepFaction = 0
 
int32 RequiredMaxRepValue = 0
 
uint32 StartItemCount = 0
 
uint32 RewardMailSenderEntry = 0
 
uint32 SpecialFlags = 0
 

Private Attributes

uint32 _reqItemsCount
 
uint32 _reqCreatureOrGOcount
 
uint32 _rewChoiceItemsCount
 
uint32 _rewItemsCount
 
uint16 _eventIdForQuest
 

Friends

class ObjectMgr
 

Detailed Description

Member Typedef Documentation

◆ PrevChainQuests

typedef std::vector<uint32> Quest::PrevChainQuests

◆ PrevQuests

typedef std::vector<int32> Quest::PrevQuests

Constructor & Destructor Documentation

◆ Quest()

Quest::Quest ( Field questRecord)
25{
32
33 Id = questRecord[0].Get<uint32>();
34 Method = questRecord[1].Get<uint8>();
35 Level = questRecord[2].Get<int16>();
36 MinLevel = questRecord[3].Get<uint8>();
37 ZoneOrSort = questRecord[4].Get<int16>();
38 Type = questRecord[5].Get<uint16>();
39 SuggestedPlayers = questRecord[6].Get<uint8>();
40 TimeAllowed = questRecord[7].Get<uint32>();
41 AllowableRaces = questRecord[8].Get<uint32>();
42 RequiredFactionId1 = questRecord[9].Get<uint16>();
43 RequiredFactionId2 = questRecord[10].Get<uint16>();
44 RequiredFactionValue1 = questRecord[11].Get<int32>();
45 RequiredFactionValue2 = questRecord[12].Get<int32>();
46 RewardNextQuest = questRecord[13].Get<uint32>();
47 RewardXPDifficulty = questRecord[14].Get<uint8>();
48 RewardMoney = questRecord[15].Get<int32>();
49 RewardMoneyDifficulty = questRecord[16].Get<uint32>();
50 RewardDisplaySpell = questRecord[17].Get<uint32>();
51 RewardSpell = questRecord[18].Get<int32>();
52 RewardHonor = questRecord[19].Get<uint32>();
53 RewardKillHonor = questRecord[20].Get<float>();
54 StartItem = questRecord[21].Get<uint32>();
55 Flags = questRecord[22].Get<uint32>();
56 RewardTitleId = questRecord[23].Get<uint8>();
57 RequiredPlayerKills = questRecord[24].Get<uint8>();
58 RewardTalents = questRecord[25].Get<uint8>();
59 RewardArenaPoints = questRecord[26].Get<uint16>();
60
61 for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
62 {
63 RewardItemId[i] = questRecord[27 + i * 2].Get<uint32>();
64 RewardItemIdCount[i] = questRecord[28 + i * 2].Get<uint16>();
65
66 if (RewardItemId[i])
68 }
69
70 for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
71 {
72 RewardChoiceItemId[i] = questRecord[35 + i * 2].Get<uint32>();
73 RewardChoiceItemCount[i] = questRecord[36 + i * 2].Get<uint16>();
74
75 if (RewardChoiceItemId[i])
77 }
78
79 for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
80 {
81 RewardFactionId[i] = questRecord[47 + i * 3].Get<uint16>();
82 RewardFactionValueId[i] = questRecord[48 + i * 3].Get<int32>();
83 RewardFactionValueIdOverride[i] = questRecord[49 + i * 3].Get<int32>();
84 }
85
86 POIContinent = questRecord[62].Get<uint16>();
87 POIx = questRecord[63].Get<float>();
88 POIy = questRecord[64].Get<float>();
89 POIPriority = questRecord[65].Get<uint32>();
90 Title = questRecord[66].Get<std::string>();
91 Objectives = questRecord[67].Get<std::string>();
92 Details = questRecord[68].Get<std::string>();
93 AreaDescription = questRecord[69].Get<std::string>();
94 CompletedText = questRecord[70].Get<std::string>();
95
96 for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
97 {
98 RequiredNpcOrGo[i] = questRecord[71 + i].Get<int32>();
99 RequiredNpcOrGoCount[i] = questRecord[75 + i].Get<uint16>();
100 ObjectiveText[i] = questRecord[100 + i].Get<std::string>();
101
102 if (RequiredNpcOrGo[i])
104 }
105
106 for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
107 {
108 ItemDrop[i] = questRecord[79 + i].Get<uint32>();
109 ItemDropQuantity[i] = questRecord[83 + i].Get<uint16>();
110 }
111
112 for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
113 {
114 RequiredItemId[i] = questRecord[87 + i].Get<uint32>();
115 RequiredItemCount[i] = questRecord[93 + i].Get<uint16>();
116
117 if (RequiredItemId[i])
119 }
120
121 // int8 Unknown0 = questRecord[100].Get<uint8>();
122 // int32 VerifiedBuild = questRecord[105].Get<int32>();
123
124 for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
125 {
126 DetailsEmote[i] = 0;
127 DetailsEmoteDelay[i] = 0;
128 OfferRewardEmote[i] = 0;
130 }
131
133
134 if (sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_ACCEPT))
135 {
136 Flags &= ~QUEST_FLAGS_AUTO_ACCEPT;
137 }
138
139 if (sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_COMPLETE))
140 {
141 Flags &= ~QUEST_FLAGS_AUTOCOMPLETE;
142 }
143}
std::int32_t int32
Definition Define.h:103
std::uint8_t uint8
Definition Define.h:109
std::uint32_t uint32
Definition Define.h:107
std::uint16_t uint16
Definition Define.h:108
std::int16_t int16
Definition Define.h:104
#define QUEST_REWARDS_COUNT
Definition QuestDef.h:39
#define QUEST_ITEM_OBJECTIVES_COUNT
Definition QuestDef.h:36
#define QUEST_EMOTE_COUNT
Definition QuestDef.h:42
#define QUEST_OBJECTIVES_COUNT
Definition QuestDef.h:35
#define QUEST_REPUTATIONS_COUNT
Definition QuestDef.h:41
#define QUEST_SOURCE_ITEM_IDS_COUNT
Definition QuestDef.h:37
#define QUEST_REWARD_CHOICES_COUNT
Definition QuestDef.h:38
@ CONFIG_QUEST_IGNORE_AUTO_COMPLETE
Definition WorldConfig.h:106
@ CONFIG_QUEST_IGNORE_AUTO_ACCEPT
Definition WorldConfig.h:105
std::enable_if_t< std::is_arithmetic_v< T >, T > Get() const
Definition Field.h:112
int32 Level
Definition QuestDef.h:350
uint32 ItemDropQuantity[QUEST_SOURCE_ITEM_IDS_COUNT]
Definition QuestDef.h:304
uint32 DetailsEmote[QUEST_EMOTE_COUNT]
Definition QuestDef.h:314
uint32 OfferRewardEmote[QUEST_EMOTE_COUNT]
Definition QuestDef.h:316
float POIx
Definition QuestDef.h:381
int32 RequiredNpcOrGo[QUEST_OBJECTIVES_COUNT]
Definition QuestDef.h:305
uint32 MinLevel
Definition QuestDef.h:349
int32 RequiredFactionValue2
Definition QuestDef.h:356
int32 RequiredFactionValue1
Definition QuestDef.h:354
int32 ZoneOrSort
Definition QuestDef.h:348
uint32 RequiredNpcOrGoCount[QUEST_OBJECTIVES_COUNT]
Definition QuestDef.h:306
std::string AreaDescription
Definition QuestDef.h:372
uint32 RewardTitleId
Definition QuestDef.h:360
uint32 Type
Definition QuestDef.h:351
uint32 RewardItemIdCount[QUEST_REWARDS_COUNT]
Definition QuestDef.h:310
uint32 Method
Definition QuestDef.h:347
float POIy
Definition QuestDef.h:382
uint32 _rewItemsCount
Definition QuestDef.h:340
uint32 RewardChoiceItemId[QUEST_REWARD_CHOICES_COUNT]
Definition QuestDef.h:307
uint32 _rewChoiceItemsCount
Definition QuestDef.h:339
uint32 ItemDrop[QUEST_SOURCE_ITEM_IDS_COUNT]
Definition QuestDef.h:303
uint32 RewardXPDifficulty
Definition QuestDef.h:365
int32 RewardFactionValueIdOverride[QUEST_REPUTATIONS_COUNT]
Definition QuestDef.h:313
uint16 _eventIdForQuest
Definition QuestDef.h:342
uint32 _reqItemsCount
Definition QuestDef.h:337
uint32 DetailsEmoteDelay[QUEST_EMOTE_COUNT]
Definition QuestDef.h:315
uint32 EmoteOnComplete
Definition QuestDef.h:385
int32 RewardSpell
Definition QuestDef.h:379
uint32 RewardTalents
Definition QuestDef.h:362
int32 RewardMoney
Definition QuestDef.h:376
uint32 RewardChoiceItemCount[QUEST_REWARD_CHOICES_COUNT]
Definition QuestDef.h:308
uint32 POIContinent
Definition QuestDef.h:380
uint32 AllowableRaces
Definition QuestDef.h:352
uint32 RewardNextQuest
Definition QuestDef.h:364
uint32 RequiredPlayerKills
Definition QuestDef.h:361
uint32 EmoteOnIncomplete
Definition QuestDef.h:384
uint32 OfferRewardEmoteDelay[QUEST_EMOTE_COUNT]
Definition QuestDef.h:317
uint32 StartItem
Definition QuestDef.h:366
uint32 Id
Definition QuestDef.h:346
uint32 _reqCreatureOrGOcount
Definition QuestDef.h:338
std::string ObjectiveText[QUEST_OBJECTIVES_COUNT]
Definition QuestDef.h:300
std::string CompletedText
Definition QuestDef.h:373
uint32 Flags
Definition QuestDef.h:359
int32 RewardArenaPoints
Definition QuestDef.h:363
uint32 RequiredItemCount[QUEST_ITEM_OBJECTIVES_COUNT]
Definition QuestDef.h:302
uint32 TimeAllowed
Definition QuestDef.h:358
std::string Title
Definition QuestDef.h:367
uint32 RequiredFactionId1
Definition QuestDef.h:353
uint32 RequiredFactionId2
Definition QuestDef.h:355
uint32 RewardDisplaySpell
Definition QuestDef.h:378
uint32 RequiredItemId[QUEST_ITEM_OBJECTIVES_COUNT]
Definition QuestDef.h:301
std::string Objectives
Definition QuestDef.h:369
uint32 SuggestedPlayers
Definition QuestDef.h:357
float RewardKillHonor
Definition QuestDef.h:375
uint32 RewardFactionId[QUEST_REPUTATIONS_COUNT]
Definition QuestDef.h:311
uint32 RewardHonor
Definition QuestDef.h:374
std::string Details
Definition QuestDef.h:368
int32 RewardFactionValueId[QUEST_REPUTATIONS_COUNT]
Definition QuestDef.h:312
uint32 RewardItemId[QUEST_REWARDS_COUNT]
Definition QuestDef.h:309
uint32 RewardMoneyDifficulty
Definition QuestDef.h:377
uint32 POIPriority
Definition QuestDef.h:383
#define sWorld
Definition World.h:316

References _eventIdForQuest, _reqCreatureOrGOcount, _reqItemsCount, _rewChoiceItemsCount, _rewItemsCount, AllowableRaces, AreaDescription, CompletedText, CONFIG_QUEST_IGNORE_AUTO_ACCEPT, CONFIG_QUEST_IGNORE_AUTO_COMPLETE, Details, DetailsEmote, DetailsEmoteDelay, EmoteOnComplete, EmoteOnIncomplete, Flags, Field::Get(), Id, ItemDrop, ItemDropQuantity, Level, Method, MinLevel, Objectives, ObjectiveText, OfferRewardEmote, OfferRewardEmoteDelay, POIContinent, POIPriority, POIx, POIy, QUEST_EMOTE_COUNT, QUEST_ITEM_OBJECTIVES_COUNT, QUEST_OBJECTIVES_COUNT, QUEST_REPUTATIONS_COUNT, QUEST_REWARD_CHOICES_COUNT, QUEST_REWARDS_COUNT, QUEST_SOURCE_ITEM_IDS_COUNT, RequiredFactionId1, RequiredFactionId2, RequiredFactionValue1, RequiredFactionValue2, RequiredItemCount, RequiredItemId, RequiredNpcOrGo, RequiredNpcOrGoCount, RequiredPlayerKills, RewardArenaPoints, RewardChoiceItemCount, RewardChoiceItemId, RewardDisplaySpell, RewardFactionId, RewardFactionValueId, RewardFactionValueIdOverride, RewardHonor, RewardItemId, RewardItemIdCount, RewardKillHonor, RewardMoney, RewardMoneyDifficulty, RewardNextQuest, RewardSpell, RewardTalents, RewardTitleId, RewardXPDifficulty, StartItem, SuggestedPlayers, sWorld, TimeAllowed, Title, Type, and ZoneOrSort.

Member Function Documentation

◆ CalculateHonorGain()

uint32 Quest::CalculateHonorGain ( uint8  level) const
306{
307 if (level > GT_MAX_LEVEL)
308 level = GT_MAX_LEVEL;
309
310 uint32 honor = 0;
311
312 if (GetRewHonorAddition() > 0 || GetRewHonorMultiplier() > 0.0f)
313 {
314 // values stored from 0.. for 1...
315 TeamContributionPointsEntry const* tc = sTeamContributionPointsStore.LookupEntry(level);
316 if (!tc)
317 return 0;
318 honor = uint32(tc->value * GetRewHonorMultiplier() * 0.1000000014901161);
319
320 // Xinef: exactly this is calculated above, however with higher precision...
321 //honor += Acore::Honor::hk_honor_at_level(level, GetRewHonorMultiplier());
322 honor += GetRewHonorAddition();
323 }
324
325 return honor;
326}
DBCStorage< TeamContributionPointsEntry > sTeamContributionPointsStore(TeamContributionPointsfmt)
#define GT_MAX_LEVEL
Definition DBCStructure.h:1039
float GetRewHonorMultiplier() const
Definition QuestDef.h:271
uint32 GetRewHonorAddition() const
Definition QuestDef.h:270
Definition DBCStructure.h:1988
float value
Definition DBCStructure.h:1990

References GetRewHonorAddition(), GetRewHonorMultiplier(), GT_MAX_LEVEL, sTeamContributionPointsStore, and TeamContributionPointsEntry::value.

Referenced by quest_commandscript::HandleQuestReward(), Player::RewardQuest(), PlayerMenu::SendQuestGiverOfferReward(), PlayerMenu::SendQuestGiverQuestDetails(), and Player::SendQuestReward().

◆ GetAllowableRaces()

uint32 Quest::GetAllowableRaces ( ) const
inline
236{ return AllowableRaces; }

References AllowableRaces.

Referenced by Player::SatisfyQuestRace().

◆ GetAreaDescription()

std::string const & Quest::GetAreaDescription ( ) const
inline

◆ GetBonusTalents()

◆ GetBreadcrumbForQuestId()

uint32 Quest::GetBreadcrumbForQuestId ( ) const
inline
252{ return BreadcrumbForQuestId; }
uint32 BreadcrumbForQuestId
Definition QuestDef.h:394

References BreadcrumbForQuestId.

Referenced by ObjectMgr::LoadQuests(), and Player::SatisfyQuestBreadcrumb().

◆ GetCharTitleId()

◆ GetCompletedText()

std::string const & Quest::GetCompletedText ( ) const
inline

◆ GetCompleteEmote()

uint32 Quest::GetCompleteEmote ( ) const
inline

◆ GetDetails()

std::string const & Quest::GetDetails ( ) const
inline

◆ GetEventIdForQuest()

uint16 Quest::GetEventIdForQuest ( ) const
inline

◆ GetExclusiveGroup()

int32 Quest::GetExclusiveGroup ( ) const
inline
251{ return ExclusiveGroup; }
int32 ExclusiveGroup
Definition QuestDef.h:393

References ExclusiveGroup.

Referenced by ObjectMgr::LoadQuests(), Player::SatisfyQuestExclusiveGroup(), and Player::SatisfyQuestPreviousQuest().

◆ GetFlags()

◆ GetIncompleteEmote()

uint32 Quest::GetIncompleteEmote ( ) const
inline

◆ GetMaxLevel()

uint32 Quest::GetMaxLevel ( ) const
inline
232{ return MaxLevel; }
uint32 MaxLevel
Definition QuestDef.h:388

References MaxLevel.

Referenced by Player::SatisfyQuestLevel().

◆ GetMinLevel()

uint32 Quest::GetMinLevel ( ) const
inline

◆ GetNextQuestId()

uint32 Quest::GetNextQuestId ( ) const
inline
250{ return NextQuestId; }
uint32 NextQuestId
Definition QuestDef.h:392

References NextQuestId.

Referenced by ObjectMgr::LoadQuests().

◆ GetNextQuestInChain()

uint32 Quest::GetNextQuestInChain ( ) const
inline

◆ GetObjectives()

std::string const & Quest::GetObjectives ( ) const
inline

◆ GetOfferRewardText()

std::string const & Quest::GetOfferRewardText ( ) const
inline
265{ return OfferRewardText; }
std::string OfferRewardText
Definition QuestDef.h:370

References OfferRewardText.

Referenced by PlayerMenu::SendQuestGiverOfferReward().

◆ GetPlayersSlain()

◆ GetPOIContinent()

uint32 Quest::GetPOIContinent ( ) const
inline

◆ GetPointOpt()

uint32 Quest::GetPointOpt ( ) const
inline

◆ GetPOIx()

float Quest::GetPOIx ( ) const
inline
279{ return POIx; }

References POIx.

Referenced by InitializeQueryData(), and PlayerMenu::SendQuestQueryResponse().

◆ GetPOIy()

float Quest::GetPOIy ( ) const
inline
280{ return POIy; }

References POIy.

Referenced by InitializeQueryData(), and PlayerMenu::SendQuestQueryResponse().

◆ GetPrevQuestId()

int32 Quest::GetPrevQuestId ( ) const
inline
249{ return PrevQuestId; }
int32 PrevQuestId
Definition QuestDef.h:391

References PrevQuestId.

Referenced by ObjectMgr::LoadQuests().

◆ GetQuestId()

uint32 Quest::GetQuestId ( ) const
inline
228{ return Id; }

References Id.

Referenced by Player::AddQuest(), Player::AddQuestAndCheckCompletion(), Player::AdjustQuestReqItemCount(), Player::CanRewardQuest(), Player::CanSeeStartQuest(), Player::CanTakeQuest(), npc_wg_quest_giver::GetDialogStatus(), Player::GetQuestDialogStatus(), go_commandscript::HandleGoQuestCommand(), quest_commandscript::HandleQuestAdd(), quest_commandscript::HandleQuestComplete(), quest_commandscript::HandleQuestRemove(), quest_commandscript::HandleQuestReward(), quest_commandscript::HandleQuestStatus(), InitializeQueryData(), LinkValidator< LinkTags::quest >::IsTextValid(), npc_escortAI::JustDied(), FollowerAI::JustDied(), Player::KilledPlayerCreditForQuest(), ObjectMgr::LoadQuests(), Condition::Meets(), QuestApprenticeAnglerPlayerScript::OnPlayerCompleteQuest(), npc_cos_chromie_start::OnQuestAccept(), npc_cos_chromie_middle::OnQuestAccept(), npc_chicken_cluck::OnQuestAccept(), npc_steward_of_time::OnQuestAccept(), npc_kernobee::OnQuestAccept(), npc_daphne_stilwell::OnQuestAccept(), npc_mikhail::OnQuestAccept(), npc_kerlonian::OnQuestAccept(), npc_prospector_remtravel::OnQuestAccept(), npc_tooga::OnQuestAccept(), npc_gilthares::OnQuestAccept(), npc_lakota_windsong::OnQuestAccept(), npc_paoka_swiftmountain::OnQuestAccept(), npc_ringo::OnQuestAccept(), npc_engineer_helice::OnQuestAccept(), npc_maghar_captive::OnQuestAccept(), npc_kurenai_captive::OnQuestAccept(), npc_maxx_a_million_escort::OnQuestAccept(), npc_eris_hevenfire::OnQuestAccept(), npc_deathstalker_erland::OnQuestAccept(), npc_tyrion::OnQuestAccept(), npc_cork_gizelton::OnQuestAccept(), npc_shenthul::OnQuestAccept(), npc_kaya_flathoof::OnQuestAccept(), npc_wizzlecrank_shredder::OnQuestAccept(), npc_ame::OnQuestAccept(), npc_ranshalla::OnQuestAccept(), npc_lurgglbr::OnQuestAccept(), npc_mootoo_the_younger::OnQuestAccept(), npc_bonker_togglevolt::OnQuestAccept(), npc_emily::OnQuestAccept(), npc_apothecary_hanes::OnQuestAccept(), npc_battle_at_valhalas::OnQuestAccept(), npc_finklestein::OnQuestAccept(), npc_bessy::OnQuestAccept(), npc_karynaku::OnQuestAccept(), npc_isla_starmane::OnQuestAccept(), npc_doctor::OnQuestAccept(), go_crystal_prison::OnQuestAccept(), go_crystalline_tear::OnQuestAccept(), npc_chicken_cluck::OnQuestComplete(), npc_suns_reach_reclamation::OnQuestReward(), npc_sunwell_gate::OnQuestReward(), boss_apothecary_hummel::OnQuestReward(), npc_rocknot::OnQuestReward(), npc_king_varian_wrynn::OnQuestReward(), npc_thrall_bfu::OnQuestReward(), npc_lady_sylvanas_windrunner::OnQuestReward(), npc_tharnarian::OnQuestReward(), npc_thrall_warchief::OnQuestReward(), npc_elder_clearwater::OnQuestReward(), npc_riggle_bassbait::OnQuestReward(), Player::PrettyPrintRequirementsQuestList(), SmartGameObjectAI::QuestAccept(), SmartGameObjectAI::QuestReward(), Player::RewardQuest(), Player::SatisfyQuestBreadcrumb(), Player::SatisfyQuestConditions(), Player::SatisfyQuestDay(), Player::SatisfyQuestExclusiveGroup(), Player::SatisfyQuestMonth(), Player::SatisfyQuestSeasonal(), Player::SatisfyQuestStatus(), Player::SatisfyQuestWeek(), Player::SendQuestConfirmAccept(), PlayerMenu::SendQuestGiverOfferReward(), PlayerMenu::SendQuestGiverQuestDetails(), PlayerMenu::SendQuestGiverRequestItems(), PlayerMenu::SendQuestQueryResponse(), Player::SendQuestReward(), Player::SendQuestUpdateAddCreatureOrGo(), Player::SendQuestUpdateAddPlayer(), npc_koltira_deathweaver::npc_koltira_deathweaverAI::sQuestAccept(), npc_costumed_orphan_matron::sQuestAccept(), npc_belnistrasz::npc_belnistraszAI::sQuestAccept(), SmartAI::sQuestAccept(), npc_professor_phizzlethorpe::npc_professor_phizzlethorpeAI::sQuestAccept(), npc_ranger_lilatha::sQuestAccept(), npc_rinji::npc_rinjiAI::sQuestAccept(), npc_corporal_keeshan::npc_corporal_keeshanAI::sQuestAccept(), npc_deathstalker_fearleia::sQuestAccept(), npc_muglash::npc_muglashAI::sQuestAccept(), npc_magwin::npc_magwinAI::sQuestAccept(), npc_wounded_blood_elf::npc_wounded_blood_elfAI::sQuestAccept(), SmartAI::sQuestReward(), and npc_escortAI::Start().

◆ GetQuestLevel()

int32 Quest::GetQuestLevel ( ) const
inline

◆ GetQuestMethod()

◆ GetRepObjectiveFaction()

◆ GetRepObjectiveFaction2()

◆ GetRepObjectiveValue()

◆ GetRepObjectiveValue2()

◆ GetReqCreatureOrGOcount()

uint32 Quest::GetReqCreatureOrGOcount ( ) const
inline
320{ return _reqCreatureOrGOcount; }

References _reqCreatureOrGOcount.

◆ GetReqItemsCount()

uint32 Quest::GetReqItemsCount ( ) const
inline
319{ return _reqItemsCount; }

References _reqItemsCount.

Referenced by PlayerMenu::SendQuestGiverRequestItems().

◆ GetRequestItemsText()

std::string const & Quest::GetRequestItemsText ( ) const
inline
266{ return RequestItemsText; }
std::string RequestItemsText
Definition QuestDef.h:371

References RequestItemsText.

Referenced by PlayerMenu::SendQuestGiverRequestItems().

◆ GetRequiredClasses()

uint32 Quest::GetRequiredClasses ( ) const
inline
235{ return RequiredClasses; }
uint32 RequiredClasses
Definition QuestDef.h:389

References RequiredClasses.

Referenced by Player::SatisfyQuestClass().

◆ GetRequiredMaxRepFaction()

uint32 Quest::GetRequiredMaxRepFaction ( ) const
inline
245{ return RequiredMaxRepFaction; }
uint32 RequiredMaxRepFaction
Definition QuestDef.h:401

References RequiredMaxRepFaction.

Referenced by Player::SatisfyQuestReputation().

◆ GetRequiredMaxRepValue()

int32 Quest::GetRequiredMaxRepValue ( ) const
inline
246{ return RequiredMaxRepValue; }
int32 RequiredMaxRepValue
Definition QuestDef.h:402

References RequiredMaxRepValue.

Referenced by Player::SatisfyQuestReputation().

◆ GetRequiredMinRepFaction()

uint32 Quest::GetRequiredMinRepFaction ( ) const
inline
243{ return RequiredMinRepFaction; }
uint32 RequiredMinRepFaction
Definition QuestDef.h:399

References RequiredMinRepFaction.

Referenced by Player::SatisfyQuestReputation().

◆ GetRequiredMinRepValue()

int32 Quest::GetRequiredMinRepValue ( ) const
inline
244{ return RequiredMinRepValue; }
int32 RequiredMinRepValue
Definition QuestDef.h:400

References RequiredMinRepValue.

Referenced by Player::SatisfyQuestReputation().

◆ GetRequiredSkill()

uint32 Quest::GetRequiredSkill ( ) const
inline
237{ return RequiredSkillId; }
uint32 RequiredSkillId
Definition QuestDef.h:397

References RequiredSkillId.

Referenced by Player::SatisfyQuestSkill().

◆ GetRequiredSkillValue()

uint32 Quest::GetRequiredSkillValue ( ) const
inline
238{ return RequiredSkillPoints; }
uint32 RequiredSkillPoints
Definition QuestDef.h:398

References RequiredSkillPoints.

Referenced by Player::SatisfyQuestSkill().

◆ GetRewArenaPoints()

◆ GetRewChoiceItemsCount()

◆ GetRewHonorAddition()

uint32 Quest::GetRewHonorAddition ( ) const
inline

◆ GetRewHonorMultiplier()

float Quest::GetRewHonorMultiplier ( ) const
inline

◆ GetRewItemsCount()

◆ GetRewMailDelaySecs()

uint32 Quest::GetRewMailDelaySecs ( ) const
inline
276{ return RewardMailDelay; }
uint32 RewardMailDelay
Definition QuestDef.h:396

References RewardMailDelay.

Referenced by quest_commandscript::HandleQuestReward(), and Player::RewardQuest().

◆ GetRewMailSenderEntry()

uint32 Quest::GetRewMailSenderEntry ( ) const
inline
277{ return RewardMailSenderEntry; }
uint32 RewardMailSenderEntry
Definition QuestDef.h:404

References RewardMailSenderEntry.

Referenced by quest_commandscript::HandleQuestReward(), and Player::RewardQuest().

◆ GetRewMailTemplateId()

uint32 Quest::GetRewMailTemplateId ( ) const
inline
275{ return RewardMailTemplateId; }
uint32 RewardMailTemplateId
Definition QuestDef.h:395

References RewardMailTemplateId.

Referenced by quest_commandscript::HandleQuestReward(), and Player::RewardQuest().

◆ GetRewMoneyMaxLevel()

uint32 Quest::GetRewMoneyMaxLevel ( ) const
259{
260 uint32 rewMoney = 0;
261
263 return rewMoney;
264
265 rewMoney = (XPValue(sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) * (6 * COPPER));
266 // https://wowpedia.fandom.com/wiki/Quest?oldid=1035002 Formula is XP gained * 6c
267 return static_cast<int32>(rewMoney * sWorld->getRate(RATE_REWARD_BONUS_MONEY));
268}
@ QUEST_FLAGS_NO_MONEY_FROM_XP
Definition QuestDef.h:140
@ COPPER
Definition SharedDefines.h:262
@ RATE_REWARD_BONUS_MONEY
Definition WorldConfig.h:427
@ CONFIG_MAX_PLAYER_LEVEL
Definition WorldConfig.h:190
bool HasFlag(uint32 flag) const
Definition QuestDef.h:221
uint32 XPValue(uint8 playerLevel=0) const
Definition QuestDef.cpp:199

References CONFIG_MAX_PLAYER_LEVEL, COPPER, HasFlag(), QUEST_FLAGS_NO_MONEY_FROM_XP, RATE_REWARD_BONUS_MONEY, sWorld, and XPValue().

Referenced by quest_commandscript::HandleQuestReward(), InitializeQueryData(), Player::RewardQuest(), PlayerMenu::SendQuestGiverOfferReward(), PlayerMenu::SendQuestGiverQuestDetails(), PlayerMenu::SendQuestQueryResponse(), and Player::SendQuestReward().

◆ GetRewOrReqMoney()

int32 Quest::GetRewOrReqMoney ( uint8  playerLevel = 0) const
240{
241 int32 rewardedMoney = RewardMoney;
242 if (rewardedMoney < 0)
243 {
244 return rewardedMoney;
245 }
246
247 if (playerLevel && RewardMoneyDifficulty)
248 {
249 if (uint32 questRewardedMoney = sObjectMgr->GetQuestMoneyReward(playerLevel, RewardMoneyDifficulty))
250 {
251 rewardedMoney = questRewardedMoney;
252 }
253 }
254
255 return static_cast<int32>(rewardedMoney * sWorld->getRate(RATE_REWARD_QUEST_MONEY));
256}
#define sObjectMgr
Definition ObjectMgr.h:1686
@ RATE_REWARD_QUEST_MONEY
Definition WorldConfig.h:426

References RATE_REWARD_QUEST_MONEY, RewardMoney, RewardMoneyDifficulty, sObjectMgr, and sWorld.

Referenced by Player::CanCompleteQuest(), Player::CanRewardQuest(), WorldSession::HandleLfgPlayerLockInfoRequestOpcode(), quest_commandscript::HandleQuestComplete(), quest_commandscript::HandleQuestReward(), InitializeQueryData(), Player::RewardQuest(), WorldSession::SendLfgPlayerReward(), PlayerMenu::SendQuestGiverOfferReward(), PlayerMenu::SendQuestGiverQuestDetails(), PlayerMenu::SendQuestGiverRequestItems(), PlayerMenu::SendQuestQueryResponse(), and Player::SendQuestReward().

◆ GetRewSpell()

◆ GetRewSpellCast()

◆ GetSrcItemCount()

uint32 Quest::GetSrcItemCount ( ) const
inline
260{ return StartItemCount; }
uint32 StartItemCount
Definition QuestDef.h:403

References StartItemCount.

Referenced by Player::CanAddQuest(), Player::GiveQuestSourceItem(), and Player::TakeQuestSourceItem().

◆ GetSrcItemId()

◆ GetSrcSpell()

uint32 Quest::GetSrcSpell ( ) const
inline
261{ return SourceSpellid; }
uint32 SourceSpellid
Definition QuestDef.h:390

References SourceSpellid.

◆ GetSuggestedPlayers()

◆ GetTimeAllowed()

uint32 Quest::GetTimeAllowed ( ) const
inline
248{ return TimeAllowed; }

References TimeAllowed.

Referenced by Player::AddQuest().

◆ GetTitle()

◆ GetType()

uint32 Quest::GetType ( ) const
inline
234{ return Type; }

References Type.

Referenced by InitializeQueryData(), and PlayerMenu::SendQuestQueryResponse().

◆ GetXPId()

uint32 Quest::GetXPId ( ) const
inline

◆ GetZoneOrSort()

◆ HasFlag()

◆ HasSpecialFlag()

◆ InitializeQueryData()

void Quest::InitializeQueryData ( )
329{
331
332 queryData << uint32(GetQuestId()); // quest id
333 queryData << uint32(GetQuestMethod()); // Accepted values: 0, 1 or 2. 0 == IsAutoComplete() (skip objectives/details)
334 queryData << uint32(GetQuestLevel()); // may be -1, static data, in other cases must be used dynamic level: Player::GetQuestLevel (0 is not known, but assuming this is no longer valid for quest intended for client)
335 queryData << uint32(GetMinLevel()); // min level
336 queryData << uint32(GetZoneOrSort()); // zone or sort to display in quest log
337
338 queryData << uint32(GetType()); // quest type
339 queryData << uint32(GetSuggestedPlayers()); // suggested players count
340
341 queryData << uint32(GetRepObjectiveFaction()); // shown in quest log as part of quest objective
342 queryData << uint32(GetRepObjectiveValue()); // shown in quest log as part of quest objective
343
344 queryData << uint32(GetRepObjectiveFaction2()); // shown in quest log as part of quest objective OPPOSITE faction
345 queryData << uint32(GetRepObjectiveValue2()); // shown in quest log as part of quest objective OPPOSITE faction
346
347 queryData << uint32(GetNextQuestInChain()); // client will request this quest from NPC, if not 0
348 queryData << uint32(GetXPId()); // used for calculating rewarded experience
349
351 queryData << uint32(0); // Hide money rewarded
352 else
353 queryData << int32(GetRewOrReqMoney()); // reward money (below max lvl)
354
355 queryData << uint32(GetRewMoneyMaxLevel()); // used in XP calculation at client
356 queryData << uint32(GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast == 0)
357 queryData << int32(GetRewSpellCast()); // casted spell
358
359 // rewarded honor points
362 queryData << uint32(GetSrcItemId()); // source item id
363 queryData << uint32(GetFlags() & 0xFFFF); // quest flags
364 queryData << uint32(GetCharTitleId()); // CharTitleId, new 2.4.0, player gets this title (id from CharTitles)
365 queryData << uint32(GetPlayersSlain()); // players slain
366 queryData << uint32(GetBonusTalents()); // bonus talents
367 queryData << uint32(GetRewArenaPoints()); // bonus arena points
368 queryData << uint32(0); // review rep show mask
369
371 {
372 for (uint32 i = 0; i < QUEST_REWARDS_COUNT; ++i)
373 queryData << uint32(0) << uint32(0);
374 for (uint32 i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
375 queryData << uint32(0) << uint32(0);
376 }
377 else
378 {
379 for (uint32 i = 0; i < QUEST_REWARDS_COUNT; ++i)
380 {
383 }
384 for (uint32 i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
385 {
388 }
389 }
390
391 for (uint32 i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // reward factions ids
393
394 for (uint32 i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // columnid+1 QuestFactionReward.dbc?
396
397 for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // unk (0)
399
401 queryData << GetPOIx();
402 queryData << GetPOIy();
404
405 queryData << GetTitle();
409 queryData << GetCompletedText(); // display in quest objectives window once all objectives are completed
410
411 for (uint32 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
412 {
413 if (RequiredNpcOrGo[i] < 0)
414 queryData << uint32((RequiredNpcOrGo[i] * (-1)) | 0x80000000); // client expects gameobject template id in form (id|0x80000000)
415 else
417
420 queryData << uint32(0); // req source count?
421 }
422
423 for (uint32 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
424 {
427 }
428
429 for (uint32 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
431}
@ QUEST_FLAGS_HIDDEN_REWARDS
Definition QuestDef.h:141
int32 GetRewArenaPoints() const
Definition QuestDef.h:257
int32 GetRepObjectiveValue() const
Definition QuestDef.h:240
uint32 GetRewSpell() const
Definition QuestDef.h:273
uint32 GetRewMoneyMaxLevel() const
Definition QuestDef.cpp:258
int32 GetRepObjectiveValue2() const
Definition QuestDef.h:242
uint32 GetRepObjectiveFaction() const
Definition QuestDef.h:239
uint32 GetRepObjectiveFaction2() const
Definition QuestDef.h:241
uint32 GetCharTitleId() const
Definition QuestDef.h:254
WorldPacket queryData
Definition QuestDef.h:329
float GetPOIy() const
Definition QuestDef.h:280
uint32 GetMinLevel() const
Definition QuestDef.h:231
std::string const & GetObjectives() const
Definition QuestDef.h:264
uint32 GetPOIContinent() const
Definition QuestDef.h:278
std::string const & GetDetails() const
Definition QuestDef.h:263
int32 GetZoneOrSort() const
Definition QuestDef.h:230
int32 GetQuestLevel() const
Definition QuestDef.h:233
uint32 GetFlags() const
Definition QuestDef.h:287
uint32 GetPlayersSlain() const
Definition QuestDef.h:255
std::string const & GetCompletedText() const
Definition QuestDef.h:268
uint32 GetQuestId() const
Definition QuestDef.h:228
uint32 GetType() const
Definition QuestDef.h:234
uint32 GetPointOpt() const
Definition QuestDef.h:281
uint32 GetXPId() const
Definition QuestDef.h:258
std::string const & GetAreaDescription() const
Definition QuestDef.h:267
uint32 GetSrcItemId() const
Definition QuestDef.h:259
int32 GetRewOrReqMoney(uint8 playerLevel=0) const
Definition QuestDef.cpp:239
std::string const & GetTitle() const
Definition QuestDef.h:262
float GetPOIx() const
Definition QuestDef.h:279
int32 GetRewSpellCast() const
Definition QuestDef.h:274
uint32 GetBonusTalents() const
Definition QuestDef.h:256
uint32 GetQuestMethod() const
Definition QuestDef.h:229
uint32 GetNextQuestInChain() const
Definition QuestDef.h:253
uint32 GetSuggestedPlayers() const
Definition QuestDef.h:247
void Initialize(uint16 opcode, std::size_t newres=200)
Definition WorldPacket.h:68
@ SMSG_QUEST_QUERY_RESPONSE
Definition Opcodes.h:123

References GetAreaDescription(), GetBonusTalents(), GetCharTitleId(), GetCompletedText(), GetDetails(), GetFlags(), GetMinLevel(), GetNextQuestInChain(), GetObjectives(), GetPlayersSlain(), GetPOIContinent(), GetPointOpt(), GetPOIx(), GetPOIy(), GetQuestId(), GetQuestLevel(), GetQuestMethod(), GetRepObjectiveFaction(), GetRepObjectiveFaction2(), GetRepObjectiveValue(), GetRepObjectiveValue2(), GetRewArenaPoints(), GetRewHonorAddition(), GetRewHonorMultiplier(), GetRewMoneyMaxLevel(), GetRewOrReqMoney(), GetRewSpell(), GetRewSpellCast(), GetSrcItemId(), GetSuggestedPlayers(), GetTitle(), GetType(), GetXPId(), GetZoneOrSort(), HasFlag(), WorldPacket::Initialize(), ItemDrop, ObjectiveText, queryData, QUEST_FLAGS_HIDDEN_REWARDS, QUEST_ITEM_OBJECTIVES_COUNT, QUEST_OBJECTIVES_COUNT, QUEST_REPUTATIONS_COUNT, QUEST_REWARD_CHOICES_COUNT, QUEST_REWARDS_COUNT, RequiredItemCount, RequiredItemId, RequiredNpcOrGo, RequiredNpcOrGoCount, RewardChoiceItemCount, RewardChoiceItemId, RewardFactionId, RewardFactionValueId, RewardFactionValueIdOverride, RewardItemId, RewardItemIdCount, and SMSG_QUEST_QUERY_RESPONSE.

◆ IsAllowedInRaid()

bool Quest::IsAllowedInRaid ( Difficulty  difficulty) const
298{
299 if (IsRaidQuest(difficulty))
300 return true;
301
302 return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_RAID);
303}
@ CONFIG_QUEST_IGNORE_RAID
Definition WorldConfig.h:55
bool IsRaidQuest(Difficulty difficulty) const
Definition QuestDef.cpp:280

References CONFIG_QUEST_IGNORE_RAID, IsRaidQuest(), and sWorld.

Referenced by Player::HasQuestForGO(), Player::HasQuestForItem(), Player::KilledMonsterCredit(), and Player::KilledPlayerCredit().

◆ IsAutoAccept()

bool Quest::IsAutoAccept ( ) const
271{
273}
@ QUEST_FLAGS_AUTO_ACCEPT
Definition QuestDef.h:151

References HasFlag(), and QUEST_FLAGS_AUTO_ACCEPT.

◆ IsAutoComplete()

◆ IsDaily()

◆ IsDailyOrWeekly()

bool Quest::IsDailyOrWeekly ( ) const
inline
@ QUEST_FLAGS_WEEKLY
Definition QuestDef.h:147

References Flags, QUEST_FLAGS_DAILY, and QUEST_FLAGS_WEEKLY.

Referenced by npc_wg_quest_giver::GetDialogStatus(), and Player::GetQuestDialogStatus().

◆ IsDFQuest()

◆ IsMonthly()

◆ IsPVPQuest()

bool Quest::IsPVPQuest ( ) const
inline
296{ return Type == QUEST_TYPE_PVP; }
@ QUEST_TYPE_PVP
Definition SharedDefines.h:3017

References QUEST_TYPE_PVP, and Type.

Referenced by Player::KilledMonsterCredit().

◆ IsRaidQuest()

bool Quest::IsRaidQuest ( Difficulty  difficulty) const
281{
282 switch (Type)
283 {
284 case QUEST_TYPE_RAID:
285 return true;
287 return !(difficulty & RAID_DIFFICULTY_MASK_25MAN);
289 return difficulty & RAID_DIFFICULTY_MASK_25MAN;
290 default:
291 break;
292 }
293
294 return false;
295}
#define RAID_DIFFICULTY_MASK_25MAN
Definition DBCEnums.h:279
@ QUEST_TYPE_RAID
Definition SharedDefines.h:3018
@ QUEST_TYPE_RAID_25
Definition SharedDefines.h:3025
@ QUEST_TYPE_RAID_10
Definition SharedDefines.h:3024

References QUEST_TYPE_RAID, QUEST_TYPE_RAID_10, QUEST_TYPE_RAID_25, RAID_DIFFICULTY_MASK_25MAN, and Type.

Referenced by IsAllowedInRaid().

◆ IsRepeatable()

◆ IsSeasonal()

bool Quest::IsSeasonal ( ) const
inline
@ QUEST_SORT_LOVE_IS_IN_THE_AIR
Definition SharedDefines.h:3071
@ QUEST_SORT_SPECIAL
Definition SharedDefines.h:3055
@ QUEST_SORT_BREWFEST
Definition SharedDefines.h:3065
@ QUEST_SORT_NOBLEGARDEN
Definition SharedDefines.h:3069
@ QUEST_SORT_MIDSUMMER
Definition SharedDefines.h:3064
@ QUEST_SORT_LUNAR_FESTIVAL
Definition SharedDefines.h:3061
@ QUEST_SORT_SEASONAL
Definition SharedDefines.h:3033
bool IsRepeatable() const
Definition QuestDef.h:284

References IsRepeatable(), QUEST_SORT_BREWFEST, QUEST_SORT_LOVE_IS_IN_THE_AIR, QUEST_SORT_LUNAR_FESTIVAL, QUEST_SORT_MIDSUMMER, QUEST_SORT_NOBLEGARDEN, QUEST_SORT_SEASONAL, QUEST_SORT_SPECIAL, and ZoneOrSort.

Referenced by Player::CanCompleteQuest(), Player::GetQuestRewardStatus(), quest_commandscript::HandleQuestReward(), Player::RewardQuest(), Player::SatisfyQuestExclusiveGroup(), Player::SatisfyQuestPreviousQuest(), and Player::SatisfyQuestSeasonal().

◆ IsWeekly()

◆ LoadQuestDetails()

void Quest::LoadQuestDetails ( Field fields)
146{
147 for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
148 DetailsEmote[i] = fields[1 + i].Get<uint16>();
149
150 for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
151 DetailsEmoteDelay[i] = fields[5 + i].Get<uint32>();
152}

References DetailsEmote, DetailsEmoteDelay, and QUEST_EMOTE_COUNT.

◆ LoadQuestOfferReward()

void Quest::LoadQuestOfferReward ( Field fields)
162{
163 for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
164 OfferRewardEmote[i] = fields[1 + i].Get<uint16>();
165
166 for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
167 OfferRewardEmoteDelay[i] = fields[5 + i].Get<uint32>();
168
169 OfferRewardText = fields[9].Get<std::string>();
170}

References Field::Get(), OfferRewardEmote, OfferRewardEmoteDelay, OfferRewardText, and QUEST_EMOTE_COUNT.

◆ LoadQuestRequestItems()

void Quest::LoadQuestRequestItems ( Field fields)
155{
156 EmoteOnComplete = fields[1].Get<uint16>();
157 EmoteOnIncomplete = fields[2].Get<uint16>();
158 RequestItemsText = fields[3].Get<std::string>();
159}

References EmoteOnComplete, EmoteOnIncomplete, Field::Get(), and RequestItemsText.

◆ LoadQuestTemplateAddon()

void Quest::LoadQuestTemplateAddon ( Field fields)
173{
174 MaxLevel = fields[1].Get<uint8>();
175 RequiredClasses = fields[2].Get<uint32>();
176 SourceSpellid = fields[3].Get<uint32>();
177 PrevQuestId = fields[4].Get<int32>();
178 NextQuestId = fields[5].Get<uint32>();
179 ExclusiveGroup = fields[6].Get<int32>();
180 BreadcrumbForQuestId = fields[7].Get<uint32>();
181 RewardMailTemplateId = fields[8].Get<uint32>();
182 RewardMailDelay = fields[9].Get<uint32>();
183 RequiredSkillId = fields[10].Get<uint16>();
184 RequiredSkillPoints = fields[11].Get<uint16>();
185 RequiredMinRepFaction = fields[12].Get<uint16>();
186 RequiredMaxRepFaction = fields[13].Get<uint16>();
187 RequiredMinRepValue = fields[14].Get<int32>();
188 RequiredMaxRepValue = fields[15].Get<int32>();
189 StartItemCount = fields[16].Get<uint8>();
190 RewardMailSenderEntry = fields[17].Get<uint32>();
191 SpecialFlags = fields[18].Get<uint32>();
192
194 {
196 }
197}
@ QUEST_SPECIAL_FLAGS_AUTO_ACCEPT
Definition QuestDef.h:162

References BreadcrumbForQuestId, CONFIG_QUEST_IGNORE_AUTO_ACCEPT, ExclusiveGroup, Flags, Field::Get(), MaxLevel, NextQuestId, PrevQuestId, QUEST_FLAGS_AUTO_ACCEPT, QUEST_SPECIAL_FLAGS_AUTO_ACCEPT, RequiredClasses, RequiredMaxRepFaction, RequiredMaxRepValue, RequiredMinRepFaction, RequiredMinRepValue, RequiredSkillId, RequiredSkillPoints, RewardMailDelay, RewardMailSenderEntry, RewardMailTemplateId, SourceSpellid, SpecialFlags, StartItemCount, and sWorld.

◆ SetEventIdForQuest()

void Quest::SetEventIdForQuest ( uint16  eventId)
inline
332{ _eventIdForQuest = eventId; }

References _eventIdForQuest.

◆ SetFlag()

void Quest::SetFlag ( uint32  flag)
inline
222{ Flags |= flag; }

References Flags.

◆ SetSpecialFlag()

void Quest::SetSpecialFlag ( uint32  flag)
inline
225{ SpecialFlags |= flag; }

References SpecialFlags.

Referenced by ObjectMgr::LoadQuests().

◆ XPValue()

uint32 Quest::XPValue ( uint8  playerLevel = 0) const
200{
201 int32 quest_level = (Level == -1 ? playerLevel : Level);
202 const QuestXPEntry* xpentry = sQuestXPStore.LookupEntry(quest_level);
203 if (!xpentry)
204 {
205 return 0;
206 }
207
208 int32 diffFactor = 2 * (quest_level - playerLevel) + 20;
209 if (diffFactor < 1)
210 {
211 diffFactor = 1;
212 }
213 else if (diffFactor > 10)
214 {
215 diffFactor = 10;
216 }
217
218 uint32 xp = diffFactor * xpentry->Exp[RewardXPDifficulty] / 10;
219 if (xp <= 100)
220 {
221 xp = 5 * ((xp + 2) / 5);
222 }
223 else if (xp <= 500)
224 {
225 xp = 10 * ((xp + 5) / 10);
226 }
227 else if (xp <= 1000)
228 {
229 xp = 25 * ((xp + 12) / 25);
230 }
231 else
232 {
233 xp = 50 * ((xp + 25) / 50);
234 }
235
236 return xp;
237}
DBCStorage< QuestXPEntry > sQuestXPStore(QuestXPfmt)
Definition DBCStructure.h:1452
uint32 Exp[10]
Definition DBCStructure.h:1454

References QuestXPEntry::Exp, Level, RewardXPDifficulty, and sQuestXPStore.

Referenced by Player::CalculateQuestRewardXP(), GetRewMoneyMaxLevel(), WorldSession::HandleLfgPlayerLockInfoRequestOpcode(), quest_commandscript::HandleQuestReward(), and WorldSession::SendLfgPlayerReward().

Friends And Related Symbol Documentation

◆ ObjectMgr

friend class ObjectMgr
friend

Member Data Documentation

◆ _eventIdForQuest

uint16 Quest::_eventIdForQuest
private

◆ _reqCreatureOrGOcount

uint32 Quest::_reqCreatureOrGOcount
private

Referenced by GetReqCreatureOrGOcount(), and Quest().

◆ _reqItemsCount

uint32 Quest::_reqItemsCount
private

Referenced by GetReqItemsCount(), and Quest().

◆ _rewChoiceItemsCount

uint32 Quest::_rewChoiceItemsCount
private

Referenced by GetRewChoiceItemsCount(), and Quest().

◆ _rewItemsCount

uint32 Quest::_rewItemsCount
private

Referenced by GetRewItemsCount(), and Quest().

◆ AllowableRaces

uint32 Quest::AllowableRaces
protected

◆ AreaDescription

std::string Quest::AreaDescription
protected

Referenced by GetAreaDescription(), and Quest().

◆ BreadcrumbForQuestId

uint32 Quest::BreadcrumbForQuestId = 0
protected

◆ CompletedText

std::string Quest::CompletedText
protected

Referenced by GetCompletedText(), and Quest().

◆ Details

std::string Quest::Details
protected

Referenced by GetDetails(), and Quest().

◆ DetailsEmote

◆ DetailsEmoteDelay

◆ EmoteOnComplete

uint32 Quest::EmoteOnComplete
protected

◆ EmoteOnIncomplete

uint32 Quest::EmoteOnIncomplete
protected

◆ ExclusiveGroup

int32 Quest::ExclusiveGroup = 0
protected

◆ Flags

◆ Id

uint32 Quest::Id
protected

Referenced by GetQuestId(), and Quest().

◆ ItemDrop

◆ ItemDropQuantity

◆ Level

int32 Quest::Level
protected

Referenced by GetQuestLevel(), Quest(), and XPValue().

◆ MaxLevel

uint32 Quest::MaxLevel = 0
protected

◆ Method

uint32 Quest::Method
protected

Referenced by GetQuestMethod(), and Quest().

◆ MinLevel

uint32 Quest::MinLevel
protected

Referenced by GetMinLevel(), and Quest().

◆ NextQuestId

uint32 Quest::NextQuestId = 0
protected

◆ Objectives

std::string Quest::Objectives
protected

Referenced by GetObjectives(), and Quest().

◆ ObjectiveText

std::string Quest::ObjectiveText[QUEST_OBJECTIVES_COUNT]

◆ OfferRewardEmote

◆ OfferRewardEmoteDelay

◆ OfferRewardText

std::string Quest::OfferRewardText
protected

◆ POIContinent

uint32 Quest::POIContinent
protected

Referenced by GetPOIContinent(), and Quest().

◆ POIPriority

uint32 Quest::POIPriority
protected

Referenced by GetPointOpt(), and Quest().

◆ POIx

float Quest::POIx
protected

Referenced by GetPOIx(), and Quest().

◆ POIy

float Quest::POIy
protected

Referenced by GetPOIy(), and Quest().

◆ prevChainQuests

PrevChainQuests Quest::prevChainQuests

◆ PrevQuestId

int32 Quest::PrevQuestId = 0
protected

◆ prevQuests

◆ queryData

WorldPacket Quest::queryData

Referenced by InitializeQueryData().

◆ RequestItemsText

std::string Quest::RequestItemsText
protected

◆ RequiredClasses

uint32 Quest::RequiredClasses = 0
protected

◆ RequiredFactionId1

uint32 Quest::RequiredFactionId1
protected

◆ RequiredFactionId2

uint32 Quest::RequiredFactionId2
protected

◆ RequiredFactionValue1

int32 Quest::RequiredFactionValue1
protected

◆ RequiredFactionValue2

int32 Quest::RequiredFactionValue2
protected

◆ RequiredItemCount

◆ RequiredItemId

◆ RequiredMaxRepFaction

uint32 Quest::RequiredMaxRepFaction = 0
protected

◆ RequiredMaxRepValue

int32 Quest::RequiredMaxRepValue = 0
protected

◆ RequiredMinRepFaction

uint32 Quest::RequiredMinRepFaction = 0
protected

◆ RequiredMinRepValue

int32 Quest::RequiredMinRepValue = 0
protected

◆ RequiredNpcOrGo

◆ RequiredNpcOrGoCount

◆ RequiredPlayerKills

uint32 Quest::RequiredPlayerKills
protected

◆ RequiredSkillId

uint32 Quest::RequiredSkillId = 0
protected

◆ RequiredSkillPoints

uint32 Quest::RequiredSkillPoints = 0
protected

◆ RewardArenaPoints

int32 Quest::RewardArenaPoints
protected

Referenced by GetRewArenaPoints(), and Quest().

◆ RewardChoiceItemCount

◆ RewardChoiceItemId

◆ RewardDisplaySpell

uint32 Quest::RewardDisplaySpell
protected

◆ RewardFactionId

◆ RewardFactionValueId

◆ RewardFactionValueIdOverride

◆ RewardHonor

uint32 Quest::RewardHonor
protected

Referenced by GetRewHonorAddition(), and Quest().

◆ RewardItemId

◆ RewardItemIdCount

◆ RewardKillHonor

float Quest::RewardKillHonor
protected

Referenced by GetRewHonorMultiplier(), and Quest().

◆ RewardMailDelay

uint32 Quest::RewardMailDelay = 0
protected

◆ RewardMailSenderEntry

uint32 Quest::RewardMailSenderEntry = 0
protected

◆ RewardMailTemplateId

uint32 Quest::RewardMailTemplateId = 0
protected

◆ RewardMoney

int32 Quest::RewardMoney
protected

Referenced by GetRewOrReqMoney(), and Quest().

◆ RewardMoneyDifficulty

uint32 Quest::RewardMoneyDifficulty
protected

Referenced by GetRewOrReqMoney(), and Quest().

◆ RewardNextQuest

uint32 Quest::RewardNextQuest
protected

◆ RewardSpell

int32 Quest::RewardSpell
protected

◆ RewardTalents

uint32 Quest::RewardTalents
protected

Referenced by GetBonusTalents(), and Quest().

◆ RewardTitleId

uint32 Quest::RewardTitleId
protected

◆ RewardXPDifficulty

uint32 Quest::RewardXPDifficulty
protected

Referenced by GetXPId(), Quest(), and XPValue().

◆ SourceSpellid

uint32 Quest::SourceSpellid = 0
protected

◆ SpecialFlags

◆ StartItem

uint32 Quest::StartItem
protected

◆ StartItemCount

uint32 Quest::StartItemCount = 0
protected

◆ SuggestedPlayers

uint32 Quest::SuggestedPlayers
protected

Referenced by GetSuggestedPlayers(), and Quest().

◆ TimeAllowed

uint32 Quest::TimeAllowed
protected

◆ Title

std::string Quest::Title
protected

Referenced by GetTitle(), and Quest().

◆ Type

uint32 Quest::Type
protected

◆ ZoneOrSort

int32 Quest::ZoneOrSort
protected

The documentation for this class was generated from the following files: