File handler.c


Included Files

  • #include "conf.h"
  • #include "sysdep.h"
  • #include <stdio.h>
  • #include <ctype.h>
  • #include <stdlib.h>
  • #include <string.h>
  • #include <sys/types.h>
  • #include <unistd.h>
  • #include <limits.h>
  • #include <sys/time.h>
  • #include <assert.h>
  • #include "structs.h"
  • #include "utils.h"
  • #include "comm.h"
  • #include "db.h"
  • #include "handler.h"
  • #include "interpreter.h"
  • #include "spells.h"

  • External Variables

    top_of_world
    extern int top_of_world
    Defined in:
  • db.c
  • world
    extern struct room_data* world

    Defined in:
  • db.c
  • object_list
    extern struct obj_data* object_list

    Defined in:
  • db.c
  • character_list
    extern struct char_data* character_list

    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
  • MENU
    extern char* MENU

    Defined in:
  • config.c
  • combat_list
    extern struct char_data* combat_list

    Defined in:
  • fight.c

  • Global Function affect_from_char()

    void affect_from_char ( struct char_data* ch, int type )
    Prototyped in:
  • handler.h
  • Calls:
  • affect_remove() : handler.c
  • Called by:
  • appear() : fight.c
  • do_sneak() : act.other.c
  • mag_unaffects() : magic.c
  • set_fighting() : fight.c
  • stop_follower() : utils.c

  • Global Function affect_join()

    void affect_join ( struct char_data* ch, struct affected_type* af, bool add_dur, bool avg_dur, bool add_mod, bool avg_mod )
    Prototyped in:
  • handler.h
  • Calls:
  • affect_remove() : handler.c
  • affect_to_char() : handler.c
  • Called by:
  • do_drink() : act.item.c
  • do_eat() : act.item.c
  • mag_affects() : magic.c

  • Global Function affect_modify()

    void affect_modify ( struct char_data* ch, byte loc, sbyte mod, long bitv, bool add )
    Prototyped in:
  • handler.h
  • Calls:
  • basic_mud_log() : utils.c
  • Called by:
  • affect_remove() : handler.c
  • affect_to_char() : handler.c
  • affect_total() : handler.c
  • equip_char() : handler.c
  • unequip_char() : handler.c

  • Global Function affect_remove()

    void affect_remove ( struct char_data* ch, struct affected_type* af )
    Prototyped in:
  • handler.h
  • Calls:
  • affect_modify() : handler.c
  • affect_total() : handler.c
  • __eprintf(), free()
  • Called by:
  • affect_from_char() : handler.c
  • affect_join() : handler.c
  • affect_update() : magic.c
  • char_to_store() : db.c
  • do_wizutil() : act.wizard.c
  • free_char() : db.c
  • raw_kill() : fight.c

  • Global Function affect_to_char()

    void affect_to_char ( struct char_data* ch, struct affected_type* af )
    Prototyped in:
  • handler.h
  • Calls:
  • affect_modify() : handler.c
  • affect_total() : handler.c
  • __gnu_calloc(), abort(), perror()
  • Called by:
  • affect_join() : handler.c
  • char_to_store() : db.c
  • do_sneak() : act.other.c
  • spell_charm() : spells.c
  • store_to_char() : db.c

  • Global Function affect_total()

    void affect_total ( struct char_data* ch )
    Prototyped in:
  • handler.h
  • Calls:
  • MAX() : utils.c
  • MIN() : utils.c
  • affect_modify() : handler.c
  • Called by:
  • affect_remove() : handler.c
  • affect_to_char() : handler.c
  • equip_char() : handler.c
  • perform_set() : act.wizard.c
  • unequip_char() : handler.c

  • Global Function affected_by_spell()

    bool affected_by_spell ( struct char_data* ch, int type )
    Prototyped in:
  • handler.h
  • Called by:
  • appear() : fight.c
  • do_score() : act.informative.c
  • mag_affects() : magic.c
  • mag_unaffects() : magic.c
  • stop_follower() : utils.c

  • Global Function apply_ac()

    int apply_ac ( struct char_data* ch, int eq_pos )
    Calls:
  • __eprintf()
  • Called by:
  • equip_char() : handler.c
  • unequip_char() : handler.c

  • Global Function char_from_room()

    void char_from_room ( struct char_data* ch )
    Prototyped in:
  • handler.h
  • Calls:
  • basic_mud_log() : utils.c
  • stop_fighting() : fight.c
  • exit()
  • Called by:
  • check_idling() : limits.c
  • damage() : fight.c
  • do_at() : act.wizard.c
  • do_goto() : act.wizard.c
  • do_simple_move() : act.movement.c
  • do_teleport() : act.wizard.c
  • do_trans() : act.wizard.c
  • extract_char() : handler.c
  • game_loop() : comm.c
  • perform_dupe_check() : interpreter.c
  • perform_set() : act.wizard.c
  • spell_recall() : spells.c
  • spell_summon() : spells.c
  • spell_teleport() : spells.c
  • References Variables:
  • world : db.c

  • Global Function char_to_room()

    void char_to_room ( struct char_data* ch, int room )
    Prototyped in:
  • handler.h
  • Calls:
  • basic_mud_log() : utils.c
  • Called by:
  • check_idling() : limits.c
  • damage() : fight.c
  • do_at() : act.wizard.c
  • do_goto() : act.wizard.c
  • do_load() : act.wizard.c
  • do_simple_move() : act.movement.c
  • do_teleport() : act.wizard.c
  • do_trans() : act.wizard.c
  • do_vstat() : act.wizard.c
  • game_loop() : comm.c
  • mag_summons() : magic.c
  • nanny() : interpreter.c
  • perform_dupe_check() : interpreter.c
  • perform_set() : act.wizard.c
  • pet_shops() : spec_procs.c
  • reset_zone() : db.c
  • spell_recall() : spells.c
  • spell_summon() : spells.c
  • spell_teleport() : spells.c
  • References Variables:
  • top_of_world : db.c
  • world : db.c

  • Global Function create_money()

    struct obj_data* create_money ( int amount )
    Prototyped in:
  • handler.h
  • Calls:
  • basic_mud_log() : utils.c
  • create_obj() : db.c
  • money_desc() : handler.c
  • number() : utils.c
  • str_dup() : utils.c
  • __gnu_calloc(), abort(), perror(), sprintf()
  • Called by:
  • perform_drop_gold() : act.item.c

  • Global Function equip_char()

    void equip_char ( struct char_data* ch, struct obj_data* obj, int pos )
    Prototyped in:
  • handler.h
  • Calls:
  • act() : comm.c
  • affect_modify() : handler.c
  • affect_total() : handler.c
  • apply_ac() : handler.c
  • basic_mud_log() : utils.c
  • obj_to_char() : handler.c
  • __eprintf(), sprintf()
  • Called by:
  • char_to_store() : db.c
  • perform_wear() : act.item.c
  • reset_zone() : db.c
  • References Variables:
  • world : db.c
  • buf

  • Global Function extract_char()

    void extract_char ( struct char_data* ch )
    Prototyped in:
  • handler.h
  • Calls:
  • Crash_delete_crashfile() : objsave.c
  • basic_mud_log() : utils.c
  • char_from_room() : handler.c
  • clearMemory() : mobact.c
  • free_char() : db.c
  • obj_from_char() : handler.c
  • obj_to_room() : handler.c
  • save_char() : db.c
  • stop_fighting() : fight.c
  • unequip_char() : handler.c
  • write_to_output() : comm.c
  • exit()
  • Called by:
  • check_idling() : limits.c
  • do_purge() : act.wizard.c
  • do_quit() : act.other.c
  • do_simple_move() : act.movement.c
  • do_vstat() : act.wizard.c
  • gen_receptionist() : objsave.c
  • perform_dupe_check() : interpreter.c
  • raw_kill() : fight.c
  • References Variables:
  • MENU : config.c
  • character_list : db.c
  • combat_list : fight.c
  • descriptor_list : comm.c
  • mob_index : db.c

  • Global Function extract_obj()

    void extract_obj ( struct obj_data* obj )
    Prototyped in:
  • handler.h
  • Calls:
  • basic_mud_log() : utils.c
  • extract_obj() : handler.c
  • free_obj() : db.c
  • obj_from_char() : handler.c
  • obj_from_obj() : handler.c
  • obj_from_room() : handler.c
  • unequip_char() : handler.c
  • Called by:
  • Crash_extract_expensive() : objsave.c
  • Crash_extract_norents() : objsave.c
  • Crash_extract_objs() : objsave.c
  • Crash_listrent() : objsave.c
  • do_eat() : act.item.c
  • do_purge() : act.wizard.c
  • do_vstat() : act.wizard.c
  • dump() : spec_procs.c
  • extract_obj() : handler.c
  • fido() : spec_procs.c
  • get_check_money() : act.item.c
  • get_purchase_obj() : shop.c
  • mag_materials() : magic.c
  • mag_objectmagic() : spell_parser.c
  • mag_summons() : magic.c
  • perform_drop() : act.item.c
  • reset_zone() : db.c
  • slide_obj() : shop.c
  • References Variables:
  • obj_index : db.c
  • object_list : db.c

  • Global Function find_all_dots()

    int find_all_dots ( char* arg )
    Prototyped in:
  • handler.h
  • Calls:
  • strcmp(), strcpy(), strncmp()
  • Called by:
  • do_drop() : act.item.c
  • do_get() : act.item.c
  • do_give() : act.item.c
  • do_put() : act.item.c
  • do_remove() : act.item.c
  • do_wear() : act.item.c
  • get_from_container() : act.item.c
  • get_from_room() : act.item.c

  • Global Function fname()

    char* fname ( char* namelist )
    Prototyped in:
  • handler.h
  • Called by:
  • do_doorcmd() : act.movement.c
  • look_in_direction() : act.informative.c
  • look_in_obj() : act.informative.c
  • parse_mobile() : db.c
  • parse_object() : db.c
  • perform_act() : comm.c
  • perform_move() : act.movement.c
  • shopping_buy() : shop.c
  • spell_locate_object() : spells.c

  • Global Function generic_find()

    int generic_find ( char* arg, int bitvector, struct char_data* ch, struct char_data** tar_ch, struct obj_data** tar_obj )
    Prototyped in:
  • handler.h
  • Calls:
  • get_char_room_vis() : handler.c
  • get_char_vis() : handler.c
  • get_obj_in_list_vis() : handler.c
  • get_obj_vis() : handler.c
  • isname() : handler.c
  • one_argument() : interpreter.c
  • Called by:
  • do_examine() : act.informative.c
  • do_gen_door() : act.movement.c
  • do_get() : act.item.c
  • do_put() : act.item.c
  • look_at_target() : act.informative.c
  • look_in_obj() : act.informative.c
  • mag_objectmagic() : spell_parser.c
  • References Variables:
  • world : db.c

  • Global Function get_char_num()

    struct char_data* get_char_num ( int nr )
    Prototyped in:
  • handler.h
  • Called by:
  • list_detailed_shop() : shop.c
  • References Variables:
  • character_list : db.c

  • Global Function get_char_room()

    struct char_data* get_char_room ( char* name, int room )
    Prototyped in:
  • handler.h
  • Calls:
  • get_number() : handler.c
  • isname() : handler.c
  • strcpy()
  • Called by:
  • pet_shops() : spec_procs.c
  • References Variables:
  • world : db.c

  • Global Function get_char_room_vis()

    struct char_data* get_char_room_vis ( struct char_data* ch, char* name )
    Prototyped in:
  • handler.h
  • Calls:
  • get_number() : handler.c
  • get_player_vis() : handler.c
  • isname() : handler.c
  • str_cmp() : utils.c
  • strcpy()
  • Called by:
  • do_action() : act.social.c
  • do_assist() : act.offensive.c
  • do_backstab() : act.offensive.c
  • do_bash() : act.offensive.c
  • do_cast() : spell_parser.c
  • do_consider() : act.informative.c
  • do_diagnose() : act.informative.c
  • do_follow() : act.movement.c
  • do_group() : act.other.c
  • do_hit() : act.offensive.c
  • do_insult() : act.social.c
  • do_kick() : act.offensive.c
  • do_kill() : act.offensive.c
  • do_order() : act.offensive.c
  • do_purge() : act.wizard.c
  • do_rescue() : act.offensive.c
  • do_spec_comm() : act.comm.c
  • do_stat() : act.wizard.c
  • do_steal() : act.other.c
  • do_ungroup() : act.other.c
  • do_wake() : act.movement.c
  • generic_find() : handler.c
  • get_char_vis() : handler.c
  • give_find_vict() : act.item.c
  • References Variables:
  • weather_info : db.c
  • world : db.c

  • Global Function get_char_vis()

    struct char_data* get_char_vis ( struct char_data* ch, char* name )
    Prototyped in:
  • handler.h
  • Calls:
  • get_char_room_vis() : handler.c
  • get_number() : handler.c
  • get_player_vis() : handler.c
  • isname() : handler.c
  • strcpy()
  • Called by:
  • do_advance() : act.wizard.c
  • do_cast() : spell_parser.c
  • do_commands() : act.informative.c
  • do_force() : act.wizard.c
  • do_page() : act.comm.c
  • do_restore() : act.wizard.c
  • do_send() : act.wizard.c
  • do_set() : act.wizard.c
  • do_skillset() : modify.c
  • do_snoop() : act.wizard.c
  • do_stat() : act.wizard.c
  • do_switch() : act.wizard.c
  • do_teleport() : act.wizard.c
  • do_tell() : act.comm.c
  • do_track() : graph.c
  • do_trans() : act.wizard.c
  • do_wizutil() : act.wizard.c
  • find_target_room() : act.wizard.c
  • generic_find() : handler.c
  • References Variables:
  • character_list : db.c
  • weather_info : db.c
  • world : db.c

  • Global Function get_number()

    int get_number ( char** name )
    Prototyped in:
  • handler.h
  • Calls:
  • atoi(), strchr(), strcpy()
  • Called by:
  • get_char_room() : handler.c
  • get_char_room_vis() : handler.c
  • get_char_vis() : handler.c
  • get_obj_in_list_vis() : handler.c
  • get_obj_vis() : handler.c
  • get_slide_obj_vis() : shop.c

  • Global Function get_obj_in_list_num()

    struct obj_data* get_obj_in_list_num ( int num, struct obj_data* list )
    Prototyped in:
  • handler.h
  • Called by:
  • reset_zone() : db.c
  • sort_keeper_objs() : shop.c

  • Global Function get_obj_in_list_vis()

    struct obj_data* get_obj_in_list_vis ( struct char_data* ch, char* name, struct obj_data* list )
    Prototyped in:
  • handler.h
  • Calls:
  • get_number() : handler.c
  • isname() : handler.c
  • strcpy()
  • Called by:
  • do_cast() : spell_parser.c
  • do_drink() : act.item.c
  • do_drop() : act.item.c
  • do_eat() : act.item.c
  • do_give() : act.item.c
  • do_grab() : act.item.c
  • do_pour() : act.item.c
  • do_purge() : act.wizard.c
  • do_put() : act.item.c
  • do_stat() : act.wizard.c
  • do_steal() : act.other.c
  • do_use() : act.other.c
  • do_wear() : act.item.c
  • do_wield() : act.item.c
  • do_write() : act.comm.c
  • generic_find() : handler.c
  • get_from_container() : act.item.c
  • get_from_room() : act.item.c
  • get_obj_vis() : handler.c
  • get_selling_obj() : shop.c
  • References Variables:
  • weather_info : db.c
  • world : db.c

  • Global Function get_obj_num()

    struct obj_data* get_obj_num ( int nr )
    Prototyped in:
  • handler.h
  • Called by:
  • reset_zone() : db.c
  • References Variables:
  • object_list : db.c

  • Global Function get_obj_vis()

    struct obj_data* get_obj_vis ( struct char_data* ch, char* name )
    Prototyped in:
  • handler.h
  • Calls:
  • get_number() : handler.c
  • get_obj_in_list_vis() : handler.c
  • isname() : handler.c
  • strcpy()
  • Called by:
  • do_cast() : spell_parser.c
  • do_stat() : act.wizard.c
  • find_target_room() : act.wizard.c
  • generic_find() : handler.c
  • References Variables:
  • object_list : db.c
  • weather_info : db.c
  • world : db.c

  • Global Function get_object_in_equip_vis()

    struct obj_data* get_object_in_equip_vis ( struct char_data* ch, char* arg, struct obj_data* equipment[], int* j )
    Prototyped in:
  • handler.h
  • Calls:
  • isname() : handler.c
  • Called by:
  • do_remove() : act.item.c
  • do_stat() : act.wizard.c
  • References Variables:
  • weather_info : db.c
  • world : db.c

  • Global Function get_player_vis()

    struct char_data* get_player_vis ( struct char_data* ch, char* name, int inroom )
    Prototyped in:
  • handler.h
  • Calls:
  • str_cmp() : utils.c
  • Called by:
  • do_set() : act.wizard.c
  • do_stat() : act.wizard.c
  • get_char_room_vis() : handler.c
  • get_char_vis() : handler.c
  • References Variables:
  • character_list : db.c
  • weather_info : db.c
  • world : db.c

  • Global Function isname()

    int isname ( char* str, char* namelist )
    Prototyped in:
  • handler.h
  • Called by:
  • Board_display_msg() : boards.c
  • Board_show_board() : boards.c
  • do_get() : act.item.c
  • do_give() : act.item.c
  • do_put() : act.item.c
  • do_remove() : act.item.c
  • do_steal() : act.other.c
  • do_use() : act.other.c
  • evaluate_expression() : shop.c
  • find_door() : act.movement.c
  • find_exdesc() : act.informative.c
  • generic_find() : handler.c
  • get_char_room() : handler.c
  • get_char_room_vis() : handler.c
  • get_char_vis() : handler.c
  • get_from_container() : act.item.c
  • get_from_room() : act.item.c
  • get_obj_in_list_vis() : handler.c
  • get_obj_vis() : handler.c
  • get_object_in_equip_vis() : handler.c
  • get_slide_obj_vis() : shop.c
  • perform_immort_where() : act.informative.c
  • perform_mortal_where() : act.informative.c
  • shopping_list() : shop.c
  • spell_locate_object() : spells.c
  • vnum_mobile() : db.c
  • vnum_object() : db.c

  • Global Function money_desc()

    char* money_desc ( int amount )
    Prototyped in:
  • handler.h
  • Calls:
  • basic_mud_log() : utils.c
  • strcpy()
  • Called by:
  • create_money() : handler.c
  • perform_drop_gold() : act.item.c
  • perform_give_gold() : act.item.c

  • Global Function obj_from_char()

    void obj_from_char ( struct obj_data* object )
    Prototyped in:
  • handler.h
  • Calls:
  • basic_mud_log() : utils.c
  • Called by:
  • do_steal() : act.other.c
  • extract_char() : handler.c
  • extract_obj() : handler.c
  • get_check_money() : act.item.c
  • mag_materials() : magic.c
  • perform_drop() : act.item.c
  • perform_give() : act.item.c
  • perform_put() : act.item.c
  • perform_wear() : act.item.c
  • shopping_buy() : shop.c
  • shopping_sell() : shop.c
  • sort_keeper_objs() : shop.c
  • weight_change_object() : act.item.c

  • Global Function obj_from_obj()

    void obj_from_obj ( struct obj_data* obj )
    Prototyped in:
  • handler.h
  • Calls:
  • basic_mud_log() : utils.c
  • Called by:
  • extract_obj() : handler.c
  • fido() : spec_procs.c
  • mag_summons() : magic.c
  • perform_get_from_container() : act.item.c
  • point_update() : limits.c
  • weight_change_object() : act.item.c

  • Global Function obj_from_room()

    void obj_from_room ( struct obj_data* object )
    Prototyped in:
  • handler.h
  • Calls:
  • basic_mud_log() : utils.c
  • Called by:
  • James() : castle.c
  • cleaning() : castle.c
  • extract_obj() : handler.c
  • janitor() : spec_procs.c
  • mobile_activity() : mobact.c
  • perform_get_from_room() : act.item.c
  • reset_zone() : db.c
  • References Variables:
  • world : db.c

  • Global Function obj_to_char()

    void obj_to_char ( struct obj_data* object, struct char_data* ch )
    Prototyped in:
  • handler.h
  • Calls:
  • basic_mud_log() : utils.c
  • Called by:
  • Crash_cryosave() : objsave.c
  • Crash_idlesave() : objsave.c
  • Crash_load() : objsave.c
  • Crash_rentsave() : objsave.c
  • James() : castle.c
  • cleaning() : castle.c
  • do_steal() : act.other.c
  • equip_char() : handler.c
  • janitor() : spec_procs.c
  • mag_creations() : magic.c
  • mag_summons() : magic.c
  • mobile_activity() : mobact.c
  • perform_get_from_container() : act.item.c
  • perform_get_from_room() : act.item.c
  • perform_give() : act.item.c
  • perform_remove() : act.item.c
  • postmaster_receive_mail() : mail.c
  • reset_zone() : db.c
  • shopping_buy() : shop.c
  • slide_obj() : shop.c
  • sort_keeper_objs() : shop.c
  • weight_change_object() : act.item.c

  • Global Function obj_to_obj()

    void obj_to_obj ( struct obj_data* obj, struct obj_data* obj_to )
    Prototyped in:
  • handler.h
  • Calls:
  • basic_mud_log() : utils.c
  • Called by:
  • make_corpse() : fight.c
  • perform_put() : act.item.c
  • point_update() : limits.c
  • reset_zone() : db.c
  • weight_change_object() : act.item.c

  • Global Function obj_to_room()

    void obj_to_room ( struct obj_data* object, int room )
    Prototyped in:
  • handler.h
  • Calls:
  • basic_mud_log() : utils.c
  • Called by:
  • House_load() : house.c
  • do_load() : act.wizard.c
  • extract_char() : handler.c
  • fido() : spec_procs.c
  • make_corpse() : fight.c
  • perform_drop() : act.item.c
  • perform_drop_gold() : act.item.c
  • point_update() : limits.c
  • reset_zone() : db.c
  • References Variables:
  • top_of_world : db.c
  • world : db.c

  • Global Function object_list_new_owner()

    void object_list_new_owner ( struct obj_data* list, struct char_data* ch )
    Prototyped in:
  • handler.h
  • Calls:
  • object_list_new_owner() : handler.c
  • Called by:
  • make_corpse() : fight.c
  • object_list_new_owner() : handler.c

  • Global Function unequip_char()

    struct obj_data* unequip_char ( struct char_data* ch, int pos )
    Prototyped in:
  • handler.h
  • Calls:
  • affect_modify() : handler.c
  • affect_total() : handler.c
  • apply_ac() : handler.c
  • basic_mud_log() : utils.c
  • __eprintf()
  • Called by:
  • Crash_cryosave() : objsave.c
  • Crash_idlesave() : objsave.c
  • Crash_rentsave() : objsave.c
  • char_to_store() : db.c
  • do_steal() : act.other.c
  • extract_char() : handler.c
  • extract_obj() : handler.c
  • make_corpse() : fight.c
  • perform_remove() : act.item.c
  • References Variables:
  • world : db.c

  • Global Function update_char_objects()

    void update_char_objects ( struct char_data* ch )
    Calls:
  • act() : comm.c
  • update_object() : handler.c
  • References Variables:
  • world : db.c

  • Global Function update_object()

    void update_object ( struct obj_data* obj, int use )
    Calls:
  • update_object() : handler.c
  • Called by:
  • update_char_objects() : handler.c
  • update_object() : handler.c