Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改依赖1.2.x-dev #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

修改依赖1.2.x-dev #1

wants to merge 2 commits into from

Conversation

zhowlay
Copy link

@zhowlay zhowlay commented Nov 2, 2016

can't find 1.1.*@dev, rename 1.2.x-dev

@Divi
Copy link
Member

Divi commented Nov 2, 2016

Where the 1.2.x is needed and why do you renamed the EloGank folder to NEloGank ?

@zhowlay
Copy link
Author

zhowlay commented Nov 10, 2016

Dear Sylvain Lorinet:

  •     I' am so sorry about that.when I clone the
    

    lol-replay-observer-silex,It can't find the *
    "elogank/lol-replay-downloader": "1.1.@dev";Because lol-replay-observer
    depends the "elogank/lol-replay-downloader": "1.1.@dev",and the
    "elogank/lol-replay-downloader": "1.1.
    @dev" is missing,and the
    "elogank/lol-replay-downloader": "dev-master / 1.2.x-dev/1.0.0" is
    offered. I have a question about the chunks.decoded folde's
    chunks,how to decode the binary data? what is it struct?,it records all the
    match's log? I find the code chunk below.but it does't work,I hope you give
    me some advices:*
    /**

    • This method counts how many turrets were destroyed by a team
      *

    • @param ReplayInterface $replay

    • @param string $fileType

    • @param int $fileId

    • @param string $binary
      *

    • @return bool
      */
      protected function onReplayFileDecrypted(ReplayInterface $replay,
      $fileType, $fileId, $binary)
      {
      if (ReplayDownloader::FILETYPE_KEYFRAME == $fileType) {
      echo PHP_EOL; // formatting, don't care

      // Work with hex, easier
      $hex = strtoupper(bin2hex($binary));
      // Search for "Turret_T1" or "Turret_T2" strings
      if (!preg_match_all('/5475727265745F54[31|32]/', $hex,
      

      $matches, PREG_OFFSET_CAPTURE)) {
      echo 'The keyframe #' . $fileId . ' has no turret' .
      PHP_EOL;
      }

      $turrets = [];
      foreach ($matches[0] as $turretId => $match) {
          $turretHex = substr($hex, $match[1]);
      
          // Byte after first 0x00 are meaningless
          $pos = strpos($turretHex, '00');
          if (1 === $pos % 2) {
              ++$pos;
          }
      
          // Convert hex to readable string
          $turretName = hex2bin(substr($turretHex, 0, $pos));
          if (!is_string($turretName)) {
              echo 'The parsing turret method seems to be outdated,
      

      please report an issue' . PHP_EOL;
      }

          // Wrong ?
          if (false === strpos($turretName, 'Turret_T')) {
              continue;
          }
      
          $team = 'blue';
          if (false !== strpos($turretName, 'T2')) {
              $team = 'purple';
          }
      
          $turrets[$team][] = $turretName;
      }
      
      // Count the destroyed turrets
      echo ' - Minute ' . ($fileId - 1) . ' :' . PHP_EOL;
      foreach ($turrets as $teamName => $turretNames) {
          echo '   > The ' . $teamName . ' team has destroyed ';
      
          $opponent = 'blue';
          if ('blue' == $teamName) {
              $opponent = 'purple';
          }
      
          // There are 11 turrets by team
          echo (11 - count($turrets[$opponent])) . ' turret(s)' .
      

      PHP_EOL;
      }

      echo "\t\t\t\t"; // formatting, don't care
      

      }
      }

  • Best regards.*

  •      Titan.Zhou*
    

2016-11-03 4:48 GMT+08:00 Sylvain Lorinet notifications@github.com:

Where the 1.2.x is needed and why do you renamed the EloGank folder to
NEloGank ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AP0jvFdazJAYHXWNBE0nCLZg1xbJQnHkks5q6PcegaJpZM4Km4gx
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants