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