Skip to content

Commit

Permalink
GH-139 Use fleet missions enum more
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziekon committed May 30, 2022
1 parent bded1a0 commit 33d9017
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fleet2.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@
'isUnionMissionAllowed' => false,
]);

if(in_array(1, $AvailableMissions) && $targetPlanetDetails['id'] > 0)
{
if (
in_array(Flights\Enums\FleetMission::Attack, $AvailableMissions) &&
$targetPlanetDetails['id'] > 0
) {
$SQLResult_CheckACS = doquery(
"SELECT * FROM {{table}} WHERE (`users` LIKE '%|{$_User['id']}|%' OR `owner_id` = {$_User['id']}) AND `end_target_id` = {$targetPlanetDetails['id']} AND `start_time` > UNIX_TIMESTAMP();",
'acs'
Expand All @@ -216,7 +218,7 @@
$ACSData['fleets_count'] += 1;
$ACSList[$ACSData['id']] = "{$ACSData['name']} ({$_Lang['fl_acs_fleets']}: {$ACSData['fleets_count']})";
}
$AvailableMissions[] = 2;
$AvailableMissions[] = Flights\Enums\FleetMission::UnitedAttack;
}
}

Expand Down

0 comments on commit 33d9017

Please sign in to comment.