This commit is contained in:
wangwei01 2019-05-09 17:22:00 +08:00
parent 0e41597841
commit 8a2d1f8804
3 changed files with 26 additions and 26 deletions

@ -1 +1 @@
Subproject commit 4fa9d00842f4fd2fb2c0b3c82bfdaa4f7ac6a602
Subproject commit 914355e0f3d6ca491b299489adf475f93d211389

View File

@ -44,10 +44,10 @@ class RankController{
}
array_push($kill_list, array(
'account_id' => $row['accountid'],
'kill' => $row['kills'] / $row['game_times'],
'alive'=> $row['alive_time'] / $row['game_times'],
'harm' => $row['harm'] / $row['game_times'],
'win_rate' => $row['win_times'] / $row['game_times'],
'kill' => phpcommon\safeDiv($row['kills'], $row['game_times']),
'alive'=> phpcommon\safeDiv($row['alive_time'], $row['game_times']),
'harm' => phpcommon\safeDiv($row['harm'], $row['game_times']),
'win_rate' => phpcommon\safeDiv($row['win_times'], $row['game_times']),
'win_game' => $row['win_times']
));
$i++;
@ -64,10 +64,10 @@ class RankController{
}
array_push($alive_list, array(
'account_id' => $row['accountid'],
'kill' => $row['kills'] / $row['game_times'],
'alive'=> $row['alive_time'] / $row['game_times'],
'harm' => $row['harm'] / $row['game_times'],
'win_rate' => $row['win_times'] / $row['game_times'],
'kill' => phpcommon\safeDiv($row['kills'], $row['game_times']),
'alive'=> phpcommon\safeDiv($row['alive_time'], $row['game_times']),
'harm' => phpcommon\safeDiv($row['harm'], $row['game_times']),
'win_rate' => phpcommon\safeDiv($row['win_times'], $row['game_times']),
'win_game' => $row['win_times']
));
$i++;
@ -84,10 +84,10 @@ class RankController{
}
array_push($harm_list, array(
'account_id' => $row['accountid'],
'kill' => $row['kills'] / $row['game_times'],
'alive'=> $row['alive_time'] / $row['game_times'],
'harm' => $row['harm'] / $row['game_times'],
'win_rate' => $row['win_times'] / $row['game_times'],
'kill' => phpcommon\safeDiv($row['kills'], $row['game_times']),
'alive'=> phpcommon\safeDiv($row['alive_time'], $row['game_times']),
'harm' => phpcommon\safeDiv($row['harm'], $row['game_times']),
'win_rate' => phpcommon\safeDiv($row['win_times'], $row['game_times']),
'win_game' => $row['win_times']
));
$i++;
@ -104,10 +104,10 @@ class RankController{
}
array_push($rate_list, array(
'account_id' => $row['accountid'],
'kill' => $row['kills'] / $row['game_times'],
'alive'=> $row['alive_time'] / $row['game_times'],
'harm' => $row['harm'] / $row['game_times'],
'win_rate' => $row['win_times'] / $row['game_times'],
'kill' => phpcommon\safeDiv($row['kills'], $row['game_times']),
'alive'=> phpcommon\safeDiv($row['alive_time'], $row['game_times']),
'harm' => phpcommon\safeDiv($row['harm'], $row['game_times']),
'win_rate' => phpcommon\safeDiv($row['win_times'], $row['game_times']),
'win_game' => $row['win_times']
));
$i++;
@ -124,10 +124,10 @@ class RankController{
}
array_push($win_list, array(
'account_id' => $row['accountid'],
'kill' => $row['kills'] / $row['game_times'],
'alive'=> $row['alive_time'] / $row['game_times'],
'harm' => $row['harm'] / $row['game_times'],
'win_rate' => $row['win_times'] / $row['game_times'],
'kill' => phpcommon\safeDiv($row['kills'], $row['game_times']),
'alive'=> phpcommon\safeDiv($row['alive_time'], $row['game_times']),
'harm' => phpcommon\safeDiv($row['harm'], $row['game_times']),
'win_rate' => phpcommon\safeDiv($row['win_times'], $row['game_times']),
'win_game' => $row['win_times']
));