Closed byazrail closed 5 years ago
MissionCaseAttack.
moon attack type debris field not possible merge type.
https://github.com/HikeGame/2moons-2.0/blob/master/includes/classes/missions/MissionCaseAttack.class.php#L330
330 lines.
if($this->_fleet['fleet_end_type'] == 3) { // Use planet debris, if attack on moons $sql= "SELECT der_metal, der_crystal FROM %%PLANETS%% WHERE id_luna = :moonId;"; $targetDebris= $db->selectSingle($sql, array( ':moonId' => $this->_fleet['fleet_end_id'] )); $targetPlanet['der_metal']= $targetDebris['der_metal']; $targetPlanet['der_crystal'] = $targetDebris['der_crystal']; }
The code via the issue is not correct because it will multiply the debris
MissionCaseDestruction
https://github.com/HikeGame/2moons-2.0/blob/master/includes/classes/missions/MissionCaseDestruction.class.php#L322
332 lines.
if($this->_fleet['fleet_end_type'] == 3) { // Use planet debris, if attack on moons $sql= "SELECT der_metal, der_crystal FROM %%PLANETS%% WHERE id_luna = :moonId;"; $targetDebris= $db->selectSingle($sql, array( ':moonId' => $this->_fleet['fleet_end_id'] )); $targetPlanet['der_metal']= $targetDebris['der_metal']; $targetPlanet['der_crystal'] = $targetDebris['der_crystal']; }
Not multiply removed first comment.
Hi, Reference bug on forum; https://2moons.de/index.php?thread/750-debris-bug/