Core/Conditions: implement CONDITION_DAILY_QUEST_DONE to check whethe…
…r or not a daily quest has been completed by a player in that day. Also use it to fix two quest chains broken in commit 7905651. Should be the only ones of their kind.
This commit is contained in:
1 parent
9643f2033a
commit
79c5d21d36
4 files changed
+33
-2
No files matched your search
@@ -23527,6 +23527,24 @@ void Player::SetDailyQuestStatus(uint32 quest_id)
|
||||
}
|
||||
}
|
||||
|
||||
bool Player::IsDailyQuestDone(uint32 quest_id)
|
||||
{
|
||||
bool found = false;
|
||||
if (Quest const* qQuest = sObjectMgr->GetQuestTemplate(quest_id))
|
||||
{
|
||||
for (uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
|
||||
{
|
||||
if (GetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1 + quest_daily_idx) == quest_id)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
void Player::SetWeeklyQuestStatus(uint32 quest_id)
|
||||
{
|
||||
m_weeklyquests.insert(quest_id);
|
||||
|
||||
Reference in new issue
Block a user