Exemplo n.º 1
0
 /**
  * считает кол-во очков по драфту игроков
  * @param $fantasy array
  * @param $rates array
  */
 private static function calculateScoresInPlayersDraft($fantasy, $rates)
 {
     $DotaDraft = new DotaDraft();
     $draft_ids = [];
     foreach ($rates as $rate) {
         $draft_ids[] = $rate['draft_id'];
     }
     $draft_info = DotaDraftPlayer::getDraftsInfo($draft_ids);
     //echo'<pre>';print_r($fantasy);echo'</pre>';//die;
     //echo'<pre>';print_r($draft_info);echo'</pre>';//die;
     foreach ($draft_info as $draft_id => $account_ids) {
         $DotaDraft->setScoresForPlayersDraft($draft_id, $fantasy['event_id'], $account_ids);
     }
     //die;
 }