OPBE para 1.8

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

    • OPBE para 1.8

      Estoy tratando de añadir opbe a la 1.8 y me esta bloqueando las flotas y me arroja este error

      Source Code

      1. NOTICE: "Undefined offset: 6221"
      2. File: /www/wwwroot/xnovawop.com/includes/classes/missions/functions/GenerateReport.php | Line: 95
      3. URL: https://xnovawop.com/game.php?page=scan | Version: 1.81.git
      4. Stack trace:
      5. #0 /includes/classes/missions/functions/GenerateReport.php(95): errorHandler(8, 'Undefined offse...', '/www/wwwroot/xn...', 95, Array)
      6. #1 /includes/classes/missions/MissionCaseAttack.class.php(356): GenerateReport(Array, Array)
      7. #2 /includes/classes/class.FlyingFleetHandler.php(80): MissionCaseAttack->TargetEvent()
      8. #3 /includes/FleetHandler.php(31): FlyingFleetHandler->run()
      9. #4 /includes/common.php(131): require('/www/wwwroot/xn...')
      10. #5 /game.php(24): require('/www/wwwroot/xn...')
      11. #6 {main}
      Display All

      dejo el php por aqui

      PHP Source Code

      1. <?php
      2. /**
      3. * 2Moons
      4. * by Jan-Otto Kröpke 2009-2016
      5. *
      6. * For the full copyright and license information, please view the LICENSE
      7. *
      8. * @package 2Moons
      9. * @author Jan-Otto Kröpke <slaver7@gmail.com>
      10. * @copyright 2009 Lucky
      11. * @copyright 2016 Jan-Otto Kröpke <slaver7@gmail.com>
      12. * @licence MIT
      13. * @version 1.8.0
      14. * @link https://github.com/jkroepke/2Moons
      15. */
      16. function GenerateReport($combatResult, $reportInfo)
      17. {
      18. $Destroy = array('att' => 0, 'def' => 0);
      19. $DATA = array();
      20. $DATA['mode'] = (int) $reportInfo['moonDestroy'];
      21. $DATA['time'] = $reportInfo['thisFleet']['fleet_start_time'];
      22. $DATA['start'] = array($reportInfo['thisFleet']['fleet_start_galaxy'], $reportInfo['thisFleet']['fleet_start_system'], $reportInfo['thisFleet']['fleet_start_planet'], $reportInfo['thisFleet']['fleet_start_type']);
      23. $DATA['koords'] = array($reportInfo['thisFleet']['fleet_end_galaxy'], $reportInfo['thisFleet']['fleet_end_system'], $reportInfo['thisFleet']['fleet_end_planet'], $reportInfo['thisFleet']['fleet_end_type']);
      24. $DATA['units'] = array($combatResult['unitLost']['attacker'], $combatResult['unitLost']['defender']);
      25. $DATA['debris'] = $reportInfo['debris'];
      26. $DATA['steal'] = $reportInfo['stealResource'];
      27. $DATA['result'] = $combatResult['won'];
      28. $DATA['moon'] = array(
      29. 'moonName' => $reportInfo['moonName'],
      30. 'moonChance' => (int) $reportInfo['moonChance'],
      31. 'moonDestroyChance' => (int) $reportInfo['moonDestroyChance'],
      32. 'moonDestroySuccess' => (int) $reportInfo['moonDestroySuccess'],
      33. 'fleetDestroyChance' => (int) $reportInfo['fleetDestroyChance'],
      34. 'fleetDestroySuccess' => (int) $reportInfo['fleetDestroySuccess']
      35. );
      36. $round_no = 1;
      37. if(isset($reportInfo['additionalInfo']))
      38. {
      39. $DATA['additionalInfo'] = $reportInfo['additionalInfo'];
      40. }
      41. else
      42. {
      43. $DATA['additionalInfo'] = "";
      44. }
      45. foreach($combatResult['rw'][0]['attackers'] as $player)
      46. {
      47. $player['techs'] = getTechsFromArrayForReport($player['player']);
      48. $DATA['players'][$player['player']['id']] = array(
      49. 'name' => $player['player']['username'],
      50. 'koords' => array($player['fleetDetail']['fleet_start_galaxy'], $player['fleetDetail']['fleet_start_system'], $player['fleetDetail']['fleet_start_planet'], $player['fleetDetail']['fleet_start_type']),
      51. 'tech' => array($player['techs'][0], $player['techs'][1], $player['techs'][2]),
      52. );
      53. }
      54. foreach($combatResult['rw'][0]['defenders'] as $player)
      55. {
      56. $player['techs'] = getTechsFromArrayForReport($player['player']);
      57. $DATA['players'][$player['player']['id']] = array(
      58. 'name' => $player['player']['username'],
      59. 'koords' => array($player['fleetDetail']['fleet_start_galaxy'], $player['fleetDetail']['fleet_start_system'], $player['fleetDetail']['fleet_start_planet'], $player['fleetDetail']['fleet_start_type']),
      60. 'tech' => array($player['techs'][0], $player['techs'][1], $player['techs'][2]),
      61. );
      62. }
      63. foreach($combatResult['rw'] as $Round => $RoundInfo)
      64. {
      65. foreach($RoundInfo['attackers'] as $FleetID => $player)
      66. {
      67. $playerData = array('userID' => $player['player']['id'], 'ships' => array());
      68. if(array_sum($player['unit']) == 0) {
      69. $DATA['rounds'][$Round]['attacker'][] = $playerData;
      70. $Destroy['att']++;
      71. continue;
      72. }
      73. foreach($player['unit'] as $ShipID => $Amount)
      74. {
      75. if ($Amount <= 0)
      76. continue;
      77. $farkA = 0;
      78. if($round_no < count($combatResult['rw']) && $round_no <= MAX_ATTACK_ROUNDS ){
      79. $farkA = ($Amount-$combatResult['rw'][$round_no]['attackers'][$FleetID]['unit'][$ShipID]);
      80. }
      81. $ShipInfo = $RoundInfo['infoA'][$FleetID][$ShipID];
      82. $playerData['ships'][$ShipID] = array(
      83. $Amount, $ShipInfo['att'], $ShipInfo['def'], $ShipInfo['shield'], $farkA
      84. );
      85. /*Mod WOA*/
      86. if(isset($RoundInfo['lost_attacker'][$player['player']['id']])){
      87. if(isset($RoundInfo['lost_attacker'][$player['player']['id']][$FleetID]['Ship'][$ShipID]))
      88. $playerData['ships'][$ShipID][] = $RoundInfo['lost_attacker'][$player['player']['id']][$FleetID]['Ship'][$ShipID][0];
      89. else
      90. $playerData['ships'][$ShipID][] = 0;
      91. }else
      92. $playerData['ships'][$ShipID][] = 0;
      93. /*end*/
      94. }
      95. $DATA['rounds'][$Round]['attacker'][] = $playerData;
      96. }
      97. foreach($RoundInfo['defenders'] as $FleetID => $player)
      98. {
      99. $playerData = array('userID' => $player['player']['id'], 'ships' => array());
      100. if(array_sum($player['unit']) == 0) {
      101. $DATA['rounds'][$Round]['defender'][] = $playerData;
      102. $Destroy['def']++;
      103. continue;
      104. }
      105. foreach($player['unit'] as $ShipID => $Amount)
      106. {
      107. if ($Amount <= 0) {
      108. $Destroy['def']++;
      109. continue;
      110. }
      111. $farkD = 0;
      112. if($round_no < count($combatResult['rw']) && $round_no <= MAX_ATTACK_ROUNDS ){
      113. $farkD = ($Amount-$combatResult['rw'][$round_no]['defenders'][$FleetID]['unit'][$ShipID]);
      114. }
      115. $ShipInfo = $RoundInfo['infoD'][$FleetID][$ShipID];
      116. $playerData['ships'][$ShipID] = array(
      117. $Amount, $ShipInfo['att'], $ShipInfo['def'], $ShipInfo['shield'], $farkD
      118. );
      119. /*Mod WOA*/
      120. if(isset($RoundInfo['lost_defender'][$player['player']['id']])){
      121. if(isset($RoundInfo['lost_defender'][$player['player']['id']][$FleetID]['Ship'][$ShipID]))
      122. $playerData['ships'][$ShipID][] = $RoundInfo['lost_defender'][$player['player']['id']][$FleetID]['Ship'][$ShipID][0];
      123. else
      124. $playerData['ships'][$ShipID][] = 0;
      125. }else
      126. $playerData['ships'][$ShipID][] = 0;
      127. /*end*/
      128. }
      129. $DATA['rounds'][$Round]['defender'][] = $playerData;
      130. }
      131. $round_no++;
      132. //if ($Round >= MAX_ATTACK_ROUNDS || $Destroy['att'] == count($RoundInfo['attackers']) || $Destroy['def'] == count($RoundInfo['defenders']))
      133. // break;
      134. if(isset($RoundInfo['attack'], $RoundInfo['attackShield'], $RoundInfo['defense'], $RoundInfo['defShield']))
      135. $DATA['rounds'][$Round]['info'] = array($RoundInfo['attack'], $RoundInfo['attackShield'], $RoundInfo['defense'], $RoundInfo['defShield']);
      136. else
      137. $DATA['rounds'][$Round]['info'] = array(NULL, NULL, NULL, NULL);
      138. }
      139. return $DATA;
      140. }
      Display All