|
@@ 101-114 (lines=14) @@
|
| 98 |
|
* @return bool |
| 99 |
|
* fonction qui récupère toutes les construction en cours de la base |
| 100 |
|
*/ |
| 101 |
|
private function getAllConstructionBases() { |
| 102 |
|
$dbc = App::getDb(); |
| 103 |
|
|
| 104 |
|
$query = $dbc->select()->from("_bataille_base")->from("_bataille_batiment") |
| 105 |
|
->where("_bataille_base.ID_identite", "=", Bataille::getIdIdentite(), "AND") |
| 106 |
|
->where("_bataille_batiment.construction", "=", 1, "AND") |
| 107 |
|
->where("_bataille_base.ID_base", "=", "_bataille_batiment.ID_base", "", true)->get(); |
| 108 |
|
|
| 109 |
|
if (count($query) > 0) { |
| 110 |
|
return true; |
| 111 |
|
} |
| 112 |
|
|
| 113 |
|
return false; |
| 114 |
|
} |
| 115 |
|
|
| 116 |
|
/** |
| 117 |
|
* @return bool |
|
@@ 138-151 (lines=14) @@
|
| 135 |
|
* @return bool |
| 136 |
|
* fonction qui récupère toutes les transports en cours de la base |
| 137 |
|
*/ |
| 138 |
|
private static function getAllMarcheBases() { |
| 139 |
|
$dbc = App::getDb(); |
| 140 |
|
|
| 141 |
|
$query = $dbc->select()->from("_bataille_base")->from("_bataille_marche_transport") |
| 142 |
|
->where("_bataille_base.ID_identite", "=", Bataille::getIdIdentite(), "AND") |
| 143 |
|
->where("_bataille_base.ID_base", "=", "_bataille_marche_transport.ID_base", "OR", true)->get() |
| 144 |
|
->where("_bataille_base.ID_base", "=", "_bataille_marche_transport.ID_base_dest", "", true)->get(); |
| 145 |
|
|
| 146 |
|
if (count($query) > 0) { |
| 147 |
|
return true; |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
return false; |
| 151 |
|
} |
| 152 |
|
//-------------------------- END GETTER ----------------------------------------------------------------------------// |
| 153 |
|
|
| 154 |
|
|