Disable RDF and LFG Config Options

This commit is contained in:
Dinkledork
2023-09-25 22:53:39 -06:00
committed by GitHub
parent ee0c46480c
commit 483405aa52

View File

@@ -348,6 +348,15 @@ public:
void OnQueueRandomDungeon(Player* player, uint32& rDungeonId) override
{
// Check if RDF is disabled in the context of Individual Progression
if (sConfigMgr->GetOption<bool>("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;
@@ -362,6 +371,18 @@ 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<bool>("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)