[10655] Add support for monthly quests

Quest that can repeated each month are set by quest_template.SpecialFlags |0x04 flag
Quest are reset at midnight the first day of each month.
Note: for the time being, quest must also be set repeatable (SpecialFlags |0x01)

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-10-29 20:38:09 +02:00
parent 331a7e7f5b
commit a38f97f71c
12 changed files with 218 additions and 13 deletions

View file

@ -3685,6 +3685,15 @@ void ObjectMgr::LoadQuests()
}
}
if (qinfo->QuestFlags & QUEST_MANGOS_FLAGS_MONTHLY)
{
if (!(qinfo->QuestFlags & QUEST_MANGOS_FLAGS_REPEATABLE))
{
sLog.outErrorDb("Monthly quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId());
qinfo->QuestFlags |= QUEST_MANGOS_FLAGS_REPEATABLE;
}
}
if (qinfo->QuestFlags & QUEST_FLAGS_AUTO_REWARDED)
{
// at auto-reward can be rewarded only RewChoiceItemId[0]