Add Random Time 2-20 sec to start new Mission

This commit is contained in:
2019-02-20 03:11:48 +01:00
parent 13bd7cc309
commit 08e65c652e
3 changed files with 8 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
/*Generated on:Wed Feb 20 2019 02:32:57 GMT+0100 (CET)*/
/*Generated on:Wed Feb 20 2019 03:11:48 GMT+0100 (CET)*/
/*
* Dexie.js - a minimalistic wrapper for IndexedDB
* ===============================================
@@ -4589,6 +4589,7 @@ class AutomaticDisposeFaye {
"captionOld": ""
}
*/
let random = Math.floor((Math.random() * 20) + 2);
let missionData = {
"missionID": String(data.id),
"type": String(data.mtid),
@@ -4598,8 +4599,8 @@ class AutomaticDisposeFaye {
"village": data.address.split(',')[1],
"available": 'true',
"done": 'false',
"last_check": Math.floor(new Date().getTime() / 1000),
"next_check": Math.floor(new Date().getTime() / 1000) + 1
"last_check": Math.floor(new Date().getTime() / 1000) + random,
"next_check": Math.floor(new Date().getTime() / 1000) + random + 1
}
if (data.vehicle_state === 0 && (data.missing_text === null || (data.missing_text && data.missing_text.includes('Zusätzlich benötigte Fahrzeuge')))) {
window.AutomaticDisposeCall.AddMissionsToQueue(missionData)