Issue information

Issue ID
#1772
Status
Confirmed
Severity
Fair
Started
Hercules Elf Bot
Jun 25, 2008 10:53
Last Post
Hercules Elf Bot
Dec 17, 2011 5:25
Confirmation
N/A

Hercules Elf Bot - Jun 25, 2008 10:53

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1772

Hm.
CODE
    for (i = 0; i < map_num; i++)
        if (map[i].m >= 0)
            map_foreachinmap(cleanup_sub, i, BL_ALL);

then
CODE
    //Scan any remaining players (between maps?) to kick them out. [Skotlex]
    iter = mapit_getallusers();
    for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter) )
        map_quit(sd);
    mapit_free(iter);

finally
CODE
    id_db->foreach(id_db,cleanup_db_sub);

static int cleanup_db_sub(DBKey key,void *data,va_list va)
{
    return cleanup_sub((struct block_list*)data, NULL);
}

What's the point of all this juggling when everything is in the id_db and the last line can free everything?