From 25b0f78a341e6e7b9fa24c2c640b605d0aa00f54 Mon Sep 17 00:00:00 2001 From: Grimfeather <88028633+Grimfeather@users.noreply.github.com> Date: Fri, 9 May 2025 00:19:19 +0200 Subject: [PATCH] fix playerbots exclusion --- src/IndividualProgressionPlayer.cpp | 52 ++++++++++++++--------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/IndividualProgressionPlayer.cpp b/src/IndividualProgressionPlayer.cpp index 2500cda..b7ec363 100644 --- a/src/IndividualProgressionPlayer.cpp +++ b/src/IndividualProgressionPlayer.cpp @@ -87,7 +87,7 @@ public: void OnPlayerAfterUpdateMaxHealth(Player* player, float& value) override { // TODO: This should be adjust to use an aura like damage adjustment. This is more robust to update when changing equipment, etc. - if (!sIndividualProgression->enabled || isExcludedFromProgression(player)) + if (!sIndividualProgression->enabled) { return; } @@ -359,35 +359,35 @@ public: } void OnPlayerQueueRandomDungeon(Player* player, uint32& rDungeonId) override -{ - // List of exceptions for seasonal event dungeons - std::set seasonalEventDungeons = { 285, 286, 287, 288 }; - if (seasonalEventDungeons.find(rDungeonId) != seasonalEventDungeons.end()) { - return; - } + // List of exceptions for seasonal event dungeons + std::set seasonalEventDungeons = { 285, 286, 287, 288 }; + if (seasonalEventDungeons.find(rDungeonId) != seasonalEventDungeons.end()) + { + return; + } - // Check if RDF is disabled in the context of Individual Progression - if (sConfigMgr->GetOption("IndividualProgression.DisableRDF", false)) - { - ChatHandler(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; - } + // Check if RDF is disabled in the context of Individual Progression + if (sConfigMgr->GetOption("IndividualProgression.DisableRDF", false)) + { + ChatHandler(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) || (isExcludedFromProgression(player) && (player->GetLevel() < 61))) - { - rDungeonId = RDF_CLASSIC; + if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40) || (isExcludedFromProgression(player) && (player->GetLevel() < 61))) + { + rDungeonId = RDF_CLASSIC; + } + else if (rDungeonId == RDF_WRATH_OF_THE_LICH_KING && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) || (isExcludedFromProgression(player) && (player->GetLevel() < 71))) + { + rDungeonId = RDF_THE_BURNING_CRUSADE; + } + else if (rDungeonId == RDF_WRATH_OF_THE_LICH_KING_HEROIC && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) || (isExcludedFromProgression(player) && (player->GetLevel() < 71))) + { + rDungeonId = RDF_THE_BURNING_CRUSADE_HEROIC; + } } - else if (rDungeonId == RDF_WRATH_OF_THE_LICH_KING && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) || (isExcludedFromProgression(player) && (player->GetLevel() < 71))) - { - rDungeonId = RDF_THE_BURNING_CRUSADE; - } - else if (rDungeonId == RDF_WRATH_OF_THE_LICH_KING_HEROIC && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) || (isExcludedFromProgression(player) && (player->GetLevel() < 71))) - { - rDungeonId = RDF_THE_BURNING_CRUSADE_HEROIC; - } -} bool OnPlayerCanEquipItem(Player* player, uint8 /*slot*/, uint16& /*dest*/, Item* pItem, bool /*swap*/, bool /*not_loading*/) override {