chore: don't add 'alwaysAvailable' skins with unlockAllSkins (#2843)
Reviewed-on: #2843 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
							
								
									e67ef63b77
								
							
						
					
					
						commit
						1ecf53c96b
					
				@ -335,9 +335,9 @@ export const getInventoryResponse = async (
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (config.unlockAllSkins) {
 | 
					    if (config.unlockAllSkins) {
 | 
				
			||||||
        const missingWeaponSkins = new Set(Object.keys(ExportCustoms));
 | 
					        const ownedWeaponSkins = new Set<string>(inventoryResponse.WeaponSkins.map(x => x.ItemType));
 | 
				
			||||||
        inventoryResponse.WeaponSkins.forEach(x => missingWeaponSkins.delete(x.ItemType));
 | 
					        for (const [uniqueName, meta] of Object.entries(ExportCustoms)) {
 | 
				
			||||||
        for (const uniqueName of missingWeaponSkins) {
 | 
					            if (!meta.alwaysAvailable && !ownedWeaponSkins.has(uniqueName)) {
 | 
				
			||||||
                inventoryResponse.WeaponSkins.push({
 | 
					                inventoryResponse.WeaponSkins.push({
 | 
				
			||||||
                    ItemId: {
 | 
					                    ItemId: {
 | 
				
			||||||
                        $oid: "ca70ca70ca70ca70" + catBreadHash(uniqueName).toString(16).padStart(8, "0")
 | 
					                        $oid: "ca70ca70ca70ca70" + catBreadHash(uniqueName).toString(16).padStart(8, "0")
 | 
				
			||||||
@ -346,6 +346,7 @@ export const getInventoryResponse = async (
 | 
				
			|||||||
                });
 | 
					                });
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (typeof config.spoofMasteryRank === "number" && config.spoofMasteryRank >= 0) {
 | 
					    if (typeof config.spoofMasteryRank === "number" && config.spoofMasteryRank >= 0) {
 | 
				
			||||||
        inventoryResponse.PlayerLevel = config.spoofMasteryRank;
 | 
					        inventoryResponse.PlayerLevel = config.spoofMasteryRank;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user