fix verband gefangene
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user