{
fix_exits( );
fBootDb = FALSE;
area_update( ); //the area are updated here
load_notes( );
MOBtrigger = TRUE;
}
/*
* Generate shop for news stands and apply it to news stand mob indices.
*/
apply_newsstands();
/*
* Fix up exits.
* Declare db booting over.
* Reset all areas once.
* Load up the notes and ban files.
*/
{
fix_exits();
fix_mobprogs();
prep_vehicles();
fBootDb = FALSE;
area_update();
load_notes();
load_papers();
load_bans();
//load_votes();
load_stocks();
load_social_table();
}
return;
}
for (pArea = area_first;pArea;pArea = pArea->next) {
if ( ++pArea->age < 3) //if you want your area to be 'forced' update at boot because loading the area itself is not enough, just set their age to 4 at boot.
continue;
[code]
void load_area( FILE *fp )
{
AREA_DATA *pArea;
pArea = new_area();
/* pArea->reset_first = NULL;
pArea->reset_last = NULL; */
pArea->file_name = fread_string(fp);
pArea->area_flags = AREA_LOADING; /* OLC */
pArea->security = 9; /* OLC */ /* 9 – Hugin */
PURGE_DATA(pArea->builders);
pArea->builders = str_dup( "None" ); /* OLC */
pArea->vnum = top_area; /* OLC */
pArea->name = fread_string( fp );
pArea->credits = fread_string( fp );
pArea->min_vnum = fread_number( fp );
pArea->max_vnum = fread_number( fp );
/* pArea->area_version = fread_number( fp ); */
pArea->age = 15;
pArea->nplayer = 0;
pArea->empty = FALSE;
if ( !area_first )
area_first = pArea;
if ( area_last )
{
area_last->next = pArea;
REMOVE_BIT(area_last->area_flags, AREA_LOADING); /* OLC */
}
area_last = pArea;
pArea->next = NULL;
current_area = pArea;
top_area++;
return;
}
void area_update( void )
{
AREA_DATA *pArea;
for ( pArea = area_first; pArea != NULL; pArea = pArea->next )
{
if ( ++pArea->age < 3 )
continue;
/*
* Check age and reset.
* Note: Mud School resets every 3 minutes (not 15).
*/
if ( (!pArea->empty && (pArea->nplayer == 0 || pArea->age >= 10)) || pArea->age >= 31)
{
ROOM_INDEX_DATA *pRoomIndex;
reset_area( pArea );
wiznet((char *)Format("\tY[WIZNET]\tn %s has just been reset.",pArea->name),NULL,NULL,WIZ_RESETS,0,0);
pArea->age = number_range( 0, 3 );
pRoomIndex = get_room_index( ROOM_VNUM_START );
if ( pRoomIndex != NULL && pArea == pRoomIndex->area )
pArea->age = 15 - 2;
else if (pArea->nplayer == 0)
pArea->empty = TRUE;
}
}
return;
}
I am not sure why, but my mud is not loading areas when it starts up, but will load them after you startup and let the mud sit for a little bit (naturally resetting). I can also force an area to reset and it does, but just not when the Mud startups. Any thoughts on where I should look or why it would do that?
Thanks in advance,
Arholly