fix: fill upgrades array with empty strings
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build / build (22) (push) Successful in 34s
				
			
		
			
				
	
				Build / build (18) (pull_request) Successful in 35s
				
			
		
			
				
	
				Build / build (22) (pull_request) Successful in 1m10s
				
			
		
			
				
	
				Build / build (20) (push) Successful in 1m1s
				
			
		
			
				
	
				Build / build (18) (push) Successful in 1m11s
				
			
		
			
				
	
				Build / build (20) (pull_request) Successful in 1m2s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build / build (22) (push) Successful in 34s
				
			Build / build (18) (pull_request) Successful in 35s
				
			Build / build (22) (pull_request) Successful in 1m10s
				
			Build / build (20) (push) Successful in 1m1s
				
			Build / build (18) (push) Successful in 1m11s
				
			Build / build (20) (pull_request) Successful in 1m2s
				
			Otherwise the client will "LogBug: (Invalid UpgradeId)" and may crash/raise an interrupt
This commit is contained in:
		
							parent
							
								
									a27f1c5e01
								
							
						
					
					
						commit
						3baf259289
					
				@ -544,6 +544,9 @@ export const applyDefaultUpgrades = (
 | 
				
			|||||||
        for (const defaultUpgrade of defaultUpgrades) {
 | 
					        for (const defaultUpgrade of defaultUpgrades) {
 | 
				
			||||||
            modsToGive.push({ ItemType: defaultUpgrade.ItemType, ItemCount: 1 });
 | 
					            modsToGive.push({ ItemType: defaultUpgrade.ItemType, ItemCount: 1 });
 | 
				
			||||||
            if (defaultUpgrade.Slot != -1) {
 | 
					            if (defaultUpgrade.Slot != -1) {
 | 
				
			||||||
 | 
					                while (upgrades.length < defaultUpgrade.Slot) {
 | 
				
			||||||
 | 
					                    upgrades.push("");
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                upgrades[defaultUpgrade.Slot] = defaultUpgrade.ItemType;
 | 
					                upgrades[defaultUpgrade.Slot] = defaultUpgrade.ItemType;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user