From fe257e52e354a689fa0cd58a390f9cd684a33ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E4=BD=A9=E8=8C=B9?= Date: Mon, 12 Sep 2022 20:04:04 -0600 Subject: [PATCH] Fix ProgressionLimit comparison --- src/IndividualProgression.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/IndividualProgression.cpp b/src/IndividualProgression.cpp index 57784bb..dbe5823 100644 --- a/src/IndividualProgression.cpp +++ b/src/IndividualProgression.cpp @@ -234,7 +234,7 @@ class IndividualPlayerProgression_PetScript : public PetScript private: bool hasPassedProgression(Player* player, ProgressionState state) { - if (progressionLimit && state > progressionLimit) + if (progressionLimit && state >= progressionLimit) return false; return player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value >= state; } @@ -313,13 +313,13 @@ class IndividualPlayerProgression : public PlayerScript private: static bool hasPassedProgression(Player* player, ProgressionState state) { - if (progressionLimit && state > progressionLimit) + if (progressionLimit && state >= progressionLimit) return false; return player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value >= state; } static void UpdateProgressionState(Player* player, ProgressionState newState) { - if (progressionLimit && newState > progressionLimit) + if (progressionLimit && newState >= progressionLimit) return; uint8 currentState = player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value; if (newState > currentState)