Crossfire Server, Trunk
|
Go to the source code of this file.
void common_ob_describe | ( | const object * | op, |
const object * | observer, | ||
int | use_media_tags, | ||
char * | buf, | ||
size_t | size | ||
) |
Describes an object, seen by a given observer.
op | The object to describe |
observer | The object to make the description to |
use_media_tags | If set then media tags may be used in the description |
buf | Buffer that will contain the description |
size | buf's size. |
Definition at line 36 of file describe.cpp.
References buf, describe_item(), give::op, query_name(), and stringbuffer_finish().
Referenced by legacy_ob_describe(), and spellbook_type_describe().
Definition at line 67 of file common_apply.cpp.
References ob_move_on_recursion_depth, sword_of_souls::victim, and nlohmann::detail::void().
Referenced by altar_type_move_on(), button_type_move_on(), check_inv_type_move_on(), common_projectile_move_on(), common_trap_type_move_on(), container_type_move_on(), converter_type_move_on(), deep_swamp_type_move_on(), director_type_move_on(), exit_type_move_on(), hole_type_move_on(), identify_altar_type_move_on(), pedestal_type_move_on(), player_mover_type_move_on(), shop_mat_type_move_on(), sign_type_move_on(), spell_effect_type_move_on(), spinner_type_move_on(), trapdoor_type_move_on(), trigger_altar_type_move_on(), trigger_button_type_move_on(), and trigger_pedestal_type_move_on().
method_ret common_pre_ob_move_on | ( | object * | trap, |
object * | victim, | ||
object * | originator | ||
) |
Definition at line 35 of file common_apply.cpp.
References object::arch, CONTAINER, EVENT_TRIGGER, events_execute_object_event(), EXIT, FLAG_APPLIED, FLAG_WIZPASS, HEAD, llevDebug, LOG(), METHOD_ERROR, METHOD_OK, object::name, archetype::name, ob_move_on_recursion_depth, QUERY_FLAG, SCRIPT_FIX_ALL, SIGN, object::type, and sword_of_souls::victim.
Referenced by altar_type_move_on(), button_type_move_on(), check_inv_type_move_on(), common_projectile_move_on(), common_trap_type_move_on(), container_type_move_on(), converter_type_move_on(), deep_swamp_type_move_on(), director_type_move_on(), exit_type_move_on(), hole_type_move_on(), identify_altar_type_move_on(), pedestal_type_move_on(), player_mover_type_move_on(), shop_mat_type_move_on(), sign_type_move_on(), spell_effect_type_move_on(), spinner_type_move_on(), trapdoor_type_move_on(), trigger_altar_type_move_on(), trigger_button_type_move_on(), and trigger_pedestal_type_move_on().
method_ret common_process_projectile | ( | object * | op | ) |
Move an arrow or thrown object along its course.
op | The arrow or thrown object being moved. |
Definition at line 77 of file projectile.cpp.
References absdir(), DIRX, DIRY, FLAG_ALIVE, FLAG_REFL_MISSILE, FLAG_REFLECTING, freearr_x, freearr_y, GET_ANIM_ID, get_map_flags(), GET_MAP_MOVE_BLOCK, hit_with_arrow(), llevError, LOG(), m, map_find_by_flag(), METHOD_ERROR, METHOD_OK, OB_TYPE_MOVE_BLOCK, object_free_drop_inventory(), object_get_owner(), object_insert_in_map_at(), object_remove(), object_update_turn_face(), give::op, P_IS_ALIVE, P_OUT_OF_MAP, QUERY_FLAG, rndm(), stop_projectile(), and Ice::tmp.
Referenced by arrow_type_process(), and thrown_object_type_process().
method_ret common_projectile_move_on | ( | object * | trap, |
object * | victim, | ||
object * | originator | ||
) |
Move on this Thrown Object object.
trap | The thrown object or arrow we're moving on |
victim | The object moving over this one |
originator | The object that caused the move_on event |
Definition at line 222 of file projectile.cpp.
References common_post_ob_move_on(), common_pre_ob_move_on(), FLAG_ALIVE, hit_with_arrow(), object::inv, METHOD_ERROR, METHOD_OK, object_get_owner(), QUERY_FLAG, object::speed, and sword_of_souls::victim.
Referenced by init_type_arrow(), and init_type_thrown_object().
method_ret common_trap_type_move_on | ( | object * | trap, |
object * | victim, | ||
object * | originator | ||
) |
Move on this Rune or Trap object.
trap | The rune or trap we're moving on |
victim | The object moving over this one |
originator | The object that caused the move_on event |
Definition at line 40 of file common_trap.cpp.
References common_post_ob_move_on(), common_pre_ob_move_on(), FLAG_ALIVE, object::level, METHOD_ERROR, METHOD_OK, QUERY_FLAG, spring_trap(), and sword_of_souls::victim.
Referenced by init_type_rune(), and init_type_trap().
method_ret common_trap_type_process | ( | object * | op | ) |
Processes a Rune or Trap. Comments on runes (and traps): rune->level : level at which rune will cast its spell. rune->hp : number of detonations before rune goes away rune->msg : message the rune displays when it goes off rune->direction : direction it will cast a spell in rune->dam : damage the rune will do if it doesn't cast spells rune->attacktype: type of damage it does, if not casting spells rune->other_arch: spell in the rune rune->Cha : how hidden the rune is rune->maxhp : number of spells the rune casts
op | The rune or trap to process |
Definition at line 64 of file common_trap.cpp.
References MAX, METHOD_OK, object_update(), give::op, rndm(), and UP_OBJ_FACE.
Referenced by init_type_rune(), and init_type_trap().
Common code for both lighting an item for applying the lighter and for lighting the lightable object.
item | The item to light. |
lighter_name | The name of the tool used to light the item |
applier | The object applying the lighter/lightable |
Definition at line 36 of file light_object.cpp.
References AT_FIRE, disinfect::count, draw_ext_info_format(), fix_object(), MAX_BUF, MSG_TYPE_APPLY, MSG_TYPE_APPLY_FAILURE, MSG_TYPE_APPLY_SUCCESS, NDI_UNIQUE, object_get_player_container(), safe_strncpy, and save_throw_object().
Referenced by lightable_type_apply(), and lighter_type_apply().
void init_type_altar | ( | void | ) |
Initializer for the ALTAR object type.
Definition at line 39 of file altar.cpp.
References ALTAR, altar_type_move_on(), and register_move_on().
Referenced by register_all_ob_types().
void init_type_armour_improver | ( | void | ) |
Initializer for the ARMOUR_IMPROVER object type.
Definition at line 39 of file armour_improver.cpp.
References ARMOUR_IMPROVER, armour_improver_type_apply(), and register_apply().
Referenced by register_all_ob_types().
void init_type_arrow | ( | void | ) |
Initializer for the ARROW object type.
Definition at line 39 of file arrow.cpp.
References ARROW, arrow_type_process(), common_projectile_move_on(), register_move_on(), and register_process().
Referenced by register_all_ob_types().
void init_type_blindness | ( | void | ) |
Initializer for the blindness object type.
Definition at line 40 of file blindness.cpp.
References BLINDNESS, blindness_type_process(), and register_process().
Referenced by register_all_ob_types().
void init_type_book | ( | void | ) |
Initializer for the BOOK object type.
Definition at line 38 of file book.cpp.
References BOOK, book_type_apply(), and register_apply().
Referenced by register_all_ob_types().
void init_type_button | ( | void | ) |
Initializer for the BUTTON object type.
Definition at line 39 of file button.cpp.
References BUTTON, button_type_move_on(), and register_move_on().
Referenced by register_all_ob_types().
void init_type_cf_handle | ( | void | ) |
Initializer for the CF_HANDLE object type.
Definition at line 39 of file cf_handle.cpp.
References CF_HANDLE, cf_handle_type_apply(), and register_apply().
Referenced by register_all_ob_types().
void init_type_check_inv | ( | void | ) |
Initializer for the CHECK_INV object type.
Definition at line 39 of file check_inv.cpp.
References CHECK_INV, check_inv_type_move_on(), and register_move_on().
Referenced by register_all_ob_types().
void init_type_clock | ( | void | ) |
Initializer for the CLOCK object type.
Definition at line 38 of file clock.cpp.
References CLOCK, clock_type_apply(), and register_apply().
Referenced by register_all_ob_types().
void init_type_container | ( | void | ) |
Initializer for the CONTAINER object type.
Definition at line 39 of file container.cpp.
References CONTAINER, container_type_move_on(), and register_move_on().
Referenced by register_all_ob_types().
void init_type_converter | ( | void | ) |
Initializer for the CONVERTER object type.
Definition at line 80 of file converter.cpp.
References CONVERTER, converter_type_apply(), converter_type_move_on(), register_apply(), and register_move_on().
Referenced by register_all_ob_types().
void init_type_creator | ( | void | ) |
Initializer for the creator object type.
Definition at line 40 of file creator.cpp.
References CREATOR, creator_type_process(), creator_type_trigger(), register_process(), and register_trigger().
Referenced by register_all_ob_types().
void init_type_deep_swamp | ( | void | ) |
Initializer for the DEEP_SWAMP object type.
Definition at line 40 of file deep_swamp.cpp.
References DEEP_SWAMP, deep_swamp_type_move_on(), deep_swamp_type_process(), register_move_on(), and register_process().
Referenced by register_all_ob_types().
void init_type_detector | ( | void | ) |
Initializer for the detector object type.
Definition at line 33 of file detector.cpp.
References DETECTOR, detector_type_process(), and register_process().
Referenced by register_all_ob_types().
void init_type_director | ( | void | ) |
Initializer for the DIRECTOR object type.
Definition at line 45 of file director.cpp.
References DIRECTOR, director_process(), director_type_move_on(), register_move_on(), and register_process().
Referenced by register_all_ob_types().
void init_type_dragon_focus | ( | void | ) |
Initializer for the food object type.
Definition at line 40 of file dragon_focus.cpp.
References DRAGON_FOCUS, dragon_focus_type_apply(), and register_apply().
Referenced by register_all_ob_types().
void init_type_duplicator | ( | void | ) |
Initializer for the duplicator object type.
Definition at line 33 of file duplicator.cpp.
References DUPLICATOR, duplicator_type_trigger(), and register_trigger().
Referenced by register_all_ob_types().
void init_type_exit | ( | void | ) |
Initializer for the EXIT object type.
Definition at line 34 of file exit.cpp.
References EXIT, exit_type_apply(), exit_type_move_on(), register_apply(), and register_move_on().
Referenced by register_all_ob_types().
void init_type_food | ( | void | ) |
Initializer for the food object type.
Definition at line 37 of file food.cpp.
References DRINK, FLESH, FOOD, food_type_apply(), and register_apply().
Referenced by register_all_ob_types().
void init_type_gate | ( | void | ) |
Initializer for the gate object type.
Definition at line 35 of file gate.cpp.
References GATE, gate_type_process(), register_process(), TIMED_GATE, and timed_gate_type_process().
Referenced by register_all_ob_types().
void init_type_hole | ( | void | ) |
Initializer for the HOLE object type.
Definition at line 39 of file hole.cpp.
References HOLE, hole_type_move_on(), and register_move_on().
Referenced by register_all_ob_types().
void init_type_identify_altar | ( | void | ) |
Initializer for the IDENTIFY_ALTAR object type.
Definition at line 38 of file identify_altar.cpp.
References IDENTIFY_ALTAR, identify_altar_type_move_on(), and register_move_on().
Referenced by register_all_ob_types().
void init_type_lamp | ( | void | ) |
Initializer for the LAMP object type.
Definition at line 40 of file lamp.cpp.
References LAMP, lamp_type_apply(), lamp_type_describe(), register_apply(), and register_describe().
Referenced by register_all_ob_types().
void init_type_lightable | ( | void | ) |
Initializer for the LIGHTABLE object type.
Definition at line 32 of file lightable.cpp.
References LIGHTABLE, lightable_type_apply(), and register_apply().
Referenced by register_all_ob_types().
void init_type_lighter | ( | void | ) |
Initializer for the LIGHTER object type.
Definition at line 32 of file lighter.cpp.
References LIGHTER, lighter_type_apply(), and register_apply().
Referenced by register_all_ob_types().
void init_type_marker | ( | void | ) |
Initializer for the marker object type.
Definition at line 40 of file marker.cpp.
References MARKER, marker_type_process(), marker_type_trigger(), register_process(), register_trigger(), and TRIGGER_MARKER.
Referenced by register_all_ob_types().
void init_type_mimic | ( | void | ) |
Initializer for MIMIC type.
Definition at line 43 of file mimic.cpp.
References MIMIC, mimic_type_apply(), and register_apply().
Referenced by register_all_ob_types().
void init_type_mood_floor | ( | void | ) |
Initializer for the mood floor object type.
Definition at line 40 of file mood_floor.cpp.
References MOOD_FLOOR, mood_floor_type_process(), mood_floor_type_trigger(), register_process(), and register_trigger().
Referenced by register_all_ob_types().
void init_type_peacemaker | ( | void | ) |
Initializer for the peacemaker object type.
Definition at line 39 of file peacemaker.cpp.
References PEACEMAKER, peacemaker_type_process(), and register_process().
Referenced by register_all_ob_types().
void init_type_pedestal | ( | void | ) |
Initializer for the PEDESTAL object type.
Definition at line 38 of file pedestal.cpp.
References PEDESTAL, pedestal_type_move_on(), and register_move_on().
Referenced by register_all_ob_types().
void init_type_player_changer | ( | void | ) |
Initializer for the player changer object type.
Definition at line 32 of file player_changer.cpp.
References PLAYER_CHANGER, player_changer_type_process(), and register_process().
Referenced by register_all_ob_types().
void init_type_player_mover | ( | void | ) |
Initializer for the PLAYERMOVER object type.
Definition at line 38 of file player_mover.cpp.
References player_mover_type_move_on(), PLAYERMOVER, and register_move_on().
Referenced by register_all_ob_types().
void init_type_poison | ( | void | ) |
Initializer for the POISON object type.
Definition at line 38 of file poison.cpp.
References POISON, poison_type_apply(), and register_apply().
Referenced by register_all_ob_types().
void init_type_poisoning | ( | void | ) |
Initializer for the poisoning object type.
Definition at line 38 of file poisoning.cpp.
References POISONING, poisoning_type_process(), and register_process().
Referenced by register_all_ob_types().
void init_type_potion | ( | void | ) |
Initializer for the potion object type.
Definition at line 33 of file potion.cpp.
References POTION, potion_type_apply(), and register_apply().
Referenced by register_all_ob_types().
void init_type_power_crystal | ( | void | ) |
Initializer for the POWER_CRYSTAL object type.
Definition at line 134 of file power_crystal.cpp.
References POWER_CRYSTAL, power_crystal_describe(), power_crystal_type_apply(), register_apply(), and register_describe().
Referenced by register_all_ob_types().
void init_type_rune | ( | void | ) |
Initializer for the RUNE object type.
Definition at line 36 of file rune.cpp.
References common_trap_type_move_on(), common_trap_type_process(), register_move_on(), register_process(), and RUNE.
Referenced by register_all_ob_types().
void init_type_savebed | ( | void | ) |
Initializer for the SAVEBED object type.
Definition at line 34 of file savebed.cpp.
References register_apply(), SAVEBED, and savebed_type_apply().
Referenced by register_all_ob_types().
void init_type_scroll | ( | void | ) |
Initializer for the scroll object type.
Definition at line 37 of file scroll.cpp.
References register_apply(), SCROLL, and scroll_type_apply().
Referenced by register_all_ob_types().
void init_type_shop_inventory | ( | void | ) |
Initializer for the SHOP_INVENTORY object type.
Definition at line 34 of file shop_inventory.cpp.
References register_apply(), SHOP_INVENTORY, and shop_inventory_type_apply().
Referenced by register_all_ob_types().
void init_type_shop_mat | ( | void | ) |
Initializer for the SHOP_MAT object type.
Definition at line 39 of file shop_mat.cpp.
References register_move_on(), SHOP_MAT, and shop_mat_type_move_on().
Referenced by register_all_ob_types().
void init_type_sign | ( | void | ) |
Initializer for the SIGN object type.
Definition at line 40 of file sign.cpp.
References register_apply(), register_move_on(), SIGN, sign_type_apply(), and sign_type_move_on().
Referenced by register_all_ob_types().
void init_type_skillscroll | ( | void | ) |
Initializer for the SKILLSCROLL object type.
Definition at line 39 of file skillscroll.cpp.
References register_apply(), SKILLSCROLL, and skillscroll_type_apply().
Referenced by register_all_ob_types().
void init_type_spell_effect | ( | void | ) |
Initializer for the SPELL_EFFECT object type.
Definition at line 54 of file spell_effect.cpp.
References register_move_on(), register_process(), SPELL_EFFECT, spell_effect_type_move_on(), and spell_effect_type_process().
Referenced by register_all_ob_types().
void init_type_spellbook | ( | void | ) |
Initializer for the SPELLBOOK object type.
Definition at line 46 of file spellbook.cpp.
References register_apply(), register_describe(), SPELLBOOK, spellbook_type_apply(), and spellbook_type_describe().
Referenced by register_all_ob_types().
void init_type_spinner | ( | void | ) |
Initializer for the SPINNER object type.
Definition at line 38 of file spinner.cpp.
References register_move_on(), SPINNER, and spinner_type_move_on().
Referenced by register_all_ob_types().
void init_type_teleporter | ( | void | ) |
Initializer for the teleporter object type.
Definition at line 41 of file teleporter.cpp.
References register_process(), register_trigger(), TELEPORTER, teleporter_type_process(), and teleporter_type_trigger().
Referenced by register_all_ob_types().
void init_type_thrown_object | ( | void | ) |
Initializer for the THROWN_OBJ object type.
Definition at line 38 of file thrown_object.cpp.
References common_projectile_move_on(), register_move_on(), register_process(), THROWN_OBJ, and thrown_object_type_process().
Referenced by register_all_ob_types().
void init_type_transport | ( | void | ) |
Initializer for the TRANSPORT object type.
Definition at line 37 of file transport.cpp.
References register_apply(), register_process(), TRANSPORT, transport_type_apply(), and transport_type_process().
Referenced by register_all_ob_types().
void init_type_trap | ( | void | ) |
Initializer for the TRAP object type.
Definition at line 36 of file trap.cpp.
References common_trap_type_move_on(), common_trap_type_process(), register_move_on(), register_process(), and TRAP.
Referenced by register_all_ob_types().
void init_type_trapdoor | ( | void | ) |
Initializer for the TRAPDOOR object type.
Definition at line 38 of file trapdoor.cpp.
References register_move_on(), TRAPDOOR, and trapdoor_type_move_on().
Referenced by register_all_ob_types().
void init_type_treasure | ( | void | ) |
Initializer for the TREASURE object type.
Definition at line 38 of file treasure.cpp.
References register_apply(), TREASURE, and treasure_type_apply().
Referenced by register_all_ob_types().
void init_type_trigger | ( | void | ) |
Initializer for the TRIGGER object type.
Definition at line 40 of file trigger.cpp.
References register_apply(), register_process(), TRIGGER, trigger_type_apply(), and trigger_type_process().
Referenced by register_all_ob_types().
void init_type_trigger_altar | ( | void | ) |
Initializer for the TRIGGER_ALTAR object type.
Definition at line 38 of file trigger_altar.cpp.
References register_move_on(), TRIGGER_ALTAR, and trigger_altar_type_move_on().
Referenced by register_all_ob_types().
void init_type_trigger_button | ( | void | ) |
Initializer for the TRIGGER_BUTTON object type.
Definition at line 38 of file trigger_button.cpp.
References register_move_on(), TRIGGER_BUTTON, and trigger_button_type_move_on().
Referenced by register_all_ob_types().
void init_type_trigger_pedestal | ( | void | ) |
Initializer for the TRIGGER_PEDESTAL object type.
Definition at line 38 of file trigger_pedestal.cpp.
References register_move_on(), TRIGGER_PEDESTAL, and trigger_pedestal_type_move_on().
Referenced by register_all_ob_types().
void init_type_weapon_improver | ( | void | ) |
Initializer for the WEAPON_IMPROVER object type.
Definition at line 38 of file weapon_improver.cpp.
References register_apply(), WEAPON_IMPROVER, and weapon_improver_type_apply().
Referenced by register_all_ob_types().
method_ret legacy_ob_apply | ( | object * | op, |
object * | applier, | ||
int | aflags | ||
) |
Main apply handler.
Checks for unpaid items before applying.
Return value: 0: player or monster can't apply objects of that type 1: has been applied, or there was an error applying the object 2: objects of that type can't be applied if not in inventory
op is the object that is causing object to be applied, tmp is the object being applied.
aflag is special (always apply/unapply) flags. Nothing is done with them in this function - they are passed to apply_special
Definition at line 49 of file apply.cpp.
References AMULET, apply_container(), apply_special(), ARMOUR, BOOTS, BOW, BRACERS, BUILDER, CLOAK, CLOSE_CON, CONTAINER, GIRDLE, GLOVES, HELMET, METHOD_ERROR, METHOD_OK, METHOD_UNHANDLED, give::op, PLAYER, RING, ROD, SHIELD, SKILL, SKILL_TOOL, object::type, nlohmann::detail::void(), WAND, and WEAPON.
Referenced by init_ob_methods().
void legacy_ob_describe | ( | const object * | op, |
const object * | observer, | ||
int | use_media_tags, | ||
char * | buf, | ||
size_t | size | ||
) |
Describes an object, seen by a given observer.
op | The object to describe |
observer | The object to make the description to |
use_media_tags | If non zero then use media tags in the description. |
buf | Buffer that will contain the description |
size | buf's size. |
Definition at line 39 of file legacy_describe.cpp.
References AMULET, ARMOUR, ARROW, BOOTS, BOW, BRACERS, buf, CLOAK, common_ob_describe(), DRINK, FLESH, FOOD, GIRDLE, GLOVES, HELMET, LAMP, give::op, query_name(), RING, SHIELD, SKILL, SKILL_TOOL, and WEAPON.
Referenced by init_ob_methods().
method_ret legacy_ob_process | ( | object * | op | ) |
Definition at line 31 of file process.cpp.
References animate_turning(), AT_PHYSICAL, DISEASE, DOOR, EARTHWALL, FIREWALL, FORCE, GOLEM, hit_player(), HOLE, legacy_animate_trigger(), legacy_move_hole(), legacy_remove_force(), LOCKED_DOOR, METHOD_OK, METHOD_UNHANDLED, move_disease(), move_firewall(), move_player_mover(), move_symptom(), give::op, pets_move_golem(), PLAYERMOVER, POTION_RESIST_EFFECT, regenerate_rod(), remove_door(), remove_locked_door(), ROD, SYMPTOM, TRIGGER_ALTAR, TRIGGER_BUTTON, and TRIGGER_PEDESTAL.
Referenced by init_ob_methods().
void stop_projectile | ( | object * | op | ) |
Handle an arrow or thrown object stopping.
op | The arrow or thrown object that is stopping. |
Definition at line 37 of file projectile.cpp.
References animate::event, EVENT_STOP, events_execute_object_event(), fix_stopped_arrow(), FREE_OBJ_FREE_INVENTORY, object_clear_owner(), object_free(), object_free_drop_inventory(), object_insert_in_map_at(), object_merge(), object_remove(), object_was_destroyed, give::op, SCRIPT_FIX_NOTHING, and CFweardisguise::tag.
Referenced by arrow_type_process(), common_process_projectile(), and thrown_object_type_process().