Corrige le retour des flottes

This commit is contained in:
Nigel Sheldon 2021-02-26 18:44:43 +01:00
parent ea3860f79d
commit 067b45bdfd

View File

@ -28,16 +28,18 @@ if (!defined('INDEX')) {
if ($flotteN->mission == '6') { if ($flotteN->mission == '6') {
erreur('Votre flotte est déjà en train de revenir !', 'red', '?p=flotte&n='.$idN, 1500); erreur('Votre flotte est déjà en train de revenir !', 'red', '?p=flotte&n='.$idN, 1500);
} elseif ($flotteN->end_time > $tpsDD) { } elseif ($flotteN->end_time > $tpsDD) {
$bdd->query("UPDATE $table_flottes SET mission = '6', effectue = '1', end_time = $tpsDD, end_galaxie = start_galaxie, end_ss = start_ss, end_position = start_position WHERE id_user = ".$planete->id_user." AND id = $idN;"); $bdd = new BDD();
$bdd->query("UPDATE $table_flottes SET mission = '6', end_time = $tpsDD, end_planete = start_planete WHERE id_user = ".$planete->id_user." AND id = $idN;");
$bdd->deconnexion();
redirection("?p=flotte&n=".$idN); redirection("?p=flotte&n=".$idN);
} else { } else {
erreur('Impossible d\'annuler la mission, elle a déjà commencée.', "red", '?p=flotte&n='.$idN, 1500); erreur('Impossible d\'annuler la mission, elle a déjà commencée.', "red", '?p=flotte&n='.$idN, 1500);
} }
} }
$SESS->values['ret_fleet'] = md5('HB.fleet_'.rand().'☺ß☻'); $SESS->values['ret_fleet'] = md5('HB.fleet_'.rand().'☺ß☻');
$SESS->put(); $SESS->put();
$template->assign('ret_fleet', $SESS->values['ret_fleet']); $template->assign('ret_fleet', $SESS->values['ret_fleet']);
$template->assign('flotte', $flotteN); $template->assign('flotte', $flotteN);
$page = 'flotten'; $page = 'flotten';