mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
fix playerbots exclusion
This commit is contained in:
@@ -87,7 +87,7 @@ public:
|
|||||||
void OnPlayerAfterUpdateMaxHealth(Player* player, float& value) override
|
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.
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
@@ -359,35 +359,35 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OnPlayerQueueRandomDungeon(Player* player, uint32& rDungeonId) override
|
void OnPlayerQueueRandomDungeon(Player* player, uint32& rDungeonId) override
|
||||||
{
|
|
||||||
// List of exceptions for seasonal event dungeons
|
|
||||||
std::set<uint32> seasonalEventDungeons = { 285, 286, 287, 288 };
|
|
||||||
if (seasonalEventDungeons.find(rDungeonId) != seasonalEventDungeons.end())
|
|
||||||
{
|
{
|
||||||
return;
|
// List of exceptions for seasonal event dungeons
|
||||||
}
|
std::set<uint32> seasonalEventDungeons = { 285, 286, 287, 288 };
|
||||||
|
if (seasonalEventDungeons.find(rDungeonId) != seasonalEventDungeons.end())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if RDF is disabled in the context of Individual Progression
|
// Check if RDF is disabled in the context of Individual Progression
|
||||||
if (sConfigMgr->GetOption<bool>("IndividualProgression.DisableRDF", false))
|
if (sConfigMgr->GetOption<bool>("IndividualProgression.DisableRDF", false))
|
||||||
{
|
{
|
||||||
ChatHandler(player->GetSession()).SendNotification("The Random Dungeon feature is currently disabled by the Individual Progression module.");
|
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
|
rDungeonId = 1000; // Set dungeon ID to an invalid value to cancel the queuing
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40) || (isExcludedFromProgression(player) && (player->GetLevel() < 61)))
|
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40) || (isExcludedFromProgression(player) && (player->GetLevel() < 61)))
|
||||||
{
|
{
|
||||||
rDungeonId = RDF_CLASSIC;
|
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
|
bool OnPlayerCanEquipItem(Player* player, uint8 /*slot*/, uint16& /*dest*/, Item* pItem, bool /*swap*/, bool /*not_loading*/) override
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user