fix: increment LoreFragmentScans Progress when already present (#1022)
Fixes #1021 Reviewed-on: OpenWF/SpaceNinjaServer#1022 Co-authored-by: Sainan <sainan@calamity.inc> Co-committed-by: Sainan <sainan@calamity.inc>
This commit is contained in:
		
							parent
							
								
									8fea608b76
								
							
						
					
					
						commit
						2b8da4af60
					
				@ -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": {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user