Alright I have added a new skill type, and I am kinda lost on how to do the fread for it...
thats for just a normal skill, so... what I am lost at is... what I might have to change for the new skill type.
if( !strcmp( word, "Skill" ) )
{
int sn;
int value;
if( preload )
word = "End";
else
{
value = fread_number( fp );
if( file_ver < 3 )
sn = skill_lookup( fread_word( fp ) );
else
sn = bsearch_skill_exact( fread_word( fp ), gsn_first_skill, gsn_first_weapon - 1 );
if( sn < 0 )
bug( "%s", "Fread_char: unknown skill." );
else
{
ch->pcdata->learned[sn] = value;
/*
* Take care of people who have stuff they shouldn't *
* * Assumes class and level were loaded before. -- Altrag *
* * Assumes practices are loaded first too now. -- Altrag
*/
if( ch->level < LEVEL_IMMORTAL )
{
if( skill_table[sn]->skill_level[ch->Class] >= LEVEL_IMMORTAL )
{
ch->pcdata->learned[sn] = 0;
ch->practice++;
}
}
}
fMatch = TRUE;
break;
}
}
thats for just a normal skill, so... what I am lost at is... what I might have to change for the new skill type.