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 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 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: IWorld.h:146
@ CONFIG_QUEST_IGNORE_AUTO_ACCEPT
Definition: IWorld.h:145
#define sWorld
Definition: World.h:443
std::enable_if_t< std::is_arithmetic_v< T >, T > Get() const
Definition: Field.h:112
int32 Level
Definition: QuestDef.h:349
uint32 ItemDropQuantity[QUEST_SOURCE_ITEM_IDS_COUNT]
Definition: QuestDef.h:303
uint32 DetailsEmote[QUEST_EMOTE_COUNT]
Definition: QuestDef.h:313
uint32 OfferRewardEmote[QUEST_EMOTE_COUNT]
Definition: QuestDef.h:315
float POIx
Definition: QuestDef.h:380
int32 RequiredNpcOrGo[QUEST_OBJECTIVES_COUNT]
Definition: QuestDef.h:304
uint32 MinLevel
Definition: QuestDef.h:348
int32 RequiredFactionValue2
Definition: QuestDef.h:355
int32 RequiredFactionValue1
Definition: QuestDef.h:353
int32 ZoneOrSort
Definition: QuestDef.h:347
uint32 RequiredNpcOrGoCount[QUEST_OBJECTIVES_COUNT]
Definition: QuestDef.h:305
std::string AreaDescription
Definition: QuestDef.h:371
uint32 RewardTitleId
Definition: QuestDef.h:359
uint32 Type
Definition: QuestDef.h:350
uint32 RewardItemIdCount[QUEST_REWARDS_COUNT]
Definition: QuestDef.h:309
uint32 Method
Definition: QuestDef.h:346
float POIy
Definition: QuestDef.h:381
uint32 _rewItemsCount
Definition: QuestDef.h:339
uint32 RewardChoiceItemId[QUEST_REWARD_CHOICES_COUNT]
Definition: QuestDef.h:306
uint32 _rewChoiceItemsCount
Definition: QuestDef.h:338
uint32 ItemDrop[QUEST_SOURCE_ITEM_IDS_COUNT]
Definition: QuestDef.h:302
uint32 RewardXPDifficulty
Definition: QuestDef.h:364
int32 RewardFactionValueIdOverride[QUEST_REPUTATIONS_COUNT]
Definition: QuestDef.h:312
uint16 _eventIdForQuest
Definition: QuestDef.h:341
uint32 _reqItemsCount
Definition: QuestDef.h:336
uint32 DetailsEmoteDelay[QUEST_EMOTE_COUNT]
Definition: QuestDef.h:314
uint32 EmoteOnComplete
Definition: QuestDef.h:384
int32 RewardSpell
Definition: QuestDef.h:378
uint32 RewardTalents
Definition: QuestDef.h:361
int32 RewardMoney
Definition: QuestDef.h:375
uint32 RewardChoiceItemCount[QUEST_REWARD_CHOICES_COUNT]
Definition: QuestDef.h:307
uint32 POIContinent
Definition: QuestDef.h:379
uint32 AllowableRaces
Definition: QuestDef.h:351
uint32 RewardNextQuest
Definition: QuestDef.h:363
uint32 RequiredPlayerKills
Definition: QuestDef.h:360
uint32 EmoteOnIncomplete
Definition: QuestDef.h:383
uint32 OfferRewardEmoteDelay[QUEST_EMOTE_COUNT]
Definition: QuestDef.h:316
uint32 StartItem
Definition: QuestDef.h:365
uint32 Id
Definition: QuestDef.h:345
uint32 _reqCreatureOrGOcount
Definition: QuestDef.h:337
std::string ObjectiveText[QUEST_OBJECTIVES_COUNT]
Definition: QuestDef.h:299
std::string CompletedText
Definition: QuestDef.h:372
uint32 Flags
Definition: QuestDef.h:358
int32 RewardArenaPoints
Definition: QuestDef.h:362
uint32 RequiredItemCount[QUEST_ITEM_OBJECTIVES_COUNT]
Definition: QuestDef.h:301
uint32 TimeAllowed
Definition: QuestDef.h:357
std::string Title
Definition: QuestDef.h:366
uint32 RequiredFactionId1
Definition: QuestDef.h:352
uint32 RequiredFactionId2
Definition: QuestDef.h:354
uint32 RewardDisplaySpell
Definition: QuestDef.h:377
uint32 RequiredItemId[QUEST_ITEM_OBJECTIVES_COUNT]
Definition: QuestDef.h:300
std::string Objectives
Definition: QuestDef.h:368
uint32 SuggestedPlayers
Definition: QuestDef.h:356
float RewardKillHonor
Definition: QuestDef.h:374
uint32 RewardFactionId[QUEST_REPUTATIONS_COUNT]
Definition: QuestDef.h:310
uint32 RewardHonor
Definition: QuestDef.h:373
std::string Details
Definition: QuestDef.h:367
int32 RewardFactionValueId[QUEST_REPUTATIONS_COUNT]
Definition: QuestDef.h:311
uint32 RewardItemId[QUEST_REWARDS_COUNT]
Definition: QuestDef.h:308
uint32 RewardMoneyDifficulty
Definition: QuestDef.h:376
uint32 POIPriority
Definition: QuestDef.h:382

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

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()

◆ 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:392

References ExclusiveGroup.

Referenced by 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:387

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:391

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
264{ return OfferRewardText; }
std::string OfferRewardText
Definition: QuestDef.h:369

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
278{ return POIx; }

References POIx.

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

◆ GetPOIy()

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

References POIy.

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

◆ GetPrevQuestId()

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

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(), 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_koltira_deathweaver::OnQuestAccept(), pyrewood_ambush::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(), boss_apothecary_hummel::OnQuestReward(), npc_rocknot::OnQuestReward(), npc_thrall_warchief::OnQuestReward(), npc_thrall_bfu::OnQuestReward(), npc_lady_sylvanas_windrunner::OnQuestReward(), npc_tharnarian::OnQuestReward(), npc_elder_clearwater::OnQuestReward(), npc_riggle_bassbait::OnQuestReward(), Player::PrettyPrintRequirementsQuestList(), SmartGameObjectAI::QuestAccept(), SmartGameObjectAI::QuestReward(), Player::RewardQuest(), 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_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_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
319{ return _reqCreatureOrGOcount; }

References _reqCreatureOrGOcount.

◆ GetReqItemsCount()

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

References _reqItemsCount.

Referenced by PlayerMenu::SendQuestGiverRequestItems().

◆ GetRequestItemsText()

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

References RequestItemsText.

Referenced by PlayerMenu::SendQuestGiverRequestItems().

◆ GetRequiredClasses()

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

References RequiredClasses.

Referenced by Player::SatisfyQuestClass().

◆ GetRequiredMaxRepFaction()

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

References RequiredMaxRepFaction.

Referenced by Player::SatisfyQuestReputation().

◆ GetRequiredMaxRepValue()

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

References RequiredMaxRepValue.

Referenced by Player::SatisfyQuestReputation().

◆ GetRequiredMinRepFaction()

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

References RequiredMinRepFaction.

Referenced by Player::SatisfyQuestReputation().

◆ GetRequiredMinRepValue()

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

References RequiredMinRepValue.

Referenced by Player::SatisfyQuestReputation().

◆ GetRequiredSkill()

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

References RequiredSkillId.

Referenced by Player::SatisfyQuestSkill().

◆ GetRequiredSkillValue()

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

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
275{ return RewardMailDelay; }
uint32 RewardMailDelay
Definition: QuestDef.h:394

References RewardMailDelay.

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

◆ GetRewMailSenderEntry()

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

References RewardMailSenderEntry.

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

◆ GetRewMailTemplateId()

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

References RewardMailTemplateId.

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

◆ GetRewMoneyMaxLevel()

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

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
239{
240 int32 rewardedMoney = RewardMoney;
241 if (rewardedMoney < 0)
242 {
243 return rewardedMoney;
244 }
245
246 if (playerLevel && RewardMoneyDifficulty)
247 {
248 if (uint32 questRewardedMoney = sObjectMgr->GetQuestMoneyReward(playerLevel, RewardMoneyDifficulty))
249 {
250 rewardedMoney = questRewardedMoney;
251 }
252 }
253
254 return static_cast<int32>(rewardedMoney * sWorld->getRate(RATE_REWARD_QUEST_MONEY));
255}
#define sObjectMgr
Definition: ObjectMgr.h:1635
@ RATE_REWARD_QUEST_MONEY
Definition: IWorld.h:466

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
259{ return StartItemCount; }
uint32 StartItemCount
Definition: QuestDef.h:401

References StartItemCount.

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

◆ GetSrcItemId()

◆ GetSrcSpell()

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

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 ( )
328{
330
331 queryData << uint32(GetQuestId()); // quest id
332 queryData << uint32(GetQuestMethod()); // Accepted values: 0, 1 or 2. 0 == IsAutoComplete() (skip objectives/details)
333 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)
334 queryData << uint32(GetMinLevel()); // min level
335 queryData << uint32(GetZoneOrSort()); // zone or sort to display in quest log
336
337 queryData << uint32(GetType()); // quest type
338 queryData << uint32(GetSuggestedPlayers()); // suggested players count
339
340 queryData << uint32(GetRepObjectiveFaction()); // shown in quest log as part of quest objective
341 queryData << uint32(GetRepObjectiveValue()); // shown in quest log as part of quest objective
342
343 queryData << uint32(GetRepObjectiveFaction2()); // shown in quest log as part of quest objective OPPOSITE faction
344 queryData << uint32(GetRepObjectiveValue2()); // shown in quest log as part of quest objective OPPOSITE faction
345
346 queryData << uint32(GetNextQuestInChain()); // client will request this quest from NPC, if not 0
347 queryData << uint32(GetXPId()); // used for calculating rewarded experience
348
350 queryData << uint32(0); // Hide money rewarded
351 else
352 queryData << int32(GetRewOrReqMoney()); // reward money (below max lvl)
353
354 queryData << uint32(GetRewMoneyMaxLevel()); // used in XP calculation at client
355 queryData << uint32(GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast == 0)
356 queryData << int32(GetRewSpellCast()); // casted spell
357
358 // rewarded honor points
361 queryData << uint32(GetSrcItemId()); // source item id
362 queryData << uint32(GetFlags() & 0xFFFF); // quest flags
363 queryData << uint32(GetCharTitleId()); // CharTitleId, new 2.4.0, player gets this title (id from CharTitles)
364 queryData << uint32(GetPlayersSlain()); // players slain
365 queryData << uint32(GetBonusTalents()); // bonus talents
366 queryData << uint32(GetRewArenaPoints()); // bonus arena points
367 queryData << uint32(0); // review rep show mask
368
370 {
371 for (uint32 i = 0; i < QUEST_REWARDS_COUNT; ++i)
372 queryData << uint32(0) << uint32(0);
373 for (uint32 i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
374 queryData << uint32(0) << uint32(0);
375 }
376 else
377 {
378 for (uint32 i = 0; i < QUEST_REWARDS_COUNT; ++i)
379 {
382 }
383 for (uint32 i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
384 {
387 }
388 }
389
390 for (uint32 i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // reward factions ids
392
393 for (uint32 i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // columnid+1 QuestFactionReward.dbc?
395
396 for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // unk (0)
398
400 queryData << GetPOIx();
401 queryData << GetPOIy();
403
404 queryData << GetTitle();
408 queryData << GetCompletedText(); // display in quest objectives window once all objectives are completed
409
410 for (uint32 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
411 {
412 if (RequiredNpcOrGo[i] < 0)
413 queryData << uint32((RequiredNpcOrGo[i] * (-1)) | 0x80000000); // client expects gameobject template id in form (id|0x80000000)
414 else
416
419 queryData << uint32(0); // req source count?
420 }
421
422 for (uint32 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
423 {
426 }
427
428 for (uint32 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
430}
@ QUEST_FLAGS_HIDDEN_REWARDS
Definition: QuestDef.h:141
@ SMSG_QUEST_QUERY_RESPONSE
Definition: Opcodes.h:123
int32 GetRewArenaPoints() const
Definition: QuestDef.h:256
int32 GetRepObjectiveValue() const
Definition: QuestDef.h:240
uint32 GetRewSpell() const
Definition: QuestDef.h:272
uint32 GetRewMoneyMaxLevel() const
Definition: QuestDef.cpp:257
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:253
WorldPacket queryData
Definition: QuestDef.h:328
float GetPOIy() const
Definition: QuestDef.h:279
uint32 GetMinLevel() const
Definition: QuestDef.h:231
std::string const & GetObjectives() const
Definition: QuestDef.h:263
uint32 GetPOIContinent() const
Definition: QuestDef.h:277
std::string const & GetDetails() const
Definition: QuestDef.h:262
int32 GetZoneOrSort() const
Definition: QuestDef.h:230
int32 GetQuestLevel() const
Definition: QuestDef.h:233
uint32 GetFlags() const
Definition: QuestDef.h:286
uint32 GetPlayersSlain() const
Definition: QuestDef.h:254
std::string const & GetCompletedText() const
Definition: QuestDef.h:267
uint32 GetQuestId() const
Definition: QuestDef.h:228
uint32 GetType() const
Definition: QuestDef.h:234
uint32 GetPointOpt() const
Definition: QuestDef.h:280
uint32 GetXPId() const
Definition: QuestDef.h:257
std::string const & GetAreaDescription() const
Definition: QuestDef.h:266
uint32 GetSrcItemId() const
Definition: QuestDef.h:258
int32 GetRewOrReqMoney(uint8 playerLevel=0) const
Definition: QuestDef.cpp:238
std::string const & GetTitle() const
Definition: QuestDef.h:261
float GetPOIx() const
Definition: QuestDef.h:278
int32 GetRewSpellCast() const
Definition: QuestDef.h:273
uint32 GetBonusTalents() const
Definition: QuestDef.h:255
uint32 GetQuestMethod() const
Definition: QuestDef.h:229
uint32 GetNextQuestInChain() const
Definition: QuestDef.h:252
uint32 GetSuggestedPlayers() const
Definition: QuestDef.h:247
void Initialize(uint16 opcode, std::size_t newres=200)
Definition: WorldPacket.h:68

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
297{
298 if (IsRaidQuest(difficulty))
299 return true;
300
301 return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_RAID);
302}
@ CONFIG_QUEST_IGNORE_RAID
Definition: IWorld.h:96
bool IsRaidQuest(Difficulty difficulty) const
Definition: QuestDef.cpp:279

References CONFIG_QUEST_IGNORE_RAID, IsRaidQuest(), and sWorld.

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

◆ IsAutoAccept()

bool Quest::IsAutoAccept ( ) const
270{
272}
@ 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
295{ return Type == QUEST_TYPE_PVP; }
@ QUEST_TYPE_PVP
Definition: SharedDefines.h:2777

References QUEST_TYPE_PVP, and Type.

Referenced by Player::KilledMonsterCredit().

◆ IsRaidQuest()

bool Quest::IsRaidQuest ( Difficulty  difficulty) const
280{
281 switch (Type)
282 {
283 case QUEST_TYPE_RAID:
284 return true;
286 return !(difficulty & RAID_DIFFICULTY_MASK_25MAN);
288 return difficulty & RAID_DIFFICULTY_MASK_25MAN;
289 default:
290 break;
291 }
292
293 return false;
294}
#define RAID_DIFFICULTY_MASK_25MAN
Definition: DBCEnums.h:279
@ QUEST_TYPE_RAID
Definition: SharedDefines.h:2778
@ QUEST_TYPE_RAID_25
Definition: SharedDefines.h:2785
@ QUEST_TYPE_RAID_10
Definition: SharedDefines.h:2784

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:2831
@ QUEST_SORT_SPECIAL
Definition: SharedDefines.h:2815
@ QUEST_SORT_BREWFEST
Definition: SharedDefines.h:2825
@ QUEST_SORT_NOBLEGARDEN
Definition: SharedDefines.h:2829
@ QUEST_SORT_MIDSUMMER
Definition: SharedDefines.h:2824
@ QUEST_SORT_LUNAR_FESTIVAL
Definition: SharedDefines.h:2821
@ QUEST_SORT_SEASONAL
Definition: SharedDefines.h:2793
bool IsRepeatable() const
Definition: QuestDef.h:283

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 RewardMailTemplateId = fields[7].Get<uint32>();
181 RewardMailDelay = fields[8].Get<uint32>();
182 RequiredSkillId = fields[9].Get<uint16>();
183 RequiredSkillPoints = fields[10].Get<uint16>();
184 RequiredMinRepFaction = fields[11].Get<uint16>();
185 RequiredMaxRepFaction = fields[12].Get<uint16>();
186 RequiredMinRepValue = fields[13].Get<int32>();
187 RequiredMaxRepValue = fields[14].Get<int32>();
188 StartItemCount = fields[15].Get<uint8>();
189 RewardMailSenderEntry = fields[16].Get<uint32>();
190 SpecialFlags = fields[17].Get<uint32>();
191
193 {
195 }
196}
@ QUEST_SPECIAL_FLAGS_AUTO_ACCEPT
Definition: QuestDef.h:162

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

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

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

Friends And Related Function 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().

◆ 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