fix: additional checks in bounty rewards #1626

Merged
Sainan merged 1 commits from AMelonInsideLemon/SpaceNinjaServer:check-locationTag into main 2025-04-15 06:10:26 -07:00
Contributor

Closes #1623

Closes #1623
AMelonInsideLemon added 1 commit 2025-04-14 09:16:56 -07:00
fix: addotian checks in bounty rewards
All checks were successful
Build / build (pull_request) Successful in 50s
9d0fdd5e36
Closes #1623
Owner

I don't see what this is good for. Plus, this doesn't seem remotely related to the linked issue.

I don't see what this is good for. Plus, this doesn't seem remotely related to the linked issue.
Contributor

I don't see what this is good for. Plus, this doesn't seem remotely related to the linked issue.

I added it to my server and it fixes the issue I had described in #1623.

> I don't see what this is good for. Plus, this doesn't seem remotely related to the linked issue. I added it to my server and it fixes the issue I had described in #1623.
Owner

Well, that's probably because of the && locationTag condition, but the rest of this PR...

Well, that's probably because of the `&& locationTag` condition, but the rest of this PR...
Author
Contributor

Yeah, lets keep
TypeError: Cannot read properties of undefined (reading 'length') while processing /api/missionInventoryUpdate.php request
TypeError: Cannot read properties of undefined (reading '0') while processing /api/missionInventoryUpdate.php request
instead of the more readable error

Yeah, lets keep `TypeError: Cannot read properties of undefined (reading 'length') while processing /api/missionInventoryUpdate.php request` `TypeError: Cannot read properties of undefined (reading '0') while processing /api/missionInventoryUpdate.php request` instead of the more readable error
Sainan reviewed 2025-04-14 10:08:20 -07:00
Sainan reviewed 2025-04-14 11:47:36 -07:00
@ -1000,2 +1000,2 @@
rewardManifests.push(job.rewards);
rotations.push(ExportRewards[job.rewards].length - 1);
if (ExportRewards[job.rewards]) {
rewardManifests.push(job.rewards);
Owner

Sorry, this line just confuses the fuck out of me. Why are you doing rewardManifests.push(job.rewards); when just a few lines earlier you have rewardManifests = [job.rewards]; ? Surely this is not intentional?

Sorry, this line just confuses the fuck out of me. Why are you doing `rewardManifests.push(job.rewards);` when just a few lines earlier you have `rewardManifests = [job.rewards];` ? Surely this is not intentional?
Author
Contributor

When player doesn't fail any bonus objective Q stays true, and if this is last JobStage then we should give additional reward for that JobStage. That why there is push

When player doesn't fail any bonus objective `Q` stays true, and if this is last `JobStage` then we should give `additional` reward for that `JobStage`. That why there is push
Sainan merged commit 43f3917b09 into main 2025-04-15 06:10:26 -07:00
Sainan deleted branch check-locationTag 2025-04-15 06:10:26 -07:00
Sign in to join this conversation.
No description provided.