Merge pull request #188 from Day36512/master

Added Config Options for LFG and RDF
This commit is contained in:
ZhengPeiRu21
2023-09-26 20:44:14 -06:00
committed by GitHub
2 changed files with 31 additions and 14 deletions

View File

@@ -328,3 +328,11 @@ IndividualProgression.AllowEarlyDungeonSet2 = 1
# #
IndividualProgression.PvPGearRequirements = 1 IndividualProgression.PvPGearRequirements = 1
#
# IndividualProgression.DisableRDF
# 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

View File

@@ -347,20 +347,29 @@ public:
} }
void OnQueueRandomDungeon(Player* player, uint32& rDungeonId) override void OnQueueRandomDungeon(Player* player, uint32& rDungeonId) override
{ {
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40)) // Check if RDF is disabled in the context of Individual Progression
{ if (sConfigMgr->GetOption<bool>("IndividualProgression.DisableRDF", false))
rDungeonId = RDF_CLASSIC; {
} // Notify the player
else if (rDungeonId == RDF_WRATH_OF_THE_LICH_KING && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5)) 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
rDungeonId = RDF_THE_BURNING_CRUSADE; return;
} }
else if (rDungeonId == RDF_WRATH_OF_THE_LICH_KING_HEROIC && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5))
{ if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
rDungeonId = RDF_THE_BURNING_CRUSADE_HEROIC; {
} 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 bool CanEquipItem(Player* player, uint8 /*slot*/, uint16& /*dest*/, Item* pItem, bool /*swap*/, bool /*not_loading*/) override
{ {