From fa7d7ed502563dee964a8bf27fcad912fb690b17 Mon Sep 17 00:00:00 2001 From: Dinkledork <118951051+Day36512@users.noreply.github.com> Date: Wed, 27 Sep 2023 18:02:54 -0600 Subject: [PATCH] RDF Disable Holliday Exceptions Added exceptions to Headless Horseman, Frost Lord Ahune, Coren Direbrew, and Crown Chemical Co. --- src/IndividualProgressionPlayer.cpp | 49 ++++++++++++++++------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/src/IndividualProgressionPlayer.cpp b/src/IndividualProgressionPlayer.cpp index c8228fb..4227ff3 100644 --- a/src/IndividualProgressionPlayer.cpp +++ b/src/IndividualProgressionPlayer.cpp @@ -347,29 +347,34 @@ public: } void OnQueueRandomDungeon(Player* player, uint32& rDungeonId) override - { - // Check if RDF is disabled in the context of Individual Progression - if (sConfigMgr->GetOption("IndividualProgression.DisableRDF", false)) - { - // Notify the player - player->GetSession()->SendNotification("The Random Dungeon feature is currently disabled by the Individual Progression module."); - rDungeonId = 1000; // Set dungeon ID to an invalid value to cancel the queuing - return; - } + { - if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40)) - { - rDungeonId = RDF_CLASSIC; - } - else if (rDungeonId == RDF_WRATH_OF_THE_LICH_KING && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5)) - { - rDungeonId = RDF_THE_BURNING_CRUSADE; - } - else if (rDungeonId == RDF_WRATH_OF_THE_LICH_KING_HEROIC && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5)) - { - rDungeonId = RDF_THE_BURNING_CRUSADE_HEROIC; - } - } + std::set seasonalEventIds = { 285, 286, 287, 288 }; // Allow Headless Horseman, Frost Lord Ahune, Coren Direbrew, Crown Chemical Co. + bool isSeasonalEvent = (seasonalEventIds.find(rDungeonId) != seasonalEventIds.end()); + + // Check if RDF is disabled in the context of Individual Progression + if (sConfigMgr->GetOption("IndividualProgression.DisableRDF", false) && !isSeasonalEvent) + { + // Notify the player + player->GetSession()->SendNotification("The Random Dungeon feature is currently disabled by the Individual Progression module."); + rDungeonId = 1000; // Set dungeon ID to an invalid value to cancel the queuing + return; + } + + // Other logic for individual progression checks + if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40)) + { + rDungeonId = RDF_CLASSIC; + } + else if (rDungeonId == RDF_WRATH_OF_THE_LICH_KING && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5)) + { + rDungeonId = RDF_THE_BURNING_CRUSADE; + } + else if (rDungeonId == RDF_WRATH_OF_THE_LICH_KING_HEROIC && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5)) + { + rDungeonId = RDF_THE_BURNING_CRUSADE_HEROIC; + } +} bool CanEquipItem(Player* player, uint8 /*slot*/, uint16& /*dest*/, Item* pItem, bool /*swap*/, bool /*not_loading*/) override {