Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #146 from Qwatayean/patch-3
Browse files Browse the repository at this point in the history
Fix for #141
  • Loading branch information
mys authored Jun 27, 2018
2 parents ed10b47 + bf7d463 commit 5ff828c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions includes/pages/game/ShowOverviewPage.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,20 @@ function delete()
':planetID' => $PLANET['id'],
':lunaID' => $PLANET['id_luna']
), 'state');

if ($USER['b_tech_planet'] == $PLANET['id'] && !empty($USER['b_tech_queue'])) {
$TechQueue = unserialize($USER['b_tech_queue']);
$NewCurrentQueue = array();
foreach($TechQueue as $ID => $ListIDArray) {
if ($ListIDArray[4] == $PLANET['id']) {
$ListIDArray[4] = $USER['id_planet'];
$NewCurrentQueue[] = $ListIDArray;
}
}

$USER['b_tech_planet'] = $USER['id_planet'];
$USER['b_tech_queue'] = serialize($NewCurrentQueue);
}

if ($IfFleets > 0) {
$this->sendJSON(array('message' => $LNG['ov_abandon_planet_not_possible']));
Expand Down

0 comments on commit 5ff828c

Please sign in to comment.