| @@ 1283-1289 (lines=7) @@ | ||
| 1280 | } |
|
| 1281 | ||
| 1282 | return $user[UNIT_PLAYER_COLONIES_MAX]; |
|
| 1283 | } else { |
|
| 1284 | $expeditions = get_player_max_expeditons($user, $astrotech); |
|
| 1285 | // $astrotech = mrc_get_level($user, false, TECH_ASTROTECH); |
|
| 1286 | $colonies = $astrotech - $expeditions; |
|
| 1287 | ||
| 1288 | return classSupernova::$config->player_max_colonies < 0 ? $colonies : min(classSupernova::$config->player_max_colonies, $colonies); |
|
| 1289 | } |
|
| 1290 | } |
|
| 1291 | ||
| 1292 | function get_player_current_colonies(&$user) { |
|
| @@ 242-247 (lines=6) @@ | ||
| 239 | } |
|
| 240 | ||
| 241 | return $this->_dbRow[UNIT_PLAYER_COLONIES_MAX]; |
|
| 242 | } else { |
|
| 243 | $expeditions = get_player_max_expeditons($this->_dbRow, $astrotech); |
|
| 244 | $colonies = $astrotech - $expeditions; |
|
| 245 | ||
| 246 | return classSupernova::$config->player_max_colonies < 0 ? $colonies : min(classSupernova::$config->player_max_colonies, $colonies); |
|
| 247 | } |
|
| 248 | } |
|
| 249 | ||
| 250 | ||