Fixed some ->save() statements in progression.

This commit is contained in:
Vari
2024-03-06 18:41:04 +01:00
parent a5823b3e0e
commit 34f40d6dbc
2 changed files with 5 additions and 1 deletions

View File

@@ -92,7 +92,7 @@ public function executeChallengeProgressionBatch(ExecuteChallengeProgressionBatc
if($operation['operationName'] === 'complete')
$this->setChallengeAsCompleted($challengeId, $user);
else
$this->addProgressToChallenge($challengeId, round($operation['operationsData']['value']), $user);
$this->addProgressToChallenge($challengeId, round($operation['operationData']['value']), $user);
$processedChallenges[] = $challengeId;
}
}
@@ -126,6 +126,7 @@ protected function setChallengeAsCompleted(string $challengeId, User $user)
$foundChallenge->playerData()->updateExistingPivot($user->playerData()->id, [
'progress' => $foundChallenge->completion_value,
]);
$foundChallenge->save();
return;
}