Fix IndividualProgression chat commands

This commit is contained in:
郑佩茹
2022-09-17 15:02:46 -06:00
parent a6685b0bcb
commit 770cca9f50
3 changed files with 30 additions and 5 deletions

View File

@@ -33,10 +33,10 @@ public:
handler->SendSysMessage("Invalid progression level.");
return false;
}
Player* target = player->GetConnectedPlayer();
if (target)
player = PlayerIdentifier::FromTargetOrSelf(handler);
if (player && player->GetConnectedPlayer())
{
sIndividualProgression->UpdateProgressionState(target, static_cast<ProgressionState>(progressionLevel));
sIndividualProgression->ForceUpdateProgressionState(player->GetConnectedPlayer(), static_cast<ProgressionState>(progressionLevel));
handler->SendSysMessage("Progression state updated successfully");
}
return true;