OregonCore  revision fb2a440-git
Your Favourite TBC server
Quest Class Reference

#include <QuestDef.h>

Public Types

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

Public Member Functions

 Quest (Field *questRecord)
 
uint32 XPValue (Player *pPlayer) 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
 
int32 GetQuestLevel () const
 
uint32 GetType () const
 
uint32 GetRequiredClasses () const
 
uint32 GetRequiredRaces () const
 
uint32 GetRequiredSkill () const
 
uint32 GetRequiredSkillValue () const
 
uint32 GetRepObjectiveFaction () const
 
int32 GetRepObjectiveValue () const
 
uint32 GetRequiredMinRepFaction () const
 
int32 GetRequiredMinRepValue () const
 
uint32 GetRequiredMaxRepFaction () const
 
int32 GetRequiredMaxRepValue () const
 
uint32 GetSuggestedPlayers () const
 
uint32 GetLimitTime () const
 
int32 GetPrevQuestId () const
 
int32 GetNextQuestId () const
 
int32 GetExclusiveGroup () const
 
uint32 GetNextQuestInChain () const
 
uint32 GetCharTitleId () const
 
uint32 GetSrcItemId () const
 
uint32 GetSrcItemCount () const
 
uint32 GetSrcSpell () const
 
std::string GetTitle () const
 
std::string GetDetails () const
 
std::string GetObjectives () const
 
std::string GetOfferRewardText () const
 
std::string GetRequestItemsText () const
 
std::string GetEndText () const
 
int32 GetRewOrReqMoney () const
 
uint32 GetRewHonorableKills () const
 
uint32 GetRewMoneyMaxLevel () const
 
uint32 GetRewSpell () const
 
uint32 GetRewSpellCast () const
 
uint32 GetRewMailTemplateId () const
 
uint32 GetRewMailDelaySecs () const
 
uint32 GetPointMapId () const
 
float GetPointX () const
 
float GetPointY () const
 
uint32 GetPointOpt () const
 
uint32 GetIncompleteEmote () const
 
uint32 GetCompleteEmote () const
 
uint32 GetQuestStartScript () const
 
uint32 GetQuestCompleteScript () const
 
bool IsRepeatable () const
 
bool IsAutoComplete () const
 
uint32 GetFlags () const
 
bool IsDaily () const
 
uint32 GetReqItemsCount () const
 
uint32 GetReqCreatureOrGOcount () const
 
uint32 GetRewChoiceItemsCount () const
 
uint32 GetRewItemsCount () const
 

Public Attributes

std::string ObjectiveText [QUEST_OBJECTIVES_COUNT]
 
uint32 RequiredItemId [QUEST_OBJECTIVES_COUNT]
 
uint32 ReqItemCount [QUEST_OBJECTIVES_COUNT]
 
uint32 ReqSourceId [QUEST_SOURCE_ITEM_IDS_COUNT]
 
uint32 ReqSourceCount [QUEST_SOURCE_ITEM_IDS_COUNT]
 
int32 ReqCreatureOrGOId [QUEST_OBJECTIVES_COUNT]
 
uint32 ReqCreatureOrGOCount [QUEST_OBJECTIVES_COUNT]
 
uint32 ReqSpell [QUEST_OBJECTIVES_COUNT]
 
uint32 RewChoiceItemId [QUEST_REWARD_CHOICES_COUNT]
 
uint32 RewChoiceItemCount [QUEST_REWARD_CHOICES_COUNT]
 
uint32 RewItemId [QUEST_REWARDS_COUNT]
 
uint32 RewItemCount [QUEST_REWARDS_COUNT]
 
uint32 RewRepFaction [QUEST_REPUTATIONS_COUNT]
 
int32 RewRepValue [QUEST_REPUTATIONS_COUNT]
 
uint32 DetailsEmote [QUEST_EMOTE_COUNT]
 
uint32 OfferRewardEmote [QUEST_EMOTE_COUNT]
 
PrevQuests prevQuests
 
PrevChainQuests prevChainQuests
 

Protected Attributes

uint32 QuestId
 
uint32 QuestMethod
 
int32 ZoneOrSort
 
uint32 MinLevel
 
int32 QuestLevel
 
uint32 Type
 
uint32 RequiredClasses
 
uint32 RequiredRaces
 
uint32 RequiredSkill
 
uint32 RequiredSkillValue
 
uint32 RepObjectiveFaction
 
int32 RepObjectiveValue
 
uint32 RequiredMinRepFaction
 
int32 RequiredMinRepValue
 
uint32 RequiredMaxRepFaction
 
int32 RequiredMaxRepValue
 
uint32 SuggestedPlayers
 
uint32 LimitTime
 
uint32 QuestFlags
 
uint32 CharTitleId
 
int32 PrevQuestId
 
int32 NextQuestId
 
int32 ExclusiveGroup
 
uint32 NextQuestInChain
 
uint32 SrcItemId
 
uint32 SrcItemCount
 
uint32 SrcSpell
 
std::string Title
 
std::string Details
 
std::string Objectives
 
std::string OfferRewardText
 
std::string RequestItemsText
 
std::string EndText
 
uint32 RewHonorableKills
 
int32 RewOrReqMoney
 
uint32 RewMoneyMaxLevel
 
uint32 RewSpell
 
uint32 RewSpellCast
 
uint32 RewMailTemplateId
 
uint32 RewMailDelaySecs
 
uint32 PointMapId
 
float PointX
 
float PointY
 
uint32 PointOpt
 
uint32 IncompleteEmote
 
uint32 CompleteEmote
 
uint32 QuestStartScript
 
uint32 QuestCompleteScript
 
uint32 SpecialFlags
 

Private Attributes

uint32 _reqItemsCount
 
uint32 _reqCreatureOrGOcount
 
uint32 _rewChoiceItemsCount
 
uint32 _rewItemsCount
 

Friends

class ObjectMgr
 

Detailed Description

Definition at line 172 of file QuestDef.h.

Member Typedef Documentation

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

Definition at line 408 of file QuestDef.h.

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

Definition at line 406 of file QuestDef.h.

Constructor & Destructor Documentation

Quest::Quest ( Field questRecord)

Definition at line 22 of file QuestDef.cpp.

References _reqCreatureOrGOcount, _reqItemsCount, _rewChoiceItemsCount, _rewItemsCount, CharTitleId, CompleteEmote, Details, DetailsEmote, EndText, ExclusiveGroup, Field::GetCppString(), IncompleteEmote, LimitTime, MinLevel, NextQuestId, NextQuestInChain, Objectives, ObjectiveText, OfferRewardEmote, OfferRewardText, PointMapId, PointOpt, PointX, PointY, PrevQuestId, QUEST_EMOTE_COUNT, QUEST_OBJECTIVES_COUNT, QUEST_REPUTATIONS_COUNT, QUEST_REWARD_CHOICES_COUNT, QUEST_REWARDS_COUNT, QUEST_SOURCE_ITEM_IDS_COUNT, QuestCompleteScript, QuestId, QuestLevel, QuestMethod, QuestStartScript, RepObjectiveFaction, RepObjectiveValue, ReqCreatureOrGOCount, ReqCreatureOrGOId, ReqItemCount, ReqSourceCount, ReqSourceId, ReqSpell, RequestItemsText, RequiredClasses, RequiredItemId, RequiredMaxRepFaction, RequiredMaxRepValue, RequiredMinRepFaction, RequiredMinRepValue, RequiredRaces, RequiredSkill, RequiredSkillValue, RewChoiceItemCount, RewChoiceItemId, RewHonorableKills, RewItemCount, RewItemId, RewMailDelaySecs, RewMailTemplateId, RewMoneyMaxLevel, RewOrReqMoney, RewRepFaction, RewRepValue, RewSpell, RewSpellCast, SpecialFlags, SrcItemCount, SrcItemId, SrcSpell, SuggestedPlayers, Title, Type, and ZoneOrSort.

23 {
24  QuestId = questRecord[0].GetUInt32();
25  QuestMethod = questRecord[1].GetUInt32();
26  ZoneOrSort = questRecord[2].GetInt32();
27  MinLevel = questRecord[3].GetUInt32();
28  QuestLevel = questRecord[4].GetInt32();
29  Type = questRecord[5].GetUInt32();
30  RequiredClasses = questRecord[6].GetUInt32();
31  RequiredRaces = questRecord[7].GetUInt32();
32  RequiredSkill = questRecord[8].GetUInt32();
33  RequiredSkillValue = questRecord[9].GetUInt32();
34  RepObjectiveFaction = questRecord[10].GetUInt32();
35  RepObjectiveValue = questRecord[11].GetInt32();
36  RequiredMinRepFaction = questRecord[12].GetUInt32();
37  RequiredMinRepValue = questRecord[13].GetInt32();
38  RequiredMaxRepFaction = questRecord[14].GetUInt32();
39  RequiredMaxRepValue = questRecord[15].GetInt32();
40  SuggestedPlayers = questRecord[16].GetUInt32();
41  LimitTime = questRecord[17].GetUInt32();
42  QuestFlags = questRecord[18].GetUInt16();
43  SpecialFlags = questRecord[19].GetUInt8();
44  CharTitleId = questRecord[20].GetUInt32();
45  PrevQuestId = questRecord[21].GetInt32();
46  NextQuestId = questRecord[22].GetInt32();
47  ExclusiveGroup = questRecord[23].GetInt32();
48  NextQuestInChain = questRecord[24].GetUInt32();
49  SrcItemId = questRecord[25].GetUInt32();
50  SrcItemCount = questRecord[26].GetUInt32();
51  SrcSpell = questRecord[27].GetUInt32();
52  Title = questRecord[28].GetCppString();
53  Details = questRecord[29].GetCppString();
54  Objectives = questRecord[30].GetCppString();
55  OfferRewardText = questRecord[31].GetCppString();
56  RequestItemsText = questRecord[32].GetCppString();
57  EndText = questRecord[33].GetCppString();
58 
59  for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
60  ObjectiveText[i] = questRecord[34 + i].GetCppString();
61 
62  for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
63  RequiredItemId[i] = questRecord[38 + i].GetUInt32();
64 
65  for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
66  ReqItemCount[i] = questRecord[42 + i].GetUInt32();
67 
68  for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
69  ReqSourceId[i] = questRecord[46 + i].GetUInt32();
70 
71  for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
72  ReqSourceCount[i] = questRecord[50 + i].GetUInt32();
73 
74  for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
75  ReqCreatureOrGOId[i] = questRecord[54 + i].GetInt32();
76 
77  for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
78  ReqCreatureOrGOCount[i] = questRecord[58 + i].GetUInt32();
79 
80  for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
81  ReqSpell[i] = questRecord[62 + i].GetUInt32();
82 
83  for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
84  RewChoiceItemId[i] = questRecord[66 + i].GetUInt32();
85 
86  for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
87  RewChoiceItemCount[i] = questRecord[72 + i].GetUInt32();
88 
89  for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
90  RewItemId[i] = questRecord[78 + i].GetUInt32();
91 
92  for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
93  RewItemCount[i] = questRecord[82 + i].GetUInt32();
94 
95  for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
96  RewRepFaction[i] = questRecord[86 + i].GetUInt32();
97 
98  for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
99  RewRepValue[i] = questRecord[91 + i].GetInt32();
100 
101  RewHonorableKills = questRecord[96].GetUInt32();
102  RewOrReqMoney = questRecord[97].GetInt32();
103  RewMoneyMaxLevel = questRecord[98].GetUInt32();
104  RewSpell = questRecord[99].GetUInt32();
105  RewSpellCast = questRecord[100].GetUInt32();
106  RewMailTemplateId = questRecord[101].GetUInt32();
107  RewMailDelaySecs = questRecord[102].GetUInt32();
108  PointMapId = questRecord[103].GetUInt32();
109  PointX = questRecord[104].GetFloat();
110  PointY = questRecord[105].GetFloat();
111  PointOpt = questRecord[106].GetUInt32();
112 
113  for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
114  DetailsEmote[i] = questRecord[107 + i].GetUInt32();
115 
116  IncompleteEmote = questRecord[111].GetUInt32();
117  CompleteEmote = questRecord[112].GetUInt32();
118 
119  for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
120  OfferRewardEmote[i] = questRecord[113 + i].GetInt32();
121 
122  QuestStartScript = questRecord[117].GetUInt32();
123  QuestCompleteScript = questRecord[118].GetUInt32();
124 
125  _reqItemsCount = 0;
127  _rewItemsCount = 0;
129 
130  for (int i = 0; i < QUEST_OBJECTIVES_COUNT; i++)
131  {
132  if (RequiredItemId[i])
133  ++_reqItemsCount;
134  if (ReqCreatureOrGOId[i])
136  }
137 
138  for (int i = 0; i < QUEST_REWARDS_COUNT; i++)
139  {
140  if (RewItemId[i])
141  ++_rewItemsCount;
142  }
143 
144  for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; i++)
145  {
146  if (RewChoiceItemId[i])
148  }
149 }
uint32 RequiredItemId[QUEST_OBJECTIVES_COUNT]
Definition: QuestDef.h:385
uint32 RewSpellCast
Definition: QuestDef.h:457
uint32 SpecialFlags
Definition: QuestDef.h:469
uint32 CompleteEmote
Definition: QuestDef.h:465
float PointX
Definition: QuestDef.h:461
uint32 PointMapId
Definition: QuestDef.h:460
uint32 RewSpell
Definition: QuestDef.h:456
uint32 CharTitleId
Definition: QuestDef.h:439
uint32 DetailsEmote[QUEST_EMOTE_COUNT]
Definition: QuestDef.h:398
uint32 MinLevel
Definition: QuestDef.h:423
uint32 QuestCompleteScript
Definition: QuestDef.h:467
uint32 RewMoneyMaxLevel
Definition: QuestDef.h:455
std::string OfferRewardText
Definition: QuestDef.h:450
uint32 RewMailDelaySecs
Definition: QuestDef.h:459
uint32 SrcItemId
Definition: QuestDef.h:444
#define QUEST_EMOTE_COUNT
Definition: QuestDef.h:39
uint32 RequiredMaxRepFaction
Definition: QuestDef.h:434
uint32 RequiredRaces
Definition: QuestDef.h:427
int32 RewRepValue[QUEST_REPUTATIONS_COUNT]
Definition: QuestDef.h:397
int32 ReqCreatureOrGOId[QUEST_OBJECTIVES_COUNT]
Definition: QuestDef.h:389
uint32 QuestMethod
Definition: QuestDef.h:421
uint32 QuestStartScript
Definition: QuestDef.h:466
uint32 ReqSpell[QUEST_OBJECTIVES_COUNT]
Definition: QuestDef.h:391
std::string Details
Definition: QuestDef.h:448
float PointY
Definition: QuestDef.h:462
std::string EndText
Definition: QuestDef.h:452
int32 ZoneOrSort
Definition: QuestDef.h:422
std::string ObjectiveText[QUEST_OBJECTIVES_COUNT]
Definition: QuestDef.h:384
uint32 RequiredMinRepFaction
Definition: QuestDef.h:432
std::string GetCppString() const
Definition: Field.h:52
uint32 QuestId
Definition: QuestDef.h:420
int32 RequiredMinRepValue
Definition: QuestDef.h:433
uint32 RewChoiceItemCount[QUEST_REWARD_CHOICES_COUNT]
Definition: QuestDef.h:393
uint32 ReqSourceCount[QUEST_SOURCE_ITEM_IDS_COUNT]
Definition: QuestDef.h:388
uint32 RequiredSkill
Definition: QuestDef.h:428
std::string RequestItemsText
Definition: QuestDef.h:451
uint32 RewChoiceItemId[QUEST_REWARD_CHOICES_COUNT]
Definition: QuestDef.h:392
int32 ExclusiveGroup
Definition: QuestDef.h:442
uint32 _reqCreatureOrGOcount
Definition: QuestDef.h:414
uint32 RewHonorableKills
Definition: QuestDef.h:453
std::string Title
Definition: QuestDef.h:447
uint32 SuggestedPlayers
Definition: QuestDef.h:436
uint32 RewRepFaction[QUEST_REPUTATIONS_COUNT]
Definition: QuestDef.h:396
uint32 ReqItemCount[QUEST_OBJECTIVES_COUNT]
Definition: QuestDef.h:386
int32 QuestLevel
Definition: QuestDef.h:424
uint32 _rewChoiceItemsCount
Definition: QuestDef.h:415
uint32 RequiredSkillValue
Definition: QuestDef.h:429
uint32 LimitTime
Definition: QuestDef.h:437
int32 PrevQuestId
Definition: QuestDef.h:440
int32 NextQuestId
Definition: QuestDef.h:441
uint32 IncompleteEmote
Definition: QuestDef.h:464
uint32 _reqItemsCount
Definition: QuestDef.h:413
uint32 SrcSpell
Definition: QuestDef.h:446
#define QUEST_REWARD_CHOICES_COUNT
Definition: QuestDef.h:35
uint32 PointOpt
Definition: QuestDef.h:463
#define QUEST_REWARDS_COUNT
Definition: QuestDef.h:36
int32 RequiredMaxRepValue
Definition: QuestDef.h:435
uint32 ReqSourceId[QUEST_SOURCE_ITEM_IDS_COUNT]
Definition: QuestDef.h:387
uint32 RewMailTemplateId
Definition: QuestDef.h:458
uint32 RewItemId[QUEST_REWARDS_COUNT]
Definition: QuestDef.h:394
uint32 RewItemCount[QUEST_REWARDS_COUNT]
Definition: QuestDef.h:395
uint32 SrcItemCount
Definition: QuestDef.h:445
int32 RewOrReqMoney
Definition: QuestDef.h:454
int32 RepObjectiveValue
Definition: QuestDef.h:431
uint32 NextQuestInChain
Definition: QuestDef.h:443
uint32 RepObjectiveFaction
Definition: QuestDef.h:430
uint32 _rewItemsCount
Definition: QuestDef.h:416
#define QUEST_SOURCE_ITEM_IDS_COUNT
Definition: QuestDef.h:34
QuestFlags
Definition: QuestDef.h:116
#define QUEST_OBJECTIVES_COUNT
Definition: QuestDef.h:33
uint32 ReqCreatureOrGOCount[QUEST_OBJECTIVES_COUNT]
Definition: QuestDef.h:390
uint32 RequiredClasses
Definition: QuestDef.h:426
uint32 OfferRewardEmote[QUEST_EMOTE_COUNT]
Definition: QuestDef.h:399
std::string Objectives
Definition: QuestDef.h:449
uint32 Type
Definition: QuestDef.h:425
#define QUEST_REPUTATIONS_COUNT
Definition: QuestDef.h:38

Member Function Documentation

uint32 Quest::GetCharTitleId ( ) const
inline
uint32 Quest::GetCompleteEmote ( ) const
inline

Definition at line 355 of file QuestDef.h.

Referenced by PlayerMenu::SendQuestGiverRequestItems().

356  {
357  return CompleteEmote;
358  }
uint32 CompleteEmote
Definition: QuestDef.h:465
std::string Quest::GetDetails ( ) const
inline

Definition at line 289 of file QuestDef.h.

References QuestLocale::Details.

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

290  {
291  return Details;
292  }
std::string Details
Definition: QuestDef.h:448
std::string Quest::GetEndText ( ) const
inline

Definition at line 305 of file QuestDef.h.

References QuestLocale::EndText.

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

306  {
307  return EndText;
308  }
std::string EndText
Definition: QuestDef.h:452
int32 Quest::GetExclusiveGroup ( ) const
inline

Definition at line 261 of file QuestDef.h.

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

262  {
263  return ExclusiveGroup;
264  }
int32 ExclusiveGroup
Definition: QuestDef.h:442
uint32 Quest::GetFlags ( ) const
inline

Definition at line 374 of file QuestDef.h.

Referenced by PlayerMenu::SendQuestQueryResponse().

375  {
376  return QuestFlags;
377  }
uint32 QuestFlags
Definition: QuestDef.h:438
uint32 Quest::GetIncompleteEmote ( ) const
inline

Definition at line 351 of file QuestDef.h.

Referenced by PlayerMenu::SendQuestGiverRequestItems().

352  {
353  return IncompleteEmote;
354  }
uint32 IncompleteEmote
Definition: QuestDef.h:464
uint32 Quest::GetLimitTime ( ) const
inline

Definition at line 249 of file QuestDef.h.

Referenced by Player::AddQuest().

250  {
251  return LimitTime;
252  }
uint32 LimitTime
Definition: QuestDef.h:437
uint32 Quest::GetMinLevel ( ) const
inline

Definition at line 193 of file QuestDef.h.

Referenced by Player::CanSeeStartQuest(), and Player::SatisfyQuestLevel().

194  {
195  return MinLevel;
196  }
uint32 MinLevel
Definition: QuestDef.h:423
int32 Quest::GetNextQuestId ( ) const
inline

Definition at line 257 of file QuestDef.h.

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

258  {
259  return NextQuestId;
260  }
int32 NextQuestId
Definition: QuestDef.h:441
uint32 Quest::GetNextQuestInChain ( ) const
inline

Definition at line 265 of file QuestDef.h.

Referenced by Player::GetNextQuest(), Player::SatisfyQuestNextChain(), and PlayerMenu::SendQuestQueryResponse().

266  {
267  return NextQuestInChain;
268  }
uint32 NextQuestInChain
Definition: QuestDef.h:443
std::string Quest::GetObjectives ( ) const
inline

Definition at line 293 of file QuestDef.h.

References QuestLocale::Objectives.

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

294  {
295  return Objectives;
296  }
std::string Objectives
Definition: QuestDef.h:449
std::string Quest::GetOfferRewardText ( ) const
inline

Definition at line 297 of file QuestDef.h.

References QuestLocale::OfferRewardText.

Referenced by PlayerMenu::SendQuestGiverOfferReward().

298  {
299  return OfferRewardText;
300  }
std::string OfferRewardText
Definition: QuestDef.h:450
uint32 Quest::GetPointMapId ( ) const
inline

Definition at line 335 of file QuestDef.h.

Referenced by PlayerMenu::SendQuestQueryResponse().

336  {
337  return PointMapId;
338  }
uint32 PointMapId
Definition: QuestDef.h:460
uint32 Quest::GetPointOpt ( ) const
inline

Definition at line 347 of file QuestDef.h.

Referenced by PlayerMenu::SendQuestQueryResponse().

348  {
349  return PointOpt;
350  }
uint32 PointOpt
Definition: QuestDef.h:463
float Quest::GetPointX ( ) const
inline

Definition at line 339 of file QuestDef.h.

Referenced by PlayerMenu::SendQuestQueryResponse().

340  {
341  return PointX;
342  }
float PointX
Definition: QuestDef.h:461
float Quest::GetPointY ( ) const
inline

Definition at line 343 of file QuestDef.h.

Referenced by PlayerMenu::SendQuestQueryResponse().

344  {
345  return PointY;
346  }
float PointY
Definition: QuestDef.h:462
int32 Quest::GetPrevQuestId ( ) const
inline

Definition at line 253 of file QuestDef.h.

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

254  {
255  return PrevQuestId;
256  }
int32 PrevQuestId
Definition: QuestDef.h:440
uint32 Quest::GetQuestCompleteScript ( ) const
inline

Definition at line 363 of file QuestDef.h.

Referenced by Player::SendQuestReward().

364  {
365  return QuestCompleteScript;
366  }
uint32 QuestCompleteScript
Definition: QuestDef.h:467
uint32 Quest::GetQuestMethod ( ) const
inline

Definition at line 187 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and PlayerMenu::SendQuestQueryResponse().

187 { return QuestMethod; }
uint32 QuestMethod
Definition: QuestDef.h:421
uint32 Quest::GetQuestStartScript ( ) const
inline

Definition at line 359 of file QuestDef.h.

Referenced by Player::AddQuest().

360  {
361  return QuestStartScript;
362  }
uint32 QuestStartScript
Definition: QuestDef.h:466
uint32 Quest::GetRepObjectiveFaction ( ) const
inline

Definition at line 221 of file QuestDef.h.

Referenced by Player::AddQuest(), Player::CanCompleteQuest(), ChatHandler::HandleCompleteQuest(), and PlayerMenu::SendQuestQueryResponse().

222  {
223  return RepObjectiveFaction;
224  }
uint32 RepObjectiveFaction
Definition: QuestDef.h:430
int32 Quest::GetRepObjectiveValue ( ) const
inline

Definition at line 225 of file QuestDef.h.

Referenced by Player::CanCompleteQuest(), ChatHandler::HandleCompleteQuest(), and PlayerMenu::SendQuestQueryResponse().

226  {
227  return RepObjectiveValue;
228  }
int32 RepObjectiveValue
Definition: QuestDef.h:431
uint32 Quest::GetReqCreatureOrGOcount ( ) const
inline

Definition at line 402 of file QuestDef.h.

402 { return _reqCreatureOrGOcount; }
uint32 _reqCreatureOrGOcount
Definition: QuestDef.h:414
uint32 Quest::GetReqItemsCount ( ) const
inline

Definition at line 401 of file QuestDef.h.

Referenced by PlayerMenu::SendQuestGiverRequestItems().

401 { return _reqItemsCount; }
uint32 _reqItemsCount
Definition: QuestDef.h:413
std::string Quest::GetRequestItemsText ( ) const
inline

Definition at line 301 of file QuestDef.h.

References QuestLocale::RequestItemsText.

Referenced by PlayerMenu::SendQuestGiverRequestItems().

302  {
303  return RequestItemsText;
304  }
std::string RequestItemsText
Definition: QuestDef.h:451
uint32 Quest::GetRequiredClasses ( ) const
inline

Definition at line 205 of file QuestDef.h.

Referenced by Player::SatisfyQuestClass().

206  {
207  return RequiredClasses;
208  }
uint32 RequiredClasses
Definition: QuestDef.h:426
uint32 Quest::GetRequiredMaxRepFaction ( ) const
inline

Definition at line 237 of file QuestDef.h.

Referenced by Player::SatisfyQuestReputation().

238  {
239  return RequiredMaxRepFaction;
240  }
uint32 RequiredMaxRepFaction
Definition: QuestDef.h:434
int32 Quest::GetRequiredMaxRepValue ( ) const
inline

Definition at line 241 of file QuestDef.h.

Referenced by Player::SatisfyQuestReputation().

242  {
243  return RequiredMaxRepValue;
244  }
int32 RequiredMaxRepValue
Definition: QuestDef.h:435
uint32 Quest::GetRequiredMinRepFaction ( ) const
inline

Definition at line 229 of file QuestDef.h.

Referenced by Player::SatisfyQuestReputation().

230  {
231  return RequiredMinRepFaction;
232  }
uint32 RequiredMinRepFaction
Definition: QuestDef.h:432
int32 Quest::GetRequiredMinRepValue ( ) const
inline

Definition at line 233 of file QuestDef.h.

Referenced by Player::SatisfyQuestReputation().

234  {
235  return RequiredMinRepValue;
236  }
int32 RequiredMinRepValue
Definition: QuestDef.h:433
uint32 Quest::GetRequiredRaces ( ) const
inline

Definition at line 209 of file QuestDef.h.

Referenced by Player::SatisfyQuestRace().

210  {
211  return RequiredRaces;
212  }
uint32 RequiredRaces
Definition: QuestDef.h:427
uint32 Quest::GetRequiredSkill ( ) const
inline

Definition at line 213 of file QuestDef.h.

Referenced by Player::SatisfyQuestSkill().

214  {
215  return RequiredSkill;
216  }
uint32 RequiredSkill
Definition: QuestDef.h:428
uint32 Quest::GetRequiredSkillValue ( ) const
inline

Definition at line 217 of file QuestDef.h.

Referenced by Player::SatisfyQuestSkill().

218  {
219  return RequiredSkillValue;
220  }
uint32 RequiredSkillValue
Definition: QuestDef.h:429
uint32 Quest::GetRewChoiceItemsCount ( ) const
inline
uint32 Quest::GetRewHonorableKills ( ) const
inline
uint32 Quest::GetRewItemsCount ( ) const
inline
uint32 Quest::GetRewMailDelaySecs ( ) const
inline

Definition at line 331 of file QuestDef.h.

Referenced by Player::RewardQuest().

332  {
333  return RewMailDelaySecs;
334  }
uint32 RewMailDelaySecs
Definition: QuestDef.h:459
uint32 Quest::GetRewMailTemplateId ( ) const
inline

Definition at line 327 of file QuestDef.h.

Referenced by Player::RewardQuest().

328  {
329  return RewMailTemplateId;
330  }
uint32 RewMailTemplateId
Definition: QuestDef.h:458
uint32 Quest::GetRewMoneyMaxLevel ( ) const
inline

Definition at line 314 of file QuestDef.h.

Referenced by Player::RewardQuest(), PlayerMenu::SendQuestQueryResponse(), and Player::SendQuestReward().

315  {
316  return RewMoneyMaxLevel;
317  }
uint32 RewMoneyMaxLevel
Definition: QuestDef.h:455
uint32 Quest::GetRewSpell ( ) const
inline
uint32 Quest::GetRewSpellCast ( ) const
inline
uint32 Quest::GetSrcItemCount ( ) const
inline

Definition at line 277 of file QuestDef.h.

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

278  {
279  return SrcItemCount;
280  }
uint32 SrcItemCount
Definition: QuestDef.h:445
uint32 Quest::GetSrcItemId ( ) const
inline

Definition at line 273 of file QuestDef.h.

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

274  {
275  return SrcItemId;
276  }
uint32 SrcItemId
Definition: QuestDef.h:444
uint32 Quest::GetSrcSpell ( ) const
inline

Definition at line 281 of file QuestDef.h.

282  {
283  return SrcSpell;
284  }
uint32 SrcSpell
Definition: QuestDef.h:446
uint32 Quest::GetSuggestedPlayers ( ) const
inline

Definition at line 245 of file QuestDef.h.

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

246  {
247  return SuggestedPlayers;
248  }
uint32 SuggestedPlayers
Definition: QuestDef.h:436
uint32 Quest::GetType ( ) const
inline

Definition at line 201 of file QuestDef.h.

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

202  {
203  return Type;
204  }
uint32 Type
Definition: QuestDef.h:425
int32 Quest::GetZoneOrSort ( ) const
inline

Definition at line 189 of file QuestDef.h.

Referenced by PlayerMenu::SendQuestQueryResponse().

190  {
191  return ZoneOrSort;
192  }
int32 ZoneOrSort
Definition: QuestDef.h:422
bool Quest::HasFlag ( uint32  flag) const
inline
bool Quest::IsAutoComplete ( ) const
inline

Definition at line 370 of file QuestDef.h.

Referenced by Player::CanCompleteQuest(), Player::CanRewardQuest(), WorldSession::getDialogStatus(), and Player::PrepareQuestMenu().

371  {
372  return QuestMethod ? false : true;
373  }
uint32 QuestMethod
Definition: QuestDef.h:421
bool Quest::IsDaily ( ) const
inline

Definition at line 378 of file QuestDef.h.

References QUEST_FLAGS_DAILY.

Referenced by PoolMgr::LoadQuestPools(), Player::RewardQuest(), and Player::SatisfyQuestDay().

379  {
380  return QuestFlags & QUEST_FLAGS_DAILY;
381  }
QuestFlags
Definition: QuestDef.h:116
void Quest::SetFlag ( uint32  flag)
inline

Definition at line 180 of file QuestDef.h.

180 { QuestFlags |= flag; }
QuestFlags
Definition: QuestDef.h:116
void Quest::SetSpecialFlag ( uint32  flag)
inline

Definition at line 183 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests().

183 { SpecialFlags |= flag; }
uint32 SpecialFlags
Definition: QuestDef.h:469
uint32 Quest::XPValue ( Player pPlayer) const

Definition at line 151 of file QuestDef.cpp.

References Unit::getLevel(), QuestLevel, and RewMoneyMaxLevel.

Referenced by Player::RewardQuest().

152 {
153  if (pPlayer)
154  {
155  if (RewMoneyMaxLevel > 0)
156  {
157  uint32 pLevel = pPlayer->getLevel();
158  uint32 qLevel = QuestLevel > 0 ? (uint32)QuestLevel : 0;
159  float fullxp = 0;
160  if (qLevel >= 65)
161  fullxp = RewMoneyMaxLevel / 6.0f;
162  else if (qLevel == 64)
163  fullxp = RewMoneyMaxLevel / 4.8f;
164  else if (qLevel == 63)
165  fullxp = RewMoneyMaxLevel / 3.6f;
166  else if (qLevel == 62)
167  fullxp = RewMoneyMaxLevel / 2.4f;
168  else if (qLevel == 61)
169  fullxp = RewMoneyMaxLevel / 1.2f;
170  else if (qLevel > 0 && qLevel <= 60)
171  fullxp = RewMoneyMaxLevel / 0.6f;
172 
173  if (pLevel <= qLevel + 5)
174  return uint32(ceilf(fullxp));
175  else if (pLevel == qLevel + 6)
176  return uint32(ceilf(fullxp * 0.8f));
177  else if (pLevel == qLevel + 7)
178  return uint32(ceilf(fullxp * 0.6f));
179  else if (pLevel == qLevel + 8)
180  return uint32(ceilf(fullxp * 0.4f));
181  else if (pLevel == qLevel + 9)
182  return uint32(ceilf(fullxp * 0.2f));
183  else
184  return uint32(ceilf(fullxp * 0.1f));
185  }
186  }
187  return 0;
188 }
uint32 RewMoneyMaxLevel
Definition: QuestDef.h:455
uint8 getLevel() const
Definition: Unit.h:1057
int32 QuestLevel
Definition: QuestDef.h:424
ACE_UINT32 uint32
Definition: Define.h:71

Friends And Related Function Documentation

friend class ObjectMgr
friend

Definition at line 174 of file QuestDef.h.

Member Data Documentation

uint32 Quest::_reqCreatureOrGOcount
private

Definition at line 414 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::_reqItemsCount
private

Definition at line 413 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::_rewChoiceItemsCount
private

Definition at line 415 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::_rewItemsCount
private

Definition at line 416 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::CharTitleId
protected

Definition at line 439 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::CompleteEmote
protected

Definition at line 465 of file QuestDef.h.

Referenced by Quest().

std::string Quest::Details
protected

Definition at line 448 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::DetailsEmote[QUEST_EMOTE_COUNT]

Definition at line 398 of file QuestDef.h.

Referenced by Quest(), and PlayerMenu::SendQuestGiverQuestDetails().

std::string Quest::EndText
protected

Definition at line 452 of file QuestDef.h.

Referenced by Quest().

int32 Quest::ExclusiveGroup
protected

Definition at line 442 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::IncompleteEmote
protected

Definition at line 464 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::LimitTime
protected

Definition at line 437 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::MinLevel
protected

Definition at line 423 of file QuestDef.h.

Referenced by Quest().

int32 Quest::NextQuestId
protected

Definition at line 441 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::NextQuestInChain
protected

Definition at line 443 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

std::string Quest::Objectives
protected

Definition at line 449 of file QuestDef.h.

Referenced by Quest().

std::string Quest::ObjectiveText[QUEST_OBJECTIVES_COUNT]

Definition at line 384 of file QuestDef.h.

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

uint32 Quest::OfferRewardEmote[QUEST_EMOTE_COUNT]

Definition at line 399 of file QuestDef.h.

Referenced by Quest(), and PlayerMenu::SendQuestGiverOfferReward().

std::string Quest::OfferRewardText
protected

Definition at line 450 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::PointMapId
protected

Definition at line 460 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::PointOpt
protected

Definition at line 463 of file QuestDef.h.

Referenced by Quest().

float Quest::PointX
protected

Definition at line 461 of file QuestDef.h.

Referenced by Quest().

float Quest::PointY
protected

Definition at line 462 of file QuestDef.h.

Referenced by Quest().

PrevChainQuests Quest::prevChainQuests

Definition at line 409 of file QuestDef.h.

Referenced by Player::SatisfyQuestPrevChain().

int32 Quest::PrevQuestId
protected

Definition at line 440 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

PrevQuests Quest::prevQuests

Definition at line 407 of file QuestDef.h.

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

uint32 Quest::QuestCompleteScript
protected

Definition at line 467 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::QuestFlags
protected

Definition at line 438 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests().

uint32 Quest::QuestId
protected

Definition at line 420 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

int32 Quest::QuestLevel
protected

Definition at line 424 of file QuestDef.h.

Referenced by Quest(), and XPValue().

uint32 Quest::QuestMethod
protected

Definition at line 421 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::QuestStartScript
protected

Definition at line 466 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::RepObjectiveFaction
protected

Definition at line 430 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

int32 Quest::RepObjectiveValue
protected

Definition at line 431 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::ReqSourceCount[QUEST_SOURCE_ITEM_IDS_COUNT]
std::string Quest::RequestItemsText
protected

Definition at line 451 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::RequiredClasses
protected

Definition at line 426 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::RequiredMaxRepFaction
protected

Definition at line 434 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

int32 Quest::RequiredMaxRepValue
protected

Definition at line 435 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::RequiredMinRepFaction
protected

Definition at line 432 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

int32 Quest::RequiredMinRepValue
protected

Definition at line 433 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::RequiredRaces
protected

Definition at line 427 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::RequiredSkill
protected

Definition at line 428 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::RequiredSkillValue
protected

Definition at line 429 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::RewHonorableKills
protected

Definition at line 453 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::RewMailDelaySecs
protected

Definition at line 459 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::RewMailTemplateId
protected

Definition at line 458 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::RewMoneyMaxLevel
protected

Definition at line 455 of file QuestDef.h.

Referenced by Quest(), and XPValue().

int32 Quest::RewOrReqMoney
protected

Definition at line 454 of file QuestDef.h.

Referenced by GetRewOrReqMoney(), and Quest().

uint32 Quest::RewRepFaction[QUEST_REPUTATIONS_COUNT]

Definition at line 396 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), Quest(), and Player::RewardReputation().

int32 Quest::RewRepValue[QUEST_REPUTATIONS_COUNT]

Definition at line 397 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), Quest(), and Player::RewardReputation().

uint32 Quest::RewSpell
protected

Definition at line 456 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::RewSpellCast
protected

Definition at line 457 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::SpecialFlags
protected

Definition at line 469 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::SrcItemCount
protected

Definition at line 445 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::SrcItemId
protected

Definition at line 444 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::SrcSpell
protected

Definition at line 446 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().

uint32 Quest::SuggestedPlayers
protected

Definition at line 436 of file QuestDef.h.

Referenced by Quest().

std::string Quest::Title
protected

Definition at line 447 of file QuestDef.h.

Referenced by Quest().

uint32 Quest::Type
protected

Definition at line 425 of file QuestDef.h.

Referenced by Quest().

int32 Quest::ZoneOrSort
protected

Definition at line 422 of file QuestDef.h.

Referenced by ObjectMgr::LoadQuests(), and Quest().


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