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,7 +28,9 @@ if (!defined('INDEX')) {
if ($flotteN->mission == '6') {
erreur('Votre flotte est déjà en train de revenir !', 'red', '?p=flotte&n='.$idN, 1500);
} 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);
} else {
erreur('Impossible d\'annuler la mission, elle a déjà commencée.', "red", '?p=flotte&n='.$idN, 1500);