Code port from SMAUG (bleh)

Posted by Meerclar on Tue 19 Nov 2002 07:39 AM — 1 posts, 5,817 views.

USA #0
I am currently working on porting a unique item snipet from SMAUG to DoT and am absolutely clueless how to deal with one specific part of the conversion which follows. The rest of the snipet is easily enough converted but the radical changes in the quit functionality between the 2 codebases have me stumped on this.... anyway, heres the offending code with original notations:

In do_quit:

Find:

int x, y;
int level;

Add before it ( or uncomment it if it's already there ) :

OBJ_DATA obj;

Find:

extract_char( ch, TRUE );
for ( x = 0; x < MAX_WEAR; x++ )
for ( y = 0; y < MAX_LAYERS; y++ )
save_equipment[x][y] = NULL;

Add before it:

for ( obj = ch->first_carrying; obj; obj = obj->next_content )
{
if( IS_OBJ_STAT(obj,ITEM_RARE) || IS_OBJ_STAT(obj,ITEM_UNIQUE) )
obj->pIndexData->count += obj->count;
}


Many thanks for any help offered.