Here's the way I do it:

When the mud boots it checks for the stock area header:

#AREA
midgaard.are~
Midgaard~
{ All } Diku    Midgaard~
3000 3399

(If it happens to be a stock ROM area with the OLC header, I manually change
the header to look like this)

If it gets this, it flags a boolean (stock) to true.
Then in all my boot functions, wherever something exists not from stock,
it uses the stock method of reading those values.

Example:

  if (old_area) { 
  /* if it's an old area, we need to convert the AFF_FLAGS to ammaross bit
system */
     STR_COPY_STR( pMobIndex->affected_by,
        aff_convert_fread_flag( stread_flag(str) ), AFF_FLAGS );
   }
   else {
    STR_COPY_STR( pMobIndex->affected_by,
                str_stread_flag( str, AFF_FLAGS ), AFF_FLAGS );
   }

(There are several of these throughout)
Then asave the area and it's converted.
Also, I added a 'stock' argument to 'asave' to take areas with my format and
convert them back to stock ROM.
Why would you want to do that?

   http://rae.rom.org



Reply via email to