diff --git a/dist/autoloader.js b/dist/autoloader.js index 55c385b..09e7787 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -1,4 +1,4 @@ -/*Generated on:Mon Feb 18 2019 21:47:15 GMT+0100 (CET)*/ +/*Generated on:Tue Feb 19 2019 00:29:30 GMT+0100 (CET)*/ var AutomaticDispose_Branch = "master"; var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/"; var da_lss_adis_time = new Date().getTime(); diff --git a/dist/autoloaderV2.js b/dist/autoloaderV2.js index c2f6ff1..3e58367 100644 --- a/dist/autoloaderV2.js +++ b/dist/autoloaderV2.js @@ -1,4 +1,4 @@ -/*Generated on:Mon Feb 18 2019 21:47:15 GMT+0100 (CET)*/ +/*Generated on:Tue Feb 19 2019 00:29:30 GMT+0100 (CET)*/ /* * Dexie.js - a minimalistic wrapper for IndexedDB * =============================================== @@ -18431,7 +18431,9 @@ Check_Call_Police_Active() { let self = this; - if (($('#h2_prisoners').length > 0 || $('img.patientPrisonerIcon').length > 0) && !self.includesString($('#missionH1').text(),'[verband]')) { + if (($('#h2_prisoners').length > 0 || $('img.patientPrisonerIcon').length > 0) /*&& !self.includesString($('#missionH1').text(),'[verband]')*/) { + //TODO: check if Verband or Event and + // Maybe done with //__FIXX__20192 self.Collect_Jails(); } else { let MissionID = document.location.pathname.substr(document.location.pathname.lastIndexOf("/") + 1); @@ -18455,6 +18457,8 @@ // Gefängnis auswählen Collect_Jails() { + // TODO: hardening the processing for verband/event missions + // Maybe done with the //__FIXX__20192 let self = this; self.Jails = []; var CountGefangene = Number(parseInt($('#h2_prisoners').text())); @@ -18603,12 +18607,19 @@ self.Send_Vehicle_To_Jail() } else { $("#mission_vehicle_driving tbody, #mission_vehicle_at_mission tbody").find("tr").each((_, elem) => { - var CalledVehicleID = parseInt($(elem).find("a").first().attr("vehicle_type_id")); - if (CalledVehicleID == 52) { - CountGefangene -= 5; - } else if (CalledVehicleID == 32) { - CountGefangene -= 1; + //__FIXX__20192 + let me = $(elem).find('td:nth-child(5) > a:contains("Jomaar")').length; + if (me > 0) { + //__FIXX__20192 + var CalledVehicleID = parseInt($(elem).find("a").first().attr("vehicle_type_id")); + if (CalledVehicleID == 52) { + CountGefangene -= 5; + } else if (CalledVehicleID == 32) { + CountGefangene -= 1; + } + //__FIXX__20192 } + //__FIXX__20192 }); if ($('#vehicle_show_table_all tr[vehicle_type="GefKw"] input[type="checkbox"]').length > 0 && CountGefangene >= 5) { diff --git a/src/autoloaderV2.js b/src/autoloaderV2.js index 65a2a0b..df46be5 100644 --- a/src/autoloaderV2.js +++ b/src/autoloaderV2.js @@ -632,7 +632,9 @@ Check_Call_Police_Active() { let self = this; - if (($('#h2_prisoners').length > 0 || $('img.patientPrisonerIcon').length > 0) && !self.includesString($('#missionH1').text(),'[verband]')) { + if (($('#h2_prisoners').length > 0 || $('img.patientPrisonerIcon').length > 0) /*&& !self.includesString($('#missionH1').text(),'[verband]')*/) { + //TODO: check if Verband or Event and + // Maybe done with //__FIXX__20192 self.Collect_Jails(); } else { let MissionID = document.location.pathname.substr(document.location.pathname.lastIndexOf("/") + 1); @@ -656,6 +658,8 @@ // Gefängnis auswählen Collect_Jails() { + // TODO: hardening the processing for verband/event missions + // Maybe done with the //__FIXX__20192 let self = this; self.Jails = []; var CountGefangene = Number(parseInt($('#h2_prisoners').text())); @@ -804,12 +808,19 @@ self.Send_Vehicle_To_Jail() } else { $("#mission_vehicle_driving tbody, #mission_vehicle_at_mission tbody").find("tr").each((_, elem) => { - var CalledVehicleID = parseInt($(elem).find("a").first().attr("vehicle_type_id")); - if (CalledVehicleID == 52) { - CountGefangene -= 5; - } else if (CalledVehicleID == 32) { - CountGefangene -= 1; + //__FIXX__20192 + let me = $(elem).find('td:nth-child(5) > a:contains("Jomaar")').length; + if (me > 0) { + //__FIXX__20192 + var CalledVehicleID = parseInt($(elem).find("a").first().attr("vehicle_type_id")); + if (CalledVehicleID == 52) { + CountGefangene -= 5; + } else if (CalledVehicleID == 32) { + CountGefangene -= 1; + } + //__FIXX__20192 } + //__FIXX__20192 }); if ($('#vehicle_show_table_all tr[vehicle_type="GefKw"] input[type="checkbox"]').length > 0 && CountGefangene >= 5) {