Update Progression Quests (#763)

hidden progression quests are now removed when a player goes down in progression levels
This commit is contained in:
Grimfeather
2025-09-24 12:43:47 +02:00
committed by GitHub
parent 6d5ca4c55b
commit 3af27e4a20
4 changed files with 33 additions and 163 deletions

View File

@@ -369,6 +369,35 @@ void IndividualProgression::checkKillProgression(Player* killer, Creature* kille
}
}
void IndividualProgression::UpdateProgressionQuests(Player* player)
{
// remove all hidden progression quests
for (uint8 i = PROGRESSION_MOLTEN_CORE; i <= PROGRESSION_WOTLK_TIER_5; ++i)
{
uint32 PROGRESSION_QUEST = 66000;
PROGRESSION_QUEST = PROGRESSION_QUEST + i;
if (player->GetQuestStatus(PROGRESSION_QUEST) == QUEST_STATUS_REWARDED)
player->RemoveRewardedQuest(PROGRESSION_QUEST);
}
// add hidden progression quests
for (uint8 i = PROGRESSION_MOLTEN_CORE; i <= PROGRESSION_WOTLK_TIER_5; ++i)
{
ProgressionState PROGRESSION_STATE = static_cast<ProgressionState>(i);
uint32 PROGRESSION_QUEST = 66000;
PROGRESSION_QUEST = PROGRESSION_QUEST + i;
if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_STATE)) && (player->GetQuestStatus(PROGRESSION_QUEST) != QUEST_STATUS_REWARDED))
{
Quest const* quest = sObjectMgr->GetQuestTemplate(PROGRESSION_QUEST);
player->AddQuest(quest, nullptr);
player->CompleteQuest(PROGRESSION_QUEST);
player->RewardQuest(quest, 0, player, false, false);
}
}
}
class IndividualPlayerProgression_WorldScript : public WorldScript
{