Core/Events

* Changed how quests are linked to events (no longer in Quest class)
* Added quest validation when loading game_event_seasonal_questrelation
* Renamed fields in new table to be consistent with game_event* tables
* Corrected db data (some entries had -1 as event id)
This commit is contained in:
Shauren
2012-01-05 13:27:17 +01:00
parent fc987e9a2f
commit 01900b5829
7 changed files with 51 additions and 31 deletions
+3 -4
View File
@@ -65,7 +65,6 @@ 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();
@@ -78,7 +77,7 @@ Quest::Quest(Field* questRecord)
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
RewardChoiceItemCount[i] = questRecord[57+i].GetUInt32();
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
RewardFactionId[i] = questRecord[63+i].GetUInt32();
@@ -87,7 +86,7 @@ Quest::Quest(Field* questRecord)
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
RewardFactionValueIdOverride[i] = questRecord[73+i].GetInt32();
PointMapId = questRecord[78].GetUInt32();
PointX = questRecord[79].GetFloat();
PointY = questRecord[80].GetFloat();
@@ -203,7 +202,7 @@ uint32 Quest::XPValue(Player* player) const
return 0;
}
int32 Quest::GetRewOrReqMoney() const
int32 Quest::GetRewOrReqMoney() const
{
if (RewardOrRequiredMoney <= 0)
return RewardOrRequiredMoney;
+1 -5
View File
@@ -187,7 +187,6 @@ 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; }
@@ -247,13 +246,12 @@ 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 IsSeasonal() const { return ZoneOrSort == -QUEST_SORT_SEASONAL; }
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; }
@@ -298,8 +296,6 @@ class Quest
uint32 m_reqCreatureOrGOcount;
uint32 m_rewchoiceitemscount;
uint32 m_rewitemscount;
//additional data needed for seasonal quest events
uint16 SeasonalQuestEvent;
// table data
protected: