From 46fb199ee1c5d27ea79f65d63f6fd8dbe29612c6 Mon Sep 17 00:00:00 2001 From: kandera Date: Tue, 3 Jan 2012 08:37:21 -0500 Subject: Core/Quests: Add implementation of seasonal quest reset. uses a new table much like character_queststatus_weekly. fixed typo where WEEKLY was WEKLY. Attempt 2 --- src/server/game/Quests/QuestDef.cpp | 1 + src/server/game/Quests/QuestDef.h | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'src/server/game/Quests') diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index 14a6577b1b5..674f54d07a8 100755 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -65,6 +65,7 @@ Quest::Quest(Field* questRecord) RequiredPlayerKills = questRecord[40].GetUInt32(); RewardTalents = questRecord[41].GetUInt32(); RewardArenaPoints = questRecord[42].GetInt32(); + SeasonalQuestEvent = 0; for (int i = 0; i < QUEST_REWARDS_COUNT; ++i) RewardItemId[i] = questRecord[43+i].GetUInt32(); diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h index 90905f2fa34..4fbfcd176f4 100755 --- a/src/server/game/Quests/QuestDef.h +++ b/src/server/game/Quests/QuestDef.h @@ -187,6 +187,7 @@ class Quest bool HasFlag(uint32 flag) const { return (Flags & flag) != 0; } void SetFlag(uint32 flag) { Flags |= flag; } + void SetSeasonalQuestEvent(uint16 event_id) { SeasonalQuestEvent = event_id; } // table data accessors: uint32 GetQuestId() const { return Id; } @@ -246,11 +247,13 @@ class Quest uint32 GetCompleteEmote() const { return EmoteOnComplete; } uint32 GetQuestStartScript() const { return StartScript; } uint32 GetQuestCompleteScript() const { return CompleteScript; } + uint16 GetSeasonalQuestEvent() const {return SeasonalQuestEvent; } bool IsRepeatable() const { return Flags & QUEST_TRINITY_FLAGS_REPEATABLE; } bool IsAutoComplete() const; uint32 GetFlags() const { return Flags; } bool IsDaily() const { return Flags & QUEST_FLAGS_DAILY; } bool IsWeekly() const { return Flags & QUEST_FLAGS_WEEKLY; } + bool IsSeasonal() const { return ZoneOrSort == -22; } 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; } @@ -295,6 +298,8 @@ class Quest uint32 m_reqCreatureOrGOcount; uint32 m_rewchoiceitemscount; uint32 m_rewitemscount; + //additional data needed for seasonal quest events + uint16 SeasonalQuestEvent; // table data protected: -- cgit v1.2.3