ogamespec / ogame-opensource

This is revived OGame v 0.84 with old design.
Creative Commons Zero v1.0 Universal
87 stars 41 forks source link

ACS Hold limit #122

Closed ogamespec closed 6 months ago

ogamespec commented 6 months ago

Quaua — Сегодня, в 1:52 Hi, I just encountered a new bug regarding holding mission. allows you to send fleets from more than 4 players. (I didn't touch the option in admin that changes this) I've currently made this change and it seems to work fine. in flottenversand.php new line of mission 5 (CanStandHold): if ( CanStandHold ( $target['planet_id'], $origin['owner_id'] ) >= $maxhold_users ) FleetError ("Limite giocatori permessi in stazionamento: $maxhold_users!"); and in fleet.php the function CanStandHold: function CanStandHold ( $planet_id, $player_id ) { global $db_prefix; $query = "SELECT owner_id FROM ".$db_prefix."fleet WHERE (mission = ".FTYP_ACS_HOLD." OR mission = ".(FTYP_ACS_HOLD+FTYP_ORBITING).") AND target_planet = $planet_id;"; $result = dbquery ($query); return dbrows ($result); }

Check.