From a41eb5d29d9c8959bbb6066a7d4b2de42eb197a7 Mon Sep 17 00:00:00 2001 From: Dinkledork <118951051+Day36512@users.noreply.github.com> Date: Mon, 25 Sep 2023 22:13:27 -0600 Subject: [PATCH 1/5] Added config options to disable LFG --- conf/individualProgression.conf.dist | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/conf/individualProgression.conf.dist b/conf/individualProgression.conf.dist index bdfca73..74eab6c 100644 --- a/conf/individualProgression.conf.dist +++ b/conf/individualProgression.conf.dist @@ -328,3 +328,13 @@ IndividualProgression.AllowEarlyDungeonSet2 = 1 # IndividualProgression.PvPGearRequirements = 1 +# +# IndividualProgression.DisableLFG +# Description: Enable or disable the Looking For Group feature within the context of Individual Progression. +# If set to 1, the LFG feature will be completely disabled. +# If set to 0, the LFG feature will operate as usual. +# Default: 0 - Enabled +# 1 - Disabled +# + +IndividualProgression.DisableLFG = 0 From ee0c46480c3995d4384a57b1823b701f9338e831 Mon Sep 17 00:00:00 2001 From: Dinkledork <118951051+Day36512@users.noreply.github.com> Date: Mon, 25 Sep 2023 22:52:27 -0600 Subject: [PATCH 2/5] Split RDF and LFG into seperate configs --- conf/individualProgression.conf.dist | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/conf/individualProgression.conf.dist b/conf/individualProgression.conf.dist index 74eab6c..aa51719 100644 --- a/conf/individualProgression.conf.dist +++ b/conf/individualProgression.conf.dist @@ -329,12 +329,17 @@ IndividualProgression.AllowEarlyDungeonSet2 = 1 IndividualProgression.PvPGearRequirements = 1 # -# IndividualProgression.DisableLFG -# Description: Enable or disable the Looking For Group feature within the context of Individual Progression. -# If set to 1, the LFG feature will be completely disabled. -# If set to 0, the LFG feature will operate as usual. +# IndividualProgression.DisableRDF +# Description: Enable or disable the Random Dungeon Finder feature within the context of Individual Progression. # Default: 0 - Enabled # 1 - Disabled # +IndividualProgression.DisableRDF = 0 +# +# IndividualProgression.DisableLFG +# Description: Enable or disable the Looking For Group feature within the context of Individual Progression. (This will also disable RDF) +# Default: 0 - Enabled +# 1 - Disabled +# IndividualProgression.DisableLFG = 0 From 483405aa52cc9236ab20a138713bba12235a5434 Mon Sep 17 00:00:00 2001 From: Dinkledork <118951051+Day36512@users.noreply.github.com> Date: Mon, 25 Sep 2023 22:53:39 -0600 Subject: [PATCH 3/5] Disable RDF and LFG Config Options --- src/IndividualProgressionPlayer.cpp | 49 ++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/src/IndividualProgressionPlayer.cpp b/src/IndividualProgressionPlayer.cpp index cbc0a6e..fee54df 100644 --- a/src/IndividualProgressionPlayer.cpp +++ b/src/IndividualProgressionPlayer.cpp @@ -347,20 +347,41 @@ public: } void OnQueueRandomDungeon(Player* player, uint32& rDungeonId) override - { - 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; - } - } + { + // 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; + } + } + + bool CanJoinLfg(Player* player, uint8 roles, lfg::LfgDungeonSet& dungeons, const std::string& comment) override + { + // Check if LFG is disabled in the context of Individual Progression + if (sConfigMgr->GetOption("IndividualProgression.DisableLFG", false)) + { + player->GetSession()->SendNotification("The Looking For Group feature is currently disabled by the Individual Progression module."); + return false; // Prevent the player from joining LFG + } + + return true; + } bool CanEquipItem(Player* player, uint8 /*slot*/, uint16& /*dest*/, Item* pItem, bool /*swap*/, bool /*not_loading*/) override { From 4bb800c1b3f514f6b7777a1ba51f19a17fd3c418 Mon Sep 17 00:00:00 2001 From: Dinkledork <118951051+Day36512@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:25:41 -0600 Subject: [PATCH 4/5] Removed LFG Function as its arleady a config option --- src/IndividualProgressionPlayer.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/IndividualProgressionPlayer.cpp b/src/IndividualProgressionPlayer.cpp index fee54df..c8228fb 100644 --- a/src/IndividualProgressionPlayer.cpp +++ b/src/IndividualProgressionPlayer.cpp @@ -371,18 +371,6 @@ public: } } - bool CanJoinLfg(Player* player, uint8 roles, lfg::LfgDungeonSet& dungeons, const std::string& comment) override - { - // Check if LFG is disabled in the context of Individual Progression - if (sConfigMgr->GetOption("IndividualProgression.DisableLFG", false)) - { - player->GetSession()->SendNotification("The Looking For Group feature is currently disabled by the Individual Progression module."); - return false; // Prevent the player from joining LFG - } - - return true; - } - bool CanEquipItem(Player* player, uint8 /*slot*/, uint16& /*dest*/, Item* pItem, bool /*swap*/, bool /*not_loading*/) override { if (sIndividualProgression->pvpGearRequirements) From 0de3f5ac4b2163ee7e99d7929a30d040aad7e3ac Mon Sep 17 00:00:00 2001 From: Dinkledork <118951051+Day36512@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:27:40 -0600 Subject: [PATCH 5/5] removed redundant LFG disable --- conf/individualProgression.conf.dist | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/conf/individualProgression.conf.dist b/conf/individualProgression.conf.dist index aa51719..50c4571 100644 --- a/conf/individualProgression.conf.dist +++ b/conf/individualProgression.conf.dist @@ -330,16 +330,9 @@ IndividualProgression.AllowEarlyDungeonSet2 = 1 IndividualProgression.PvPGearRequirements = 1 # # IndividualProgression.DisableRDF -# Description: Enable or disable the Random Dungeon Finder feature within the context of Individual Progression. +# Description: Enable or disable the Random Dungeon Finder feature within the context of Individual Progression. +# Queing for specific dungeons will still be possible. (See worldserver.conf for total LFG removal). # Default: 0 - Enabled # 1 - Disabled # IndividualProgression.DisableRDF = 0 - -# -# IndividualProgression.DisableLFG -# Description: Enable or disable the Looking For Group feature within the context of Individual Progression. (This will also disable RDF) -# Default: 0 - Enabled -# 1 - Disabled -# -IndividualProgression.DisableLFG = 0