Skip to content

Commit

Permalink
Fix invalid game_player::load_data overload
Browse files Browse the repository at this point in the history
  • Loading branch information
lluchs committed Dec 28, 2021
1 parent f9c0dff commit 4a3690c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/game.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,7 @@ function get_players()
foreach($a AS $p)
{
$player = new game_player();
$player->load_data($p['player_id'], $this->data['id']);
$player->load_player_data($p['player_id'], $this->data['id']);
$players[] = $player;
}
}
Expand Down Expand Up @@ -1471,7 +1471,7 @@ function get_and_update_players_from_game_reference()

}

if($player->load_data($p['ID'],$this->data['id']))
if($player->load_player_data($p['ID'],$this->data['id']))
{ //is a league-game:

//if game-Status is running and the State is not Joined, remove:
Expand Down
2 changes: 1 addition & 1 deletion lib/game_player.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function __construct()
}

//params: player_id, game_id
function load_data($player_id, $game_id)
function load_player_data($player_id, $game_id)
{
//load player-data
global $database;
Expand Down
4 changes: 2 additions & 2 deletions lib/game_team.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function load_players()
foreach($a AS $p)
{
$player = new game_player();
$player->load_data($p['player_id'],$this->data['game_id']);
$player->load_player_data($p['player_id'],$this->data['game_id']);
$players[] = $player;
}
}
Expand Down Expand Up @@ -133,4 +133,4 @@ function get_player_count()

}

?>
?>
2 changes: 1 addition & 1 deletion lib/league_backend.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ function join(&$game_reference)
$game->insert_score_data_into_join_response($response->data['[Response]'][0], $game_reference->data['[PlrInfo]'][0]['ID']);

$game_player = new game_player();
$game_player->load_data($game_reference->data['[PlrInfo]'][0]['ID'], $game->data['id']);
$game_player->load_player_data($game_reference->data['[PlrInfo]'][0]['ID'], $game->data['id']);
$response->data['[Response]'][0]['Account'] = $game_player->data['name'];
if($clan_tag = $game_player->get_clan_tag())
$response->data['[Response]'][0]['ClanTag'] = $clan_tag;
Expand Down

0 comments on commit 4a3690c

Please sign in to comment.