@@ -25,18 +25,24 @@ discard block |
||
| 25 | 25 | $errorlist .= !is_array($fleetarray) ? $lang['fl_no_fleetarray'] : ''; |
| 26 | 26 | |
| 27 | 27 | $errorlist = ''; |
| 28 | - if (!$galaxy || $galaxy > $config->game_maxGalaxy || $galaxy < 1) |
|
| 29 | - $errorlist .= $lang['fl_limit_galaxy']; |
|
| 30 | - if (!$system || $system > $config->game_maxSystem || $system < 1) |
|
| 31 | - $errorlist .= $lang['fl_limit_system']; |
|
| 32 | - if (!$planet || $planet < 1 || ($planet > $config->game_maxPlanet && $target_mission != MT_EXPLORE )) |
|
| 33 | - $errorlist .= $lang['fl_limit_planet']; |
|
| 34 | - if ($planetrow['galaxy'] == $galaxy && $planetrow['system'] == $system && $planetrow['planet'] == $planet && $planetrow['planet_type'] == $planet_type) |
|
| 35 | - $errorlist .= $lang['fl_ownpl_err']; |
|
| 36 | - if (!$planet_type) |
|
| 37 | - $errorlist .= $lang['fl_no_planettype']; |
|
| 38 | - if ($planet_type != PT_PLANET && $planet_type != PT_DEBRIS && $planet_type != PT_MOON) |
|
| 39 | - $errorlist .= $lang['fl_fleet_err_pl']; |
|
| 28 | + if (!$galaxy || $galaxy > $config->game_maxGalaxy || $galaxy < 1) { |
|
| 29 | + $errorlist .= $lang['fl_limit_galaxy']; |
|
| 30 | + } |
|
| 31 | + if (!$system || $system > $config->game_maxSystem || $system < 1) { |
|
| 32 | + $errorlist .= $lang['fl_limit_system']; |
|
| 33 | + } |
|
| 34 | + if (!$planet || $planet < 1 || ($planet > $config->game_maxPlanet && $target_mission != MT_EXPLORE )) { |
|
| 35 | + $errorlist .= $lang['fl_limit_planet']; |
|
| 36 | + } |
|
| 37 | + if ($planetrow['galaxy'] == $galaxy && $planetrow['system'] == $system && $planetrow['planet'] == $planet && $planetrow['planet_type'] == $planet_type) { |
|
| 38 | + $errorlist .= $lang['fl_ownpl_err']; |
|
| 39 | + } |
|
| 40 | + if (!$planet_type) { |
|
| 41 | + $errorlist .= $lang['fl_no_planettype']; |
|
| 42 | + } |
|
| 43 | + if ($planet_type != PT_PLANET && $planet_type != PT_DEBRIS && $planet_type != PT_MOON) { |
|
| 44 | + $errorlist .= $lang['fl_fleet_err_pl']; |
|
| 45 | + } |
|
| 40 | 46 | if (empty($missiontype[$target_mission])) { |
| 41 | 47 | $errorlist .= $lang['fl_bad_mission']; |
| 42 | 48 | } |
@@ -78,29 +84,35 @@ discard block |
||
| 78 | 84 | } |
| 79 | 85 | } else { |
| 80 | 86 | if ($TargetPlanet['id_owner']){ |
| 81 | - if ($target_mission == MT_COLONIZE) |
|
| 82 | - $errorlist .= $lang['fl_colonized']; |
|
| 87 | + if ($target_mission == MT_COLONIZE) { |
|
| 88 | + $errorlist .= $lang['fl_colonized']; |
|
| 89 | + } |
|
| 83 | 90 | |
| 84 | 91 | if ($TargetPlanet['id_owner'] == $planetrow['id_owner']){ |
| 85 | - if ($target_mission == MT_ATTACK) |
|
| 86 | - $errorlist .= $lang['fl_no_self_attack']; |
|
| 87 | - |
|
| 88 | - if ($target_mission == MT_SPY) |
|
| 89 | - $errorlist .= $lang['fl_no_self_spy']; |
|
| 90 | - }else{ |
|
| 91 | - if ($target_mission == MT_RELOCATE) |
|
| 92 | - $errorlist .= $lang['fl_only_stay_at_home']; |
|
| 92 | + if ($target_mission == MT_ATTACK) { |
|
| 93 | + $errorlist .= $lang['fl_no_self_attack']; |
|
| 94 | + } |
|
| 95 | + |
|
| 96 | + if ($target_mission == MT_SPY) { |
|
| 97 | + $errorlist .= $lang['fl_no_self_spy']; |
|
| 98 | + } |
|
| 99 | + } else{ |
|
| 100 | + if ($target_mission == MT_RELOCATE) { |
|
| 101 | + $errorlist .= $lang['fl_only_stay_at_home']; |
|
| 102 | + } |
|
| 93 | 103 | } |
| 94 | - }else{ |
|
| 104 | + } else{ |
|
| 95 | 105 | if ($target_mission < MT_COLONIZE){ |
| 96 | 106 | $errorlist .= $lang['fl_unknow_target']; |
| 97 | - }else{ |
|
| 98 | - if ($target_mission == MT_DESTROY) |
|
| 99 | - $errorlist .= $lang['fl_nomoon']; |
|
| 107 | + } else{ |
|
| 108 | + if ($target_mission == MT_DESTROY) { |
|
| 109 | + $errorlist .= $lang['fl_nomoon']; |
|
| 110 | + } |
|
| 100 | 111 | |
| 101 | 112 | if ($target_mission == MT_RECYCLE){ |
| 102 | - if($TargetPlanet['debris_metal'] + $TargetPlanet['debris_crystal'] == 0) |
|
| 103 | - $errorlist .= $lang['fl_nodebris']; |
|
| 113 | + if($TargetPlanet['debris_metal'] + $TargetPlanet['debris_crystal'] == 0) { |
|
| 114 | + $errorlist .= $lang['fl_nodebris']; |
|
| 115 | + } |
|
| 104 | 116 | } |
| 105 | 117 | } |
| 106 | 118 | } |
@@ -148,8 +160,7 @@ discard block |
||
| 148 | 160 | $aks = DbFleetStatic::dbAcsGetById($fleet_group); |
| 149 | 161 | if (!$aks) { |
| 150 | 162 | $fleet_group = 0; |
| 151 | - } |
|
| 152 | - else |
|
| 163 | + } else |
|
| 153 | 164 | { |
| 154 | 165 | $galaxy = $aks['galaxy']; |
| 155 | 166 | $system = $aks['system']; |