fix: increment LoreFragmentScans Progress when already present
All checks were successful
Build / build (18) (push) Successful in 1m7s
Build / build (18) (pull_request) Successful in 35s
Build / build (20) (pull_request) Successful in 1m2s
Build / build (20) (push) Successful in 33s
Build / build (22) (push) Successful in 1m2s
Build / build (22) (pull_request) Successful in 1m5s

This commit is contained in:
Sainan 2025-02-25 23:49:24 +01:00
parent a27f1c5e01
commit 966003fe86

View File

@ -176,8 +176,13 @@ export const addMissionInventoryUpdates = (
break;
}
case "LoreFragmentScans":
value.forEach(x => {
inventory.LoreFragmentScans.push(x);
value.forEach(clientFragment => {
const fragment = inventory.LoreFragmentScans.find(x => x.ItemType == clientFragment.ItemType);
if (fragment) {
fragment.Progress += clientFragment.Progress;
} else {
inventory.LoreFragmentScans.push(clientFragment);
}
});
break;
case "SyndicateId": {