not using excluded accounts check aymore

This commit is contained in:
Grimfeather
2025-05-12 02:58:38 +02:00
committed by GitHub
parent c57d583ec8
commit b5f854508d

View File

@@ -23,17 +23,6 @@ bool IndividualProgression::isBeforeProgression(Player* player, ProgressionState
return player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value < state; return player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value < state;
} }
bool isExcludedFromProgression(Player* player)
{
if(!sIndividualProgression->excludeAccounts) {
return false;
}
std::string accountName;
bool accountNameFound = AccountMgr::GetName(player->GetSession()->GetAccountId(), accountName);
std::regex excludedAccountsRegex (sIndividualProgression->excludedAccountsRegex);
return (accountNameFound && std::regex_match(accountName, excludedAccountsRegex));
}
void IndividualProgression::UpdateProgressionState(Player* player, ProgressionState newState) const void IndividualProgression::UpdateProgressionState(Player* player, ProgressionState newState) const
{ {
if (progressionLimit && newState > progressionLimit) if (progressionLimit && newState > progressionLimit)
@@ -56,11 +45,11 @@ void IndividualProgression::CheckAdjustments(Player* player) const
{ {
return; return;
} }
if ((!hasPassedProgression(player, PROGRESSION_NAXX40)) || (isExcludedFromProgression(player) && (player->GetLevel() < 61))) if (!hasPassedProgression(player, PROGRESSION_NAXX40) || (!hasPassedProgression(player, PROGRESSION_NAXX40) && (player->GetLevel() < 61)))
{ {
AdjustVanillaStats(player); AdjustVanillaStats(player);
} }
else if ((!hasPassedProgression(player, PROGRESSION_TBC_TIER_5)) || (isExcludedFromProgression(player) && (player->GetLevel() < 71))) else if (!hasPassedProgression(player, PROGRESSION_TBC_TIER_5) || (!hasPassedProgression(player, PROGRESSION_TBC_TIER_5) && (player->GetLevel() < 71)))
{ {
AdjustTBCStats(player); AdjustTBCStats(player);
} }