fix(contracts): auto-credit kill objectives in client-hosted raids
Build & Deploy / build (push) Successful in 21s
Build & Deploy / build (push) Successful in 21s
Kill-type contract objectives were never persisted: the client-hosted raid has no dedicated game server to report per-kill progress, so creature kills stayed at 0 and contracts reported "no kills" at claim. - EnterMatchmakingMatch: auto-credit Kills objectives to MaxProgress on deploy (mirrors the item-ownership pre-compute already done there and the player-kill auto-credit in ActivateContract). - ClaimActiveContract: treat Kills objectives as met as a safety net for contracts activated before deploy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -61,6 +61,14 @@ public class EnterMatchmakingMatchFunction : ICloudScriptFunction<FYEnterMatchAz
|
||||
}
|
||||
for (var i = 0; i < contract.Objectives.Length; i++) {
|
||||
var objective = contract.Objectives[i];
|
||||
// Kill objectives: the client-hosted raid has no dedicated game server
|
||||
// to report per-kill progress to the backend, so kills would never be
|
||||
// saved. Auto-credit them on deploy so the objective can be completed
|
||||
// (mirrors the player-kill auto-credit done in ActivateContract).
|
||||
if (objective.Type == EYContractObjectiveType.Kills) {
|
||||
contractActive.Progress[i] = objective.MaxProgress;
|
||||
continue;
|
||||
}
|
||||
if (objective.Type != EYContractObjectiveType.OwnNumOfItem) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user