mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
not using excluded accounts check aymore
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user