mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
Fix ProgressionLimit comparison
This commit is contained in:
@@ -234,7 +234,7 @@ class IndividualPlayerProgression_PetScript : public PetScript
|
|||||||
private:
|
private:
|
||||||
bool hasPassedProgression(Player* player, ProgressionState state)
|
bool hasPassedProgression(Player* player, ProgressionState state)
|
||||||
{
|
{
|
||||||
if (progressionLimit && state > progressionLimit)
|
if (progressionLimit && state >= progressionLimit)
|
||||||
return false;
|
return false;
|
||||||
return player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value >= state;
|
return player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value >= state;
|
||||||
}
|
}
|
||||||
@@ -313,13 +313,13 @@ class IndividualPlayerProgression : public PlayerScript
|
|||||||
private:
|
private:
|
||||||
static bool hasPassedProgression(Player* player, ProgressionState state)
|
static bool hasPassedProgression(Player* player, ProgressionState state)
|
||||||
{
|
{
|
||||||
if (progressionLimit && state > progressionLimit)
|
if (progressionLimit && state >= progressionLimit)
|
||||||
return false;
|
return false;
|
||||||
return player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value >= state;
|
return player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value >= state;
|
||||||
}
|
}
|
||||||
static void UpdateProgressionState(Player* player, ProgressionState newState)
|
static void UpdateProgressionState(Player* player, ProgressionState newState)
|
||||||
{
|
{
|
||||||
if (progressionLimit && newState > progressionLimit)
|
if (progressionLimit && newState >= progressionLimit)
|
||||||
return;
|
return;
|
||||||
uint8 currentState = player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value;
|
uint8 currentState = player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value;
|
||||||
if (newState > currentState)
|
if (newState > currentState)
|
||||||
|
|||||||
Reference in New Issue
Block a user