[BUG] fix bug with consuption ajax fleet

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [BUG] fix bug with consuption ajax fleet

      @kolopik found that bug
      when u sending recycle misson from the galaxy they dont consume fuel

      how to fix that in >= 1.8 ver.

      Display Spoiler

      in ShowFleetAjaxPage.class.php

      change

      PHP Source Code

      1. FleetFunctions::sendFleet($fleetArray, $targetMission, $USER['id'], $PLANET['id'], $PLANET['galaxy'],
      2. $PLANET['system'], $PLANET['planet'], $PLANET['planet_type'], $targetData['id_owner'], $planetID,
      3. $targetData['galaxy'], $targetData['system'], $targetData['planet'], $targetData['planet_type'],
      4. $fleetResource, $fleetStartTime, $fleetStayTime, $fleetEndTime, 0, 0);



      to

      PHP Source Code

      1. FleetFunctions::sendFleet($fleetArray, $targetMission, $USER['id'], $PLANET['id'], $PLANET['galaxy'],
      2. $PLANET['system'], $PLANET['planet'], $PLANET['planet_type'], $targetData['id_owner'], $planetID,
      3. $targetData['galaxy'], $targetData['system'], $targetData['planet'], $targetData['planet_type'],
      4. $fleetResource, $fleetStartTime, $fleetStayTime, $fleetEndTime, 0, 0, $consumption);


      in class.FleetFunctions.php
      change

      PHP Source Code

      1. public static function sendFleet($fleetArray, $fleetMission, $fleetStartOwner, $fleetStartPlanetID,
      2. $fleetStartPlanetGalaxy, $fleetStartPlanetSystem, $fleetStartPlanetPlanet, $fleetStartPlanetType,
      3. $fleetTargetOwner, $fleetTargetPlanetID, $fleetTargetPlanetGalaxy, $fleetTargetPlanetSystem,
      4. $fleetTargetPlanetPlanet, $fleetTargetPlanetType, $fleetResource, $fleetStartTime, $fleetStayTime,
      5. $fleetEndTime, $fleetGroup = 0, $missileTarget = 0)
      to


      PHP Source Code

      1. public static function sendFleet($fleetArray, $fleetMission, $fleetStartOwner, $fleetStartPlanetID,
      2. $fleetStartPlanetGalaxy, $fleetStartPlanetSystem, $fleetStartPlanetPlanet, $fleetStartPlanetType,
      3. $fleetTargetOwner, $fleetTargetPlanetID, $fleetTargetPlanetGalaxy, $fleetTargetPlanetSystem,
      4. $fleetTargetPlanetPlanet, $fleetTargetPlanetType, $fleetResource, $fleetStartTime, $fleetStayTime,
      5. $fleetEndTime, $fleetGroup = 0, $missileTarget = 0, $consumption = 0)
      after


      PHP Source Code

      1. foreach($fleetArray as $ShipID => $ShipCount) {
      2. $fleetData[] = $ShipID.','.floatToString($ShipCount);
      3. $planetQuery[] = $resource[$ShipID]." = ".$resource[$ShipID]." - :".$resource[$ShipID];
      4. $params[':'.$resource[$ShipID]] = floatToString($ShipCount);
      5. }
      add

      PHP Source Code

      1. if($consumption > 0){
      2. $planetQuery[] = $resource[903]." = ".$resource[903]." - :".$resource[903];
      3. $params[':'.$resource[903]] = $consumption;
      4. }

    • Kaizoku wrote:

      @kolopik found that bug
      when u sending recycle misson from the galaxy they dont consume fuel

      how to fix that in >= 1.8 ver.

      Display Spoiler

      in ShowFleetAjaxPage.class.php

      change

      PHP Source Code

      1. FleetFunctions::sendFleet($fleetArray, $targetMission, $USER['id'], $PLANET['id'], $PLANET['galaxy'],
      2. $PLANET['system'], $PLANET['planet'], $PLANET['planet_type'], $targetData['id_owner'], $planetID,
      3. $targetData['galaxy'], $targetData['system'], $targetData['planet'], $targetData['planet_type'],
      4. $fleetResource, $fleetStartTime, $fleetStayTime, $fleetEndTime, 0, 0);


      to

      PHP Source Code

      1. FleetFunctions::sendFleet($fleetArray, $targetMission, $USER['id'], $PLANET['id'], $PLANET['galaxy'],
      2. $PLANET['system'], $PLANET['planet'], $PLANET['planet_type'], $targetData['id_owner'], $planetID,
      3. $targetData['galaxy'], $targetData['system'], $targetData['planet'], $targetData['planet_type'],
      4. $fleetResource, $fleetStartTime, $fleetStayTime, $fleetEndTime, 0, 0, $consumption);

      in class.FleetFunctions.php
      change

      PHP Source Code

      1. public static function sendFleet($fleetArray, $fleetMission, $fleetStartOwner, $fleetStartPlanetID,
      2. $fleetStartPlanetGalaxy, $fleetStartPlanetSystem, $fleetStartPlanetPlanet, $fleetStartPlanetType,
      3. $fleetTargetOwner, $fleetTargetPlanetID, $fleetTargetPlanetGalaxy, $fleetTargetPlanetSystem,
      4. $fleetTargetPlanetPlanet, $fleetTargetPlanetType, $fleetResource, $fleetStartTime, $fleetStayTime,
      5. $fleetEndTime, $fleetGroup = 0, $missileTarget = 0)
      to


      PHP Source Code

      1. public static function sendFleet($fleetArray, $fleetMission, $fleetStartOwner, $fleetStartPlanetID,
      2. $fleetStartPlanetGalaxy, $fleetStartPlanetSystem, $fleetStartPlanetPlanet, $fleetStartPlanetType,
      3. $fleetTargetOwner, $fleetTargetPlanetID, $fleetTargetPlanetGalaxy, $fleetTargetPlanetSystem,
      4. $fleetTargetPlanetPlanet, $fleetTargetPlanetType, $fleetResource, $fleetStartTime, $fleetStayTime,
      5. $fleetEndTime, $fleetGroup = 0, $missileTarget = 0, $consumption = 0)
      after


      PHP Source Code

      1. foreach($fleetArray as $ShipID => $ShipCount) {
      2. $fleetData[] = $ShipID.','.floatToString($ShipCount);
      3. $planetQuery[] = $resource[$ShipID]." = ".$resource[$ShipID]." - :".$resource[$ShipID];
      4. $params[':'.$resource[$ShipID]] = floatToString($ShipCount);
      5. }
      add

      PHP Source Code

      1. if($consumption > 0){
      2. $planetQuery[] = $resource[903]." = ".$resource[903]." - :".$resource[903];
      3. $params[':'.$resource[903]] = $consumption;
      4. }

      Another sendFleet called class bug. None remove send fleet after planet fleet amounts.