mirror of
https://github.com/Deathgarden-Rebirth/Deathgarden_Rebirth-Rewrite.git
synced 2026-09-14 06:05:25 -05:00
Fixed some ->save() statements in progression.
This commit is contained in:
@@ -152,6 +152,8 @@ public function playerEndOfMatch(PlayerEndOfMatchRequest $request)
|
||||
}
|
||||
}
|
||||
|
||||
$characterData->save();
|
||||
|
||||
foreach ($request->earnedCurrencies as $earnedCurrency) {
|
||||
switch ($earnedCurrency['currencyName']) {
|
||||
case 'CurrencyA':
|
||||
@@ -164,6 +166,7 @@ public function playerEndOfMatch(PlayerEndOfMatchRequest $request)
|
||||
$playerData->currency_c += $earnedCurrency['amount'];
|
||||
}
|
||||
}
|
||||
$playerData->save();
|
||||
|
||||
$this->removeUserFromGame($user, $game);
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user