src/magic.c
/*
 * Lookup a skill by slot number.
 * Used for object loading.
 */
Lookup a skill by slot number.
Used for object loading.
Lookup a skill by slot number . Used for object loading .
int slot_lookup( int slot )
{
    extern bool fBootDb;
    int sn;
    if ( slot <= 0 )
	return -1;
    for ( sn = 0; sn < MAX_SKILL; sn++ )
    {
	if ( slot == skill_table[sn].slot )
	    return sn;
    }
    if ( fBootDb )
    {
	bug( "Slot_lookup: bad slot %d.", slot );
	abort( );
    }
    return -1;
}
int slot_lookup ( int slot ) { extern bool fBootDb ; int sn ; if ( slot <= 0 ) return -1 ; for ( sn = 0 ; sn < MAX_SKILL ; sn ++ ) { if ( slot == skill_table [ sn ] . slot ) return sn ; } if ( fBootDb ) { bug ( " " , slot ) ; abort ( ) ; } return -1 ; }
Lookup a skill by slot number.
Lookup a skill by slot number .
/*	return 0; Delete this line to re-enable slots -Akira */