aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Quests
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Quests')
-rwxr-xr-xsrc/server/game/Quests/QuestDef.cpp263
-rwxr-xr-xsrc/server/game/Quests/QuestDef.h232
2 files changed, 289 insertions, 206 deletions
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index 0fcb342fcfc..f0c67e3ac4d 100755
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -22,155 +22,196 @@
Quest::Quest(Field* questRecord)
{
- QuestId = questRecord[0].GetUInt32();
- QuestMethod = questRecord[1].GetUInt32();
- ZoneOrSort = questRecord[2].GetInt32();
- SkillOrClassMask = questRecord[3].GetInt32();
- MinLevel = questRecord[4].GetUInt32();
- MaxLevel = questRecord[5].GetUInt32();
- QuestLevel = questRecord[6].GetInt32();
- Type = questRecord[7].GetUInt32();
- RequiredRaces = questRecord[8].GetUInt32();
- RequiredSkillValue = questRecord[9].GetUInt32();
- RepObjectiveFaction = questRecord[10].GetUInt32();
- RepObjectiveValue = questRecord[11].GetInt32();
- RepObjectiveFaction2 = questRecord[12].GetUInt32();
- RepObjectiveValue2 = questRecord[13].GetInt32();
- RequiredMinRepFaction = questRecord[14].GetUInt32();
- RequiredMinRepValue = questRecord[15].GetInt32();
- RequiredMaxRepFaction = questRecord[16].GetUInt32();
- RequiredMaxRepValue = questRecord[17].GetInt32();
- SuggestedPlayers = questRecord[18].GetUInt32();
- LimitTime = questRecord[19].GetUInt32();
- QuestFlags = questRecord[20].GetUInt32();
- uint32 SpecialFlags = questRecord[21].GetUInt16();
- CharTitleId = questRecord[22].GetUInt32();
- PlayersSlain = questRecord[23].GetUInt32();
- BonusTalents = questRecord[24].GetUInt32();
- RewArenaPoints = questRecord[25].GetInt32();
- PrevQuestId = questRecord[26].GetInt32();
- NextQuestId = questRecord[27].GetInt32();
- ExclusiveGroup = questRecord[28].GetInt32();
- NextQuestInChain = questRecord[29].GetUInt32();
- XPId = questRecord[30].GetUInt32();
- SrcItemId = questRecord[31].GetUInt32();
- SrcItemCount = questRecord[32].GetUInt32();
- SrcSpell = questRecord[33].GetUInt32();
- Title = questRecord[34].GetString();
- Details = questRecord[35].GetString();
- Objectives = questRecord[36].GetString();
- OfferRewardText = questRecord[37].GetString();
- RequestItemsText = questRecord[38].GetString();
- EndText = questRecord[39].GetString();
- CompletedText = questRecord[40].GetString();
+ Id = questRecord[0].GetUInt32();
+ Method = questRecord[1].GetUInt32();
+ Level = questRecord[2].GetInt32();
+ MinLevel = questRecord[3].GetUInt32();
+ MaxLevel = questRecord[4].GetUInt32();
+ ZoneOrSort = questRecord[5].GetInt32();
+ Type = questRecord[6].GetUInt32();
+ SuggestedPlayers = questRecord[7].GetUInt32();
+ LimitTime = questRecord[8].GetUInt32();
+ RequiredClasses = questRecord[9].GetUInt32();
+ RequiredRaces = questRecord[10].GetUInt32();
+ RequiredSkillId = questRecord[11].GetUInt32();
+ RequiredSkillPoints = questRecord[12].GetUInt32();
+ RequiredFactionId1 = questRecord[13].GetUInt32();
+ RequiredFactionId2 = questRecord[14].GetUInt32();
+ RequiredFactionValue1 = questRecord[15].GetInt32();
+ RequiredFactionValue2 = questRecord[16].GetInt32();
+ RequiredMinRepFaction = questRecord[17].GetUInt32();
+ RequiredMaxRepFaction = questRecord[18].GetUInt32();
+ RequiredMinRepValue = questRecord[19].GetInt32();
+ RequiredMaxRepValue = questRecord[20].GetInt32();
+ PrevQuestId = questRecord[21].GetInt32();
+ NextQuestId = questRecord[22].GetInt32();
+ ExclusiveGroup = questRecord[23].GetInt32();
+ NextQuestIdChain = questRecord[24].GetUInt32();
+ RewardXPId = questRecord[25].GetUInt32();
+ RewardOrRequiredMoney = questRecord[26].GetInt32();
+ RewardMoneyMaxLevel = questRecord[27].GetUInt32();
+ RewardSpell = questRecord[28].GetUInt32();
+ RewardSpellCast = questRecord[29].GetInt32();
+ RewardHonor = questRecord[30].GetUInt32();
+ RewardHonorMultiplier = questRecord[31].GetFloat();
+ RewardMailTemplateId = questRecord[32].GetUInt32();
+ RewardMailDelay = questRecord[33].GetUInt32();
+ SourceItemId = questRecord[34].GetUInt32();
+ SourceItemIdCount = questRecord[35].GetUInt32();
+ SourceSpellid = questRecord[36].GetUInt32();
+ Flags = questRecord[37].GetUInt32();
+ uint32 SpecialFlags = questRecord[38].GetUInt16();
+ MinimapTargetMark = questRecord[39].GetUInt32();
+ RewardTitleId = questRecord[40].GetUInt32();
+ RequiredPlayerKills = questRecord[41].GetUInt32();
+ RewardTalents = questRecord[42].GetUInt32();
+ RewardArenaPoints = questRecord[43].GetInt32();
+ RewardSkillId = questRecord[44].GetUInt32();
+ RewardSkillPoints = questRecord[45].GetUInt32();
+ RewardReputationMask = questRecord[46].GetUInt32();
+ QuestGiverPortrait = questRecord[47].GetUInt32();
+ QuestTurnInPortrait = questRecord[48].GetUInt32();
- for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
- ObjectiveText[i] = questRecord[41+i].GetString();
+ for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
+ RewardItemId[i] = questRecord[49+i].GetUInt32();
- for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
- ReqItemId[i] = questRecord[45+i].GetUInt32();
+ for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
+ RewardItemIdCount[i] = questRecord[53+i].GetUInt32();
- for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
- ReqItemCount[i] = questRecord[51+i].GetUInt32();
+ for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
+ RewardChoiceItemId[i] = questRecord[57+i].GetUInt32();
- for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
- ReqSourceId[i] = questRecord[57+i].GetUInt32();
+ for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
+ RewardChoiceItemCount[i] = questRecord[63+i].GetUInt32();
+
+ for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
+ RewardFactionId[i] = questRecord[69+i].GetUInt32();
- for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
- ReqSourceCount[i] = questRecord[61+i].GetUInt32();
+ for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
+ RewardFactionValueId[i] = questRecord[74+i].GetInt32();
- for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
- ReqCreatureOrGOId[i] = questRecord[65+i].GetInt32();
+ for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
+ RewardFactionValueIdOverride[i] = questRecord[79+i].GetInt32();
+
+ PointMapId = questRecord[84].GetUInt32();
+ PointX = questRecord[85].GetFloat();
+ PointY = questRecord[86].GetFloat();
+ PointOption = questRecord[87].GetUInt32();
+ Title = questRecord[88].GetString();
+ Objectives = questRecord[89].GetString();
+ Details = questRecord[90].GetString();
+ EndText = questRecord[91].GetString();
+ CompletedText = questRecord[92].GetString();
+ OfferRewardText = questRecord[93].GetString();
+ RequestItemsText = questRecord[94].GetString();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
- ReqCreatureOrGOCount[i] = questRecord[69+i].GetUInt32();
+ RequiredNpcOrGo[i] = questRecord[95+i].GetInt32();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
- ReqSpell[i] = questRecord[73+i].GetUInt32();
+ RequiredNpcOrGoCount[i] = questRecord[99+i].GetUInt32();
- for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
- RewChoiceItemId[i] = questRecord[77+i].GetUInt32();
+ for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
+ RequiredSourceItemId[i] = questRecord[103+i].GetUInt32();
- for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
- RewChoiceItemCount[i] = questRecord[83+i].GetUInt32();
+ for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
+ RequiredSourceItemCount[i] = questRecord[107+i].GetUInt32();
- for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
- RewItemId[i] = questRecord[89+i].GetUInt32();
+ for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
+ RequiredItemId[i] = questRecord[111+i].GetUInt32();
- for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
- RewItemCount[i] = questRecord[93+i].GetUInt32();
+ for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
+ RequiredItemCount[i] = questRecord[117+i].GetUInt32();
- for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
- RewRepFaction[i] = questRecord[97+i].GetUInt32();
+ RequiredSpell = questRecord[123].GetUInt32();
- for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
- RewRepValueId[i] = questRecord[102+i].GetInt32();
+ for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) // To be removed
+ RequiredSpellCast[i] = questRecord[124+i].GetUInt32();
- for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
- RewRepValue[i] = questRecord[107+i].GetInt32();
-
- RewHonorAddition = questRecord[112].GetUInt32();
- RewHonorMultiplier = questRecord[113].GetFloat();
- RewOrReqMoney = questRecord[114].GetInt32();
- RewMoneyMaxLevel = questRecord[115].GetUInt32();
- RewSpell = questRecord[116].GetUInt32();
- RewSpellCast = questRecord[117].GetInt32();
- RewMailTemplateId = questRecord[118].GetUInt32();
- RewMailDelaySecs = questRecord[119].GetUInt32();
- PointMapId = questRecord[120].GetUInt32();
- PointX = questRecord[121].GetFloat();
- PointY = questRecord[122].GetFloat();
- PointOpt = questRecord[123].GetUInt32();
+ for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
+ ObjectiveText[i] = questRecord[128+i].GetString();
+
+ for (int i = 0; i < QUEST_REWARD_CURRENCY_COUNT; ++i)
+ RewardCurrencyId[i] = questRecord[132].GetUInt32();
+
+ for (int i = 0; i < QUEST_REWARD_CURRENCY_COUNT; ++i)
+ RewardCurrencyCount[i] = questRecord[136].GetUInt32();
+
+ for (int i = 0; i < QUEST_REQUIRED_CURRENCY_COUNT; ++i)
+ RequiredCurrencyId[i] = questRecord[140].GetUInt32();
+
+ for (int i = 0; i < QUEST_REQUIRED_CURRENCY_COUNT; ++i)
+ RequiredCurrencyCount[i] = questRecord[144].GetUInt32();
+
+ QuestGiverTextWindow = questRecord[148].GetString();
+ QuestGiverTargetName = questRecord[149].GetString();
+ QuestTurnTextWindow = questRecord[150].GetString();
+ QuestTurnTargetName = questRecord[151].GetString();
+ SoundAccept = questRecord[152].GetUInt32();
+ SoundTurnIn = questRecord[153].GetUInt32();
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
- DetailsEmote[i] = questRecord[124+i].GetUInt32();
+ DetailsEmote[i] = questRecord[154+i].GetUInt32();
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
- DetailsEmoteDelay[i] = questRecord[128+i].GetUInt32();
+ DetailsEmoteDelay[i] = questRecord[158+i].GetUInt32();
- IncompleteEmote = questRecord[132].GetUInt32();
- CompleteEmote = questRecord[133].GetUInt32();
+ EmoteOnIncomplete = questRecord[162].GetUInt32();
+ EmoteOnComplete = questRecord[163].GetUInt32();
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
- OfferRewardEmote[i] = questRecord[134+i].GetInt32();
+ OfferRewardEmote[i] = questRecord[164+i].GetInt32();
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
- OfferRewardEmoteDelay[i] = questRecord[138+i].GetInt32();
+ OfferRewardEmoteDelay[i] = questRecord[168+i].GetInt32();
- QuestStartScript = questRecord[142].GetUInt32();
- QuestCompleteScript = questRecord[143].GetUInt32();
+ StartScript = questRecord[172].GetUInt32();
+ CompleteScript = questRecord[173].GetUInt32();
- QuestFlags |= SpecialFlags << 20;
- if (QuestFlags & QUEST_TRINITY_FLAGS_AUTO_ACCEPT)
- QuestFlags |= QUEST_FLAGS_AUTO_ACCEPT;
+ // int32 WDBVerified = questRecord[174].GetInt32();
- m_reqitemscount = 0;
- m_reqCreatureOrGOcount = 0;
- m_rewitemscount = 0;
- m_rewchoiceitemscount = 0;
+ Flags |= SpecialFlags << 20;
+ if (Flags & QUEST_TRINITY_FLAGS_AUTO_ACCEPT)
+ Flags |= QUEST_FLAGS_AUTO_ACCEPT;
+
+ m_reqItemsCount = 0;
+ m_reqNpcOrGoCount = 0;
+ m_rewItemsCount = 0;
+ m_rewChoiceItemsCount = 0;
+ m_rewCurrencyCount = 0;
+ m_reqCurrencyCount = 0;
for (int i=0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
- if (ReqItemId[i])
- ++m_reqitemscount;
+ if (RequiredItemId[i])
+ ++m_reqItemsCount;
for (int i=0; i < QUEST_OBJECTIVES_COUNT; ++i)
- if (ReqCreatureOrGOId[i])
- ++m_reqCreatureOrGOcount;
+ if (RequiredNpcOrGo[i])
+ ++m_reqNpcOrGoCount;
for (int i=0; i < QUEST_REWARDS_COUNT; ++i)
- if (RewItemId[i])
- ++m_rewitemscount;
+ if (RewardItemId[i])
+ ++m_rewItemsCount;
for (int i=0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
- if (RewChoiceItemId[i])
- ++m_rewchoiceitemscount;
+ if (RewardChoiceItemId[i])
+ ++m_rewChoiceItemsCount;
+
+ for (int i=0; i < QUEST_REWARD_CURRENCY_COUNT; ++i)
+ if (RewardCurrencyId[i])
+ ++m_rewCurrencyCount;
+
+ for (int i=0; i < QUEST_REQUIRED_CURRENCY_COUNT; ++i)
+ if (RequiredCurrencyId[i])
+ ++m_reqCurrencyCount;
+
}
uint32 Quest::XPValue(Player* player) const
{
if (player)
{
- int32 quest_level = (QuestLevel == -1 ? player->getLevel() : QuestLevel);
+ int32 quest_level = (Level == -1 ? player->getLevel() : Level);
const QuestXPEntry* xpentry = sQuestXPStore.LookupEntry(quest_level);
if (!xpentry)
return 0;
@@ -181,7 +222,7 @@ uint32 Quest::XPValue(Player* player) const
else if (diffFactor > 10)
diffFactor = 10;
- uint32 xp = diffFactor * xpentry->Exp[XPId] / 10;
+ uint32 xp = diffFactor * xpentry->Exp[RewardXPId] / 10;
if (xp <= 100)
xp = 5 * ((xp + 2) / 5);
else if (xp <= 500)
@@ -199,15 +240,15 @@ uint32 Quest::XPValue(Player* player) const
int32 Quest::GetRewOrReqMoney() const
{
- if (RewOrReqMoney <= 0)
- return RewOrReqMoney;
+ if (RewardOrRequiredMoney <= 0)
+ return RewardOrRequiredMoney;
- return int32(RewOrReqMoney * sWorld->getRate(RATE_DROP_MONEY));
+ return int32(RewardOrRequiredMoney * sWorld->getRate(RATE_DROP_MONEY));
}
bool Quest::IsAutoComplete() const
{
- return QuestMethod == 0 || HasFlag(QUEST_FLAGS_AUTOCOMPLETE);
+ return Method == 0 || HasFlag(QUEST_FLAGS_AUTOCOMPLETE);
}
bool Quest::IsAllowedInRaid() const
diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h
index 90e52660160..4601154feab 100755
--- a/src/server/game/Quests/QuestDef.h
+++ b/src/server/game/Quests/QuestDef.h
@@ -41,6 +41,8 @@ class ObjectMgr;
#define QUEST_REPUTATIONS_COUNT 5
#define QUEST_EMOTE_COUNT 4
#define QUEST_PVP_KILL_SLOT 0
+#define QUEST_REWARD_CURRENCY_COUNT 4
+#define QUEST_REQUIRED_CURRENCY_COUNT 4
enum QuestFailedReasons
{
@@ -141,7 +143,7 @@ enum __QuestFlags
QUEST_FLAGS_UNAVAILABLE = 0x00004000, // Used on quests that are not generically available
QUEST_FLAGS_WEEKLY = 0x00008000,
QUEST_FLAGS_AUTOCOMPLETE = 0x00010000, // auto complete
- QUEST_FLAGS_SPECIAL_ITEM = 0x00020000, // has something to do with ReqItemId and SrcItemId
+ QUEST_FLAGS_SPECIAL_ITEM = 0x00020000, // has something to do with RequiredItemId and SourceItemId
QUEST_FLAGS_OBJ_TEXT = 0x00040000, // use Objective text as Complete text
QUEST_FLAGS_AUTO_ACCEPT = 0x00080000, // The client recognizes this flag as auto-accept. However, NONE of the current quests (3.3.5a) have this flag. Maybe blizz used to use it, or will use it in the future.
@@ -173,6 +175,11 @@ struct QuestLocale
StringVector EndText;
StringVector CompletedText;
std::vector< StringVector > ObjectiveText;
+ // new on 4.x
+ StringVector QuestGiverTextWindow;
+ StringVector QuestGiverTargetName;
+ StringVector QuestTurnTextWindow;
+ StringVector QuestTurnTargetName;
};
// This Quest class provides a convenient way to access a few pretotaled (cached) quest details,
@@ -185,24 +192,25 @@ class Quest
Quest(Field* questRecord);
uint32 XPValue(Player* player) const;
- bool HasFlag(uint32 flag) const { return (QuestFlags & flag) != 0; }
- void SetFlag(uint32 flag) { QuestFlags |= flag; }
+ bool HasFlag(uint32 flag) const { return (Flags & flag) != 0; }
+ void SetFlag(uint32 flag) { Flags |= flag; }
// table data accessors:
- uint32 GetQuestId() const { return QuestId; }
- uint32 GetQuestMethod() const { return QuestMethod; }
+ uint32 GetQuestId() const { return Id; }
+ uint32 GetQuestMethod() const { return Method; }
int32 GetZoneOrSort() const { return ZoneOrSort; }
- int32 GetSkillOrClassMask() const { return SkillOrClassMask; }
uint32 GetMinLevel() const { return MinLevel; }
uint32 GetMaxLevel() const { return MaxLevel; }
- uint32 GetQuestLevel() const { return QuestLevel; }
+ uint32 GetQuestLevel() const { return Level; }
uint32 GetType() const { return Type; }
+ uint32 GetRequiredClasses() const { return RequiredClasses; }
uint32 GetRequiredRaces() const { return RequiredRaces; }
- uint32 GetRequiredSkillValue() const { return RequiredSkillValue; }
- uint32 GetRepObjectiveFaction() const { return RepObjectiveFaction; }
- int32 GetRepObjectiveValue() const { return RepObjectiveValue; }
- uint32 GetRepObjectiveFaction2() const { return RepObjectiveFaction2; }
- int32 GetRepObjectiveValue2() const { return RepObjectiveValue2; }
+ uint32 GetRequiredSkill() const { return RequiredSkillId; }
+ uint32 GetRequiredSkillValue() const { return RequiredSkillPoints; }
+ uint32 GetRepObjectiveFaction() const { return RequiredFactionId1; }
+ int32 GetRepObjectiveValue() const { return RequiredFactionValue1; }
+ uint32 GetRepObjectiveFaction2() const { return RequiredFactionId2; }
+ int32 GetRepObjectiveValue2() const { return RequiredFactionValue2; }
uint32 GetRequiredMinRepFaction() const { return RequiredMinRepFaction; }
int32 GetRequiredMinRepValue() const { return RequiredMinRepValue; }
uint32 GetRequiredMaxRepFaction() const { return RequiredMaxRepFaction; }
@@ -212,15 +220,15 @@ class Quest
int32 GetPrevQuestId() const { return PrevQuestId; }
int32 GetNextQuestId() const { return NextQuestId; }
int32 GetExclusiveGroup() const { return ExclusiveGroup; }
- uint32 GetNextQuestInChain() const { return NextQuestInChain; }
- uint32 GetCharTitleId() const { return CharTitleId; }
- uint32 GetPlayersSlain() const { return PlayersSlain; }
- uint32 GetBonusTalents() const { return BonusTalents; }
- int32 GetRewArenaPoints() const {return RewArenaPoints; }
- uint32 GetXPId() const { return XPId; }
- uint32 GetSrcItemId() const { return SrcItemId; }
- uint32 GetSrcItemCount() const { return SrcItemCount; }
- uint32 GetSrcSpell() const { return SrcSpell; }
+ uint32 GetNextQuestInChain() const { return NextQuestIdChain; }
+ uint32 GetCharTitleId() const { return RewardTitleId; }
+ uint32 GetPlayersSlain() const { return RequiredPlayerKills; }
+ uint32 GetBonusTalents() const { return RewardTalents; }
+ int32 GetRewArenaPoints() const {return RewardArenaPoints; }
+ uint32 GetXPId() const { return RewardXPId; }
+ uint32 GetSrcItemId() const { return SourceItemId; }
+ uint32 GetSrcItemCount() const { return SourceItemIdCount; }
+ uint32 GetSrcSpell() const { return SourceSpellid; }
std::string GetTitle() const { return Title; }
std::string GetDetails() const { return Details; }
std::string GetObjectives() const { return Objectives; }
@@ -228,60 +236,77 @@ class Quest
std::string GetRequestItemsText() const { return RequestItemsText; }
std::string GetEndText() const { return EndText; }
std::string GetCompletedText() const { return CompletedText; }
+ std::string GetQuestGiverTextWindow() const { return QuestGiverTextWindow; }
+ std::string GetQuestGiverTargetName() const { return QuestGiverTargetName; }
+ std::string GetQuestTurnTextWindow() const { return QuestTurnTextWindow; }
+ std::string GetQuestTurnTargetName() const { return QuestTurnTargetName; }
int32 GetRewOrReqMoney() const;
- uint32 GetRewHonorAddition() const { return RewHonorAddition; }
- float GetRewHonorMultiplier() const { return RewHonorMultiplier; }
- uint32 GetRewMoneyMaxLevel() const { return RewMoneyMaxLevel; }
- // use in XP calculation at client
- uint32 GetRewSpell() const { return RewSpell; }
- int32 GetRewSpellCast() const { return RewSpellCast; }
- uint32 GetRewMailTemplateId() const { return RewMailTemplateId; }
- uint32 GetRewMailDelaySecs() const { return RewMailDelaySecs; }
+ uint32 GetRewHonorAddition() const { return RewardHonor; }
+ float GetRewHonorMultiplier() const { return RewardHonorMultiplier; }
+ uint32 GetRewMoneyMaxLevel() const { return RewardMoneyMaxLevel; } // use in XP calculation at client
+ uint32 GetRewSpell() const { return RewardSpell; }
+ int32 GetRewSpellCast() const { return RewardSpellCast; }
+ uint32 GetRewMailTemplateId() const { return RewardMailTemplateId; }
+ uint32 GetRewMailDelaySecs() const { return RewardMailDelay; }
uint32 GetPointMapId() const { return PointMapId; }
float GetPointX() const { return PointX; }
float GetPointY() const { return PointY; }
- uint32 GetPointOpt() const { return PointOpt; }
- uint32 GetIncompleteEmote() const { return IncompleteEmote; }
- uint32 GetCompleteEmote() const { return CompleteEmote; }
- uint32 GetQuestStartScript() const { return QuestStartScript; }
- uint32 GetQuestCompleteScript() const { return QuestCompleteScript; }
- bool IsRepeatable() const { return QuestFlags & QUEST_TRINITY_FLAGS_REPEATABLE; }
+ uint32 GetPointOpt() const { return PointOption; }
+ uint32 GetRequiredSpell() const { return RequiredSpell; }
+ uint32 GetSoundAccept() const { return SoundAccept; }
+ uint32 GetSoundTurnIn() const { return SoundTurnIn; }
+ uint32 GetIncompleteEmote() const { return EmoteOnIncomplete; }
+ uint32 GetCompleteEmote() const { return EmoteOnComplete; }
+ uint32 GetQuestStartScript() const { return StartScript; }
+ uint32 GetQuestCompleteScript() const { return CompleteScript; }
+ bool IsRepeatable() const { return Flags & QUEST_TRINITY_FLAGS_REPEATABLE; }
bool IsAutoComplete() const;
- uint32 GetFlags() const { return QuestFlags; }
- bool IsDaily() const { return QuestFlags & QUEST_FLAGS_DAILY; }
- bool IsWeekly() const { return QuestFlags & QUEST_FLAGS_WEEKLY; }
- bool IsDailyOrWeekly() const { return QuestFlags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); }
- bool IsAutoAccept() const { return QuestFlags & QUEST_FLAGS_AUTO_ACCEPT; }
+ uint32 GetFlags() const { return Flags; }
+ uint32 GetMinimapTargetMark() const { return MinimapTargetMark; }
+ uint32 GetRewardSkillId() const { return RewardSkillId; }
+ uint32 GetRewardSkillPoints() const { return RewardSkillPoints; }
+ uint32 GetRewardReputationMask() const { return RewardReputationMask; }
+ uint32 GetQuestGiverPortrait() const { return QuestGiverPortrait; }
+ uint32 GetQuestTurnInPortrait() const { return QuestTurnInPortrait; }
+ bool IsDaily() const { return Flags & QUEST_FLAGS_DAILY; }
+ bool IsWeekly() const { return Flags & QUEST_FLAGS_WEEKLY; }
+ bool IsDailyOrWeekly() const { return Flags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); }
+ bool IsAutoAccept() const { return Flags & QUEST_FLAGS_AUTO_ACCEPT; }
bool IsRaidQuest() const { return Type == QUEST_TYPE_RAID || Type == QUEST_TYPE_RAID_10 || Type == QUEST_TYPE_RAID_25; }
bool IsAllowedInRaid() const;
- bool IsDFQuest() const { return QuestFlags & QUEST_TRINITY_FLAGS_DF_QUEST; }
+ bool IsDFQuest() const { return Flags & QUEST_TRINITY_FLAGS_DF_QUEST; }
uint32 CalculateHonorGain(uint8 level) const;
// multiple values
std::string ObjectiveText[QUEST_OBJECTIVES_COUNT];
- uint32 ReqItemId[QUEST_ITEM_OBJECTIVES_COUNT];
- uint32 ReqItemCount[QUEST_ITEM_OBJECTIVES_COUNT];
- uint32 ReqSourceId[QUEST_SOURCE_ITEM_IDS_COUNT];
- uint32 ReqSourceCount[QUEST_SOURCE_ITEM_IDS_COUNT];
- int32 ReqCreatureOrGOId[QUEST_OBJECTIVES_COUNT]; // >0 Creature <0 Gameobject
- 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 RewRepValueId[QUEST_REPUTATIONS_COUNT];
- int32 RewRepValue[QUEST_REPUTATIONS_COUNT];
+ uint32 RequiredItemId[QUEST_ITEM_OBJECTIVES_COUNT];
+ uint32 RequiredItemCount[QUEST_ITEM_OBJECTIVES_COUNT];
+ uint32 RequiredSourceItemId[QUEST_SOURCE_ITEM_IDS_COUNT];
+ uint32 RequiredSourceItemCount[QUEST_SOURCE_ITEM_IDS_COUNT];
+ int32 RequiredNpcOrGo[QUEST_OBJECTIVES_COUNT]; // >0 Creature <0 Gameobject
+ uint32 RequiredNpcOrGoCount[QUEST_OBJECTIVES_COUNT];
+ uint32 RequiredSpellCast[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];
+ // 4.x
+ uint32 RewardCurrencyId[QUEST_REWARD_CURRENCY_COUNT];
+ uint32 RewardCurrencyCount[QUEST_REWARD_CURRENCY_COUNT];
+ uint32 RequiredCurrencyId[QUEST_REQUIRED_CURRENCY_COUNT];
+ uint32 RequiredCurrencyCount[QUEST_REQUIRED_CURRENCY_COUNT];
- uint32 GetReqItemsCount() const { return m_reqitemscount; }
- uint32 GetReqCreatureOrGOcount() const { return m_reqCreatureOrGOcount; }
- uint32 GetRewChoiceItemsCount() const { return m_rewchoiceitemscount; }
- uint32 GetRewItemsCount() const { return m_rewitemscount; }
+ uint32 GetReqItemsCount() const { return m_reqItemsCount; }
+ uint32 GetReqCreatureOrGOcount() const { return m_reqNpcOrGoCount; }
+ uint32 GetRewChoiceItemsCount() const { return m_rewChoiceItemsCount; }
+ uint32 GetRewItemsCount() const { return m_rewItemsCount; }
typedef std::vector<int32> PrevQuests;
PrevQuests prevQuests;
@@ -290,46 +315,49 @@ class Quest
// cached data
private:
- uint32 m_reqitemscount;
- uint32 m_reqCreatureOrGOcount;
- uint32 m_rewchoiceitemscount;
- uint32 m_rewitemscount;
+ uint32 m_reqItemsCount;
+ uint32 m_reqNpcOrGoCount;
+ uint32 m_rewChoiceItemsCount;
+ uint32 m_rewItemsCount;
+ uint32 m_rewCurrencyCount;
+ uint32 m_reqCurrencyCount;
// table data
protected:
- uint32 QuestId;
- uint32 QuestMethod;
+ uint32 Id;
+ uint32 Method;
int32 ZoneOrSort;
- int32 SkillOrClassMask;
uint32 MinLevel;
uint32 MaxLevel;
- int32 QuestLevel;
+ int32 Level;
uint32 Type;
+ uint32 RequiredClasses;
uint32 RequiredRaces;
- uint32 RequiredSkillValue;
- uint32 RepObjectiveFaction;
- int32 RepObjectiveValue;
- uint32 RepObjectiveFaction2;
- int32 RepObjectiveValue2;
+ uint32 RequiredSkillId;
+ uint32 RequiredSkillPoints;
+ uint32 RequiredFactionId1;
+ int32 RequiredFactionValue1;
+ uint32 RequiredFactionId2;
+ int32 RequiredFactionValue2;
uint32 RequiredMinRepFaction;
int32 RequiredMinRepValue;
uint32 RequiredMaxRepFaction;
int32 RequiredMaxRepValue;
uint32 SuggestedPlayers;
uint32 LimitTime;
- uint32 QuestFlags;
- uint32 CharTitleId;
- uint32 PlayersSlain;
- uint32 BonusTalents;
- int32 RewArenaPoints;
+ uint32 Flags;
+ uint32 RewardTitleId;
+ uint32 RequiredPlayerKills;
+ uint32 RewardTalents;
+ int32 RewardArenaPoints;
int32 PrevQuestId;
int32 NextQuestId;
int32 ExclusiveGroup;
- uint32 NextQuestInChain;
- uint32 XPId;
- uint32 SrcItemId;
- uint32 SrcItemCount;
- uint32 SrcSpell;
+ uint32 NextQuestIdChain;
+ uint32 RewardXPId;
+ uint32 SourceItemId;
+ uint32 SourceItemIdCount;
+ uint32 SourceSpellid;
std::string Title;
std::string Details;
std::string Objectives;
@@ -337,22 +365,36 @@ class Quest
std::string RequestItemsText;
std::string EndText;
std::string CompletedText;
- uint32 RewHonorAddition;
- float RewHonorMultiplier;
- int32 RewOrReqMoney;
- uint32 RewMoneyMaxLevel;
- uint32 RewSpell;
- int32 RewSpellCast;
- uint32 RewMailTemplateId;
- uint32 RewMailDelaySecs;
+ uint32 RewardHonor;
+ float RewardHonorMultiplier;
+ int32 RewardOrRequiredMoney;
+ uint32 RewardMoneyMaxLevel;
+ uint32 RewardSpell;
+ int32 RewardSpellCast;
+ uint32 RewardMailTemplateId;
+ uint32 RewardMailDelay;
uint32 PointMapId;
float PointX;
float PointY;
- uint32 PointOpt;
- uint32 IncompleteEmote;
- uint32 CompleteEmote;
- uint32 QuestStartScript;
- uint32 QuestCompleteScript;
+ uint32 PointOption;
+ uint32 EmoteOnIncomplete;
+ uint32 EmoteOnComplete;
+ uint32 StartScript;
+ uint32 CompleteScript;
+ // new in 4.x
+ uint32 MinimapTargetMark;
+ uint32 RewardSkillId;
+ uint32 RewardSkillPoints;
+ uint32 RewardReputationMask;
+ uint32 QuestGiverPortrait;
+ uint32 QuestTurnInPortrait;
+ uint32 RequiredSpell;
+ std::string QuestGiverTextWindow;
+ std::string QuestGiverTargetName;
+ std::string QuestTurnTextWindow;
+ std::string QuestTurnTargetName;
+ uint32 SoundAccept;
+ uint32 SoundTurnIn;
};
struct QuestStatusData