Adjusted season history for multiple tables.

This commit is contained in:
gyboth 2008-11-23 12:05:46 +00:00
parent c48a361342
commit f433683ec9
1 changed files with 10 additions and 7 deletions

View File

@ -178,19 +178,22 @@ stat_season_stat_new(gint season_number)
void
stat_create_season_stat(void)
{
gint i;
gint i, j;
SeasonStat new = stat_season_stat_new(season);
ChampStat new_champ;
for(i=0;i<ligs->len;i++)
{
new_champ.cl_name = g_strdup(lig(i).name);
new_champ.team_name =
g_strdup(g_array_index(league_table((&lig(i)))->elements, TableElement, 0).team->name);
g_array_append_val(new.league_champs, new_champ);
for(j = 0; j < lig(i).tables->len; j++)
{
new_champ.cl_name = g_strdup(g_array_index(lig(i).tables, Table, j).name);
new_champ.team_name =
g_strdup(g_array_index(g_array_index(lig(i).tables, Table, j).elements, TableElement, 0).team->name);
g_array_append_val(new.league_champs, new_champ);
}
g_array_append_val(new.league_stats, lig(i).stats);
lig(i).stats = stat_league_new(lig(i).name, lig(i).symbol);
g_array_append_val(new.league_stats, lig(i).stats);
lig(i).stats = stat_league_new(lig(i).name, lig(i).symbol);
}
for(i=0;i<acps->len;i++)