forked from OpenWF/SpaceNinjaServer
		
	feat: handle creditsFee in missionInventoryUpdate (#1431)
Reviewed-on: OpenWF/SpaceNinjaServer#1431 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									d4d887a5a4
								
							
						
					
					
						commit
						cfa9ec775e
					
				@ -28,6 +28,7 @@ import {
 | 
			
		||||
    addRecipes,
 | 
			
		||||
    addShipDecorations,
 | 
			
		||||
    combineInventoryChanges,
 | 
			
		||||
    updateCurrency,
 | 
			
		||||
    updateSyndicate
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { updateQuestKey } from "@/src/services/questService";
 | 
			
		||||
@ -430,6 +431,12 @@ export const addMissionInventoryUpdates = async (
 | 
			
		||||
                }
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
            case "creditsFee": {
 | 
			
		||||
                updateCurrency(inventory, value, false);
 | 
			
		||||
                inventoryChanges.RegularCredits ??= 0;
 | 
			
		||||
                inventoryChanges.RegularCredits -= value;
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
            default:
 | 
			
		||||
                // Equipment XP updates
 | 
			
		||||
                if (equipmentKeys.includes(key as TEquipmentKey)) {
 | 
			
		||||
 | 
			
		||||
@ -116,6 +116,8 @@ export type IMissionInventoryUpdateRequest = {
 | 
			
		||||
    CurrentLoadOutIds?: {
 | 
			
		||||
        LoadOuts?: ILoadOutPresets; // sent when recovered weapons from zanuka capture
 | 
			
		||||
    };
 | 
			
		||||
    wagerTier?: number; // the index
 | 
			
		||||
    creditsFee?: number; // the index
 | 
			
		||||
} & {
 | 
			
		||||
    [K in TEquipmentKey]?: IEquipmentClient[];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user