monday
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build / build (20) (push) Successful in 1m7s
				
			
		
			
				
	
				Build / build (22) (push) Successful in 38s
				
			
		
			
				
	
				Build / build (18) (push) Successful in 1m29s
				
			
		
			
				
	
				Build / build (20) (pull_request) Successful in 37s
				
			
		
			
				
	
				Build / build (18) (pull_request) Successful in 1m8s
				
			
		
			
				
	
				Build / build (22) (pull_request) Successful in 1m18s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build / build (20) (push) Successful in 1m7s
				
			Build / build (22) (push) Successful in 38s
				
			Build / build (18) (push) Successful in 1m29s
				
			Build / build (20) (pull_request) Successful in 37s
				
			Build / build (18) (pull_request) Successful in 1m8s
				
			Build / build (22) (pull_request) Successful in 1m18s
				
			This commit is contained in:
		
							parent
							
								
									4e011e1ed4
								
							
						
					
					
						commit
						18062b5d91
					
				@ -13,10 +13,13 @@ export const entratiLabConquestModeController: RequestHandler = async (req, res)
 | 
			
		||||
    const body = getJSONfromString<IEntratiLabConquestModeRequest>(String(req.body));
 | 
			
		||||
    if (body.BuyMode) {
 | 
			
		||||
        if (!inventory.EntratiVaultCountResetDate || Date.now() >= inventory.EntratiVaultCountResetDate.getTime()) {
 | 
			
		||||
            const thisWeek = Math.trunc(Date.now() / 604800000) * 604800000;
 | 
			
		||||
            const nextWeek = thisWeek + 604800000;
 | 
			
		||||
            const EPOCH = 1734307200 * 1000; // Mondays, amirite?
 | 
			
		||||
            const day = Math.trunc((Date.now() - EPOCH) / 86400000);
 | 
			
		||||
            const week = Math.trunc(day / 7);
 | 
			
		||||
            const weekStart = EPOCH + week * 604800000;
 | 
			
		||||
            const weekEnd = weekStart + 604800000;
 | 
			
		||||
            inventory.EntratiVaultCountLastPeriod = 0;
 | 
			
		||||
            inventory.EntratiVaultCountResetDate = new Date(nextWeek);
 | 
			
		||||
            inventory.EntratiVaultCountResetDate = new Date(weekEnd);
 | 
			
		||||
            if (inventory.EntratiLabConquestUnlocked) {
 | 
			
		||||
                inventory.EntratiLabConquestUnlocked = 0;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user