| @@ 118-129 (lines=12) @@ | ||
| 115 | ||
| 116 | $niveau = $this->getNiveauBatiment($nom_batiment, Bataille::getIdBase()); |
|
| 117 | ||
| 118 | if ($niveau > 0) { |
|
| 119 | $query = $dbc1->select("production")->from("$nom_batiment")->where("ID_".$nom_batiment, "=", $niveau)->get(); |
|
| 120 | ||
| 121 | if ((is_array($query)) && (count($query) > 0)) { |
|
| 122 | foreach ($query as $obj) { |
|
| 123 | return $obj->production; |
|
| 124 | } |
|
| 125 | } |
|
| 126 | } |
|
| 127 | else { |
|
| 128 | return 20; |
|
| 129 | } |
|
| 130 | } |
|
| 131 | ||
| 132 | /** |
|
| @@ 141-152 (lines=12) @@ | ||
| 138 | ||
| 139 | $niveau = $this->getNiveauBatiment($batiment, Bataille::getIdBase()); |
|
| 140 | ||
| 141 | if ($niveau > 0) { |
|
| 142 | $query = $dbc1->select("stockage")->from($batiment)->where("ID_".$batiment, "=", $niveau)->get(); |
|
| 143 | ||
| 144 | if ((is_array($query)) && (count($query) > 0)) { |
|
| 145 | foreach ($query as $obj) { |
|
| 146 | return $obj->stockage; |
|
| 147 | } |
|
| 148 | } |
|
| 149 | } |
|
| 150 | else { |
|
| 151 | return 1000; |
|
| 152 | } |
|
| 153 | } |
|
| 154 | ||
| 155 | /** |
|