Skip to content

Commit

Permalink
Save score and buildings statuses correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
kronusme committed Jun 27, 2016
1 parent f6b9ffd commit 0ef7972
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions includes/Mappers/LeagueMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ protected function parseLoadedMatches($leagueLiveMatches)
private function parseScoreboard(&$liveMatch, $scoreboard, $teamSide)
{
$team = $scoreboard->{$teamSide};
$a_game[$teamSide.'_score'] = $team['score'];
$a_game['tower_status_' . $teamSide] = $team['tower_state'];
$a_game['barracks_status_' . $teamSide] = $team['barracks_state'];
$liveMatch->set($teamSide.'_score', $team->score);
$liveMatch->set('tower_status_' . $teamSide, $team->tower_state);
$liveMatch->set('barracks_status_' . $teamSide, $team->barracks_state);
if ($team->players) {
foreach ($team->players->player as $player) {
$liveSlot = new LiveSlot();
Expand All @@ -159,6 +159,7 @@ private function parseScoreboard(&$liveMatch, $scoreboard, $teamSide)
}
}
$liveSlot->setArray((array)$player);
$liveSlot->set('match_id', $liveMatch->get('match_id'));
$liveSlot->set('player_slot', $this->getPlayerSlot($player->player_slot, $teamSide));
$liveMatch->addSlot($liveSlot);
}
Expand Down

0 comments on commit 0ef7972

Please sign in to comment.