File objsave.c


Included Files


Preprocessor definitions

#define RENT_FACTOR 1

#define CRYO_FACTOR 4

#define LOC_INVENTORY 0

#define MAX_BAG_ROWS 5


Global Variable receptionist

int ( receptionist)(struct char_data* ch,void* me,int cmd,char* argument)
Visible in:  objsave.c
   spec_assign.c
Used in: assign_mobiles()spec_assign.c

Global Variable cryogenicist

int ( cryogenicist)(struct char_data* ch,void* me,int cmd,char* argument)
Visible in:  objsave.c
   spec_assign.c
Used in: assign_mobiles()spec_assign.c

External Variables

world
extern struct room_data* world
Defined in: db.c

mob_index
extern struct index_data* mob_index
Defined in: db.c

obj_index
extern struct index_data* obj_index
Defined in: db.c

descriptor_list
extern struct descriptor_data* descriptor_list
Defined in: comm.c

player_table
extern struct player_index_element* player_table
Defined in: db.c

top_of_p_table
extern int top_of_p_table
Defined in: db.c

rent_file_timeout
extern int rent_file_timeout
Defined in: config.c

crash_file_timeout
extern int crash_file_timeout
Defined in: config.c

free_rent
extern int free_rent
Defined in: config.c

min_rent_cost
extern int min_rent_cost
Defined in: config.c

max_obj_save
extern int max_obj_save
Defined in: config.c


Global Function Crash_calculate_rent()

void Crash_calculate_rent ( struct obj_data* obj, int* cost )
Prototyped in: objsave.c
Calls: Crash_calculate_rent()objsave.c
  MAX()utils.c
Called by: Crash_calculate_rent()objsave.c
  Crash_idlesave()objsave.c

Global Function Crash_clean_file()

int Crash_clean_file ( char* name )
Prototyped in: handler.h
Calls: Crash_delete_file()objsave.c
  basic_mud_log()utils.c
  get_filename()utils.c
  __errno_location(), fclose(), feof(), fopen(), fread(), strcpy(), strerror(), time()
Called by: update_obj_file()objsave.c
References Variables: crash_file_timeoutconfig.c
  rent_file_timeoutconfig.c

Global Function Crash_crashsave()

void Crash_crashsave ( struct char_data* ch )
Prototyped in: handler.h
Calls: Crash_restore_weight()objsave.c
  Crash_save()objsave.c
  Crash_write_rentcode()objsave.c
  get_filename()utils.c
  fclose(), fopen(), time()
Called by: Crash_load()objsave.c
  Crash_save_all()objsave.c
  check_idling()limits.c
  do_save()act.other.c

Global Function Crash_cryosave()

void Crash_cryosave ( struct char_data* ch, int cost )
Prototyped in: objsave.c
Calls: Crash_extract_norent_eq()objsave.c
  Crash_extract_norents()objsave.c
  Crash_extract_objs()objsave.c
  Crash_restore_weight()objsave.c
  Crash_save()objsave.c
  Crash_write_rentcode()objsave.c
  MAX()utils.c
  get_filename()utils.c
  fclose(), fopen(), time()
Called by: gen_receptionist()objsave.c

Global Function Crash_delete_crashfile()

int Crash_delete_crashfile ( struct char_data* ch )
Prototyped in: handler.h
Calls: Crash_delete_file()objsave.c
  basic_mud_log()utils.c
  get_filename()utils.c
  __errno_location(), fclose(), feof(), fopen(), fread(), strerror()
Called by: extract_char_final()handler.c

Global Function Crash_delete_file()

int Crash_delete_file ( char* name )
Prototyped in: handler.h
Calls: basic_mud_log()utils.c
  get_filename()utils.c
  __errno_location(), fclose(), fopen(), remove(), strerror()
Called by: Crash_clean_file()objsave.c
  Crash_delete_crashfile()objsave.c
  Crash_idlesave()objsave.c
  nanny()interpreter.c

Global Function Crash_extract_expensive()

void Crash_extract_expensive ( struct obj_data* obj )
Prototyped in: objsave.c
Calls: extract_obj()handler.c
Called by: Crash_idlesave()objsave.c

Global Function Crash_extract_norent_eq()

void Crash_extract_norent_eq ( struct char_data* ch )
Prototyped in: objsave.c
Calls: Crash_extract_norents()objsave.c
  Crash_is_unrentable()objsave.c
  obj_to_char()handler.c
  unequip_char()handler.c
Called by: Crash_cryosave()objsave.c
  Crash_idlesave()objsave.c
  Crash_rentsave()objsave.c

Global Function Crash_extract_norents()

void Crash_extract_norents ( struct obj_data* obj )
Prototyped in: objsave.c
Calls: Crash_extract_norents()objsave.c
  Crash_is_unrentable()objsave.c
  extract_obj()handler.c
Called by: Crash_cryosave()objsave.c
  Crash_extract_norent_eq()objsave.c
  Crash_extract_norents()objsave.c
  Crash_idlesave()objsave.c
  Crash_rentsave()objsave.c

Global Function Crash_extract_objs()

void Crash_extract_objs ( struct obj_data* obj )
Prototyped in: objsave.c
Calls: Crash_extract_objs()objsave.c
  extract_obj()handler.c
Called by: Crash_cryosave()objsave.c
  Crash_extract_objs()objsave.c
  Crash_idlesave()objsave.c
  Crash_rentsave()objsave.c

Global Function Crash_idlesave()

void Crash_idlesave ( struct char_data* ch )
Prototyped in: handler.h
Calls: Crash_calculate_rent()objsave.c
  Crash_delete_file()objsave.c
  Crash_extract_expensive()objsave.c
  Crash_extract_norent_eq()objsave.c
  Crash_extract_norents()objsave.c
  Crash_extract_objs()objsave.c
  Crash_restore_weight()objsave.c
  Crash_save()objsave.c
  Crash_write_rentcode()objsave.c
  get_filename()utils.c
  obj_to_char()handler.c
  unequip_char()handler.c
  fclose(), fopen(), time()
Called by: check_idling()limits.c

Global Function Crash_is_unrentable()

int Crash_is_unrentable ( struct obj_data* obj )
Prototyped in: objsave.c
Called by: Crash_extract_norent_eq()objsave.c
  Crash_extract_norents()objsave.c
  Crash_report_rent()objsave.c
  Crash_report_unrentables()objsave.c

Global Function Crash_listrent()

void Crash_listrent ( struct char_data* ch, char* name )
Prototyped in: handler.h
Calls: extract_obj()handler.c
  get_filename()utils.c
  read_object()db.c
  real_object()db.c
  send_to_char()comm.c
  fclose(), feof(), ferror(), fopen(), fread(), sprintf(), strcat(), strlen()
Called by: do_show()act.wizard.c

Global Function Crash_load()

int Crash_load ( struct char_data* ch )
Prototyped in: handler.h
Calls: Crash_crashsave()objsave.c
  Crash_write_rentcode()objsave.c
  MAX()utils.c
  Obj_from_store()objsave.c
  auto_equip()objsave.c
  basic_mud_log()utils.c
  equip_char()handler.c
  get_filename()utils.c
  mudlog()utils.c
  obj_from_char()handler.c
  obj_to_char()handler.c
  obj_to_obj()handler.c
  save_char()db.c
  send_to_char()comm.c
  unequip_char()handler.c
  __errno_location(), fclose(), feof(), ferror(), fopen(), fread(), perror(), rewind(), sprintf(), strerror(), time()
Called by: nanny()interpreter.c
References Variables: bufdb.c
  dummy_mobdb.c
  max_obj_saveconfig.c

Global Function Crash_offer_rent()

int Crash_offer_rent ( struct char_data* ch, struct char_data* receptionist, int display, int factor )
Prototyped in: objsave.c
Calls: Crash_rent_deadline()objsave.c
  Crash_report_rent()objsave.c
  Crash_report_unrentables()objsave.c
  act()comm.c
  sprintf()
Called by: gen_receptionist()objsave.c
References Variables: max_obj_saveconfig.c
  min_rent_costconfig.c

Global Function Crash_rent_deadline()

void Crash_rent_deadline ( struct char_data* ch, struct char_data* recep, long cost )
Prototyped in: objsave.c
Calls: act()comm.c
  sprintf()
Called by: Crash_offer_rent()objsave.c
  gen_receptionist()objsave.c
References Variables: bufdb.c

Global Function Crash_rentsave()

void Crash_rentsave ( struct char_data* ch, int cost )
Prototyped in: objsave.c
Calls: Crash_extract_norent_eq()objsave.c
  Crash_extract_norents()objsave.c
  Crash_extract_objs()objsave.c
  Crash_restore_weight()objsave.c
  Crash_save()objsave.c
  Crash_write_rentcode()objsave.c
  get_filename()utils.c
  fclose(), fopen(), time()
Called by: check_idling()limits.c
  do_quit()act.other.c
  gen_receptionist()objsave.c

Global Function Crash_report_rent()

void Crash_report_rent ( struct char_data* ch, struct char_data* recep, struct obj_data* obj, long* cost, long* nitems, int display, int factor )
Prototyped in: objsave.c
Calls: Crash_is_unrentable()objsave.c
  Crash_report_rent()objsave.c
  MAX()utils.c
  act()comm.c
  basic_mud_log()utils.c
  sprintf()
Called by: Crash_offer_rent()objsave.c
  Crash_report_rent()objsave.c
References Variables: dummy_mobdb.c
  weather_infodb.c
  worlddb.c

Global Function Crash_report_unrentables()

int Crash_report_unrentables ( struct char_data* ch, struct char_data* recep, struct obj_data* obj )
Prototyped in: objsave.c
Calls: Crash_is_unrentable()objsave.c
  Crash_report_unrentables()objsave.c
  act()comm.c
  basic_mud_log()utils.c
  sprintf()
Called by: Crash_offer_rent()objsave.c
  Crash_report_unrentables()objsave.c
References Variables: dummy_mobdb.c
  weather_infodb.c
  worlddb.c

Global Function Crash_restore_weight()

void Crash_restore_weight ( struct obj_data* obj )
Prototyped in: objsave.c
Calls: Crash_restore_weight()objsave.c
Called by: Crash_crashsave()objsave.c
  Crash_cryosave()objsave.c
  Crash_idlesave()objsave.c
  Crash_rentsave()objsave.c
  Crash_restore_weight()objsave.c

Global Function Crash_save()

int Crash_save ( struct obj_data* obj, FILE* fp, int location )
Prototyped in: objsave.c
Calls: Crash_save()objsave.c
  MIN()utils.c
  Obj_to_store()objsave.c
Called by: Crash_crashsave()objsave.c
  Crash_cryosave()objsave.c
  Crash_idlesave()objsave.c
  Crash_rentsave()objsave.c
  Crash_save()objsave.c

Global Function Crash_save_all()

void Crash_save_all ( void )
Prototyped in: handler.h
Calls: Crash_crashsave()objsave.c
  save_char()db.c
Called by: heartbeat()comm.c
  init_game()comm.c
References Variables: descriptor_listcomm.c

Global Function Crash_write_rentcode()

int Crash_write_rentcode ( struct char_data* ch, FILE* fl, struct rent_info* rent )
Prototyped in: objsave.c
Calls: fwrite(), perror()
Called by: Crash_crashsave()objsave.c
  Crash_cryosave()objsave.c
  Crash_idlesave()objsave.c
  Crash_load()objsave.c
  Crash_rentsave()objsave.c

Global Function Obj_from_store()

struct obj_data* Obj_from_store ( struct obj_file_elem object, int* location )
Prototyped in: objsave.c
Calls: read_object()db.c
  real_object()db.c
Called by: Crash_load()objsave.c
  House_listrent()house.c
  House_load()house.c

Global Function Obj_to_store()

int Obj_to_store ( struct obj_data* obj, FILE* fl, int location )
Prototyped in: objsave.c
Calls: fwrite(), perror()
Called by: Crash_save()objsave.c
  House_save()house.c
References Variables: obj_indexdb.c

Global Function auto_equip()

void auto_equip ( struct char_data* ch, struct obj_data* obj, int location )
Prototyped in: objsave.c
Calls: equip_char()handler.c
  invalid_align()handler.c
  invalid_class()class.c
  mudlog()utils.c
  obj_to_char()handler.c
  sprintf()
Called by: Crash_load()objsave.c

Global Function cryogenicist()

int ( cryogenicist) ( struct char_data* ch, void* me, int cmd, char* argument )
Calls: gen_receptionist()objsave.c

Global Function gen_receptionist()

int gen_receptionist ( struct char_data* ch, struct char_data* recep, int cmd, char* arg, int mode )
Prototyped in: objsave.c
Calls: Crash_cryosave()objsave.c
  Crash_offer_rent()objsave.c
  Crash_rent_deadline()objsave.c
  Crash_rentsave()objsave.c
  MAX()utils.c
  act()comm.c
  basic_mud_log()utils.c
  do_action()act.social.c
  extract_char()handler.c
  find_command()interpreter.c
  mudlog()utils.c
  number()utils.c
  save_char()db.c
  send_to_char()comm.c
  sprintf(), strcmp()
Called by: cryogenicist()objsave.c
  receptionist()objsave.c
References Variables: bufdb.c
  cmd_infointerpreter.c
  dummy_mobdb.c
  free_rentconfig.c
  weather_infodb.c
  worlddb.c

Global Function receptionist()

int ( receptionist) ( struct char_data* ch, void* me, int cmd, char* argument )
Calls: gen_receptionist()objsave.c

Global Function update_obj_file()

void update_obj_file ( void )
Prototyped in: objsave.c
Calls: Crash_clean_file()objsave.c
Called by: boot_db()db.c
References Variables: player_tabledb.c
  top_of_p_tabledb.c