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

Commit

Permalink
Return attack if target planet deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
mys committed Apr 22, 2018
1 parent 03863d1 commit 7e008e8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions includes/classes/missions/MissionCaseAttack.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ function TargetEvent()
':planetId' => $this->_fleet['fleet_end_id']
));

// return fleet if target planet deleted
if($targetPlanet == false)
{
error_log('DEBUG planet does not exist!');
$this->setState(FLEET_RETURN);
$this->SaveFleet();
return;
}

$sql = "SELECT * FROM %%USERS%% WHERE id = :userId;";
$targetUser = $db->selectSingle($sql, array(
':userId' => $targetPlanet['id_owner']
Expand Down

0 comments on commit 7e008e8

Please sign in to comment.