Crossfire Server, Trunk
|
Go to the source code of this file.
Functions | |
void | add_friendly_object (object *op) |
void | clean_friendly_list (void) |
void | dump_friendly_objects (void) |
int | is_friendly (const object *op) |
void | remove_friendly_object (object *op) |
Functions related to relationship management.
Definition in file friend.c.
void add_friendly_object | ( | object * | op | ) |
Add a new friendly object to the linked list of friendly objects. Will log an error if the object is already on that list.
op | object to add to the list. |
Definition at line 30 of file friend.c.
References first_friendly_object, get_objectlink(), oblnk::id, is_friendly(), llevError, LOG(), oblnk::next, oblnk::ob, and give::op.
Referenced by add_player(), animate_weapon(), cfapi_object_set_property(), change_object(), do_mood_floor(), fix_summon_pet(), mood_change(), pets_summon_golem(), pets_summon_object(), polymorph_living(), receive_play_again(), use_oratory(), and while().
void clean_friendly_list | ( | void | ) |
It traverses the friendly list removing objects that should not be here (ie, do not have friendly flag set, freed, etc)
Definition at line 111 of file friend.c.
References disinfect::count, first_friendly_object, FLAG_FREED, FLAG_FRIENDLY, llevDebug, LOG(), give::next, oblnk::next, guildjoin::ob, and QUERY_FLAG.
Referenced by do_specials().
void dump_friendly_objects | ( | void | ) |
Dumps all friendly objects. Invoked in DM-mode with dumpfriendlyobjects command.
Definition at line 100 of file friend.c.
References obj::count, first_friendly_object, llevError, LOG(), obj::name, oblnk::next, and oblnk::ob.
Referenced by command_dumpfriendlyobjects().
int is_friendly | ( | const object * | op | ) |
Checks if the given object is already in the friendly list or not Lauwenmark - 31/07/05
op | item to check |
Definition at line 144 of file friend.c.
References first_friendly_object, oblnk::next, oblnk::ob, and give::op.
Referenced by add_friendly_object(), cfapi_object_get_property(), and cfapi_object_set_property().
void remove_friendly_object | ( | object * | op | ) |
Removes the specified object from the linked list of friendly objects.
op | object to remove from list. |
Definition at line 56 of file friend.c.
References CLEAR_FLAG, obj::count, first_friendly_object, FLAG_FRIENDLY, llevError, LOG(), give::next, oblnk::next, guildjoin::ob, oblnk::ob, and give::op.
Referenced by cfapi_object_set_property(), change_object(), command_cast_spell(), command_kill_pets(), do_mood_floor(), enter_map(), get_nearest_player(), hit_player(), kill_object(), kill_player_permadeath(), monster_move(), mood_change(), object_clear(), object_free(), pets_attempt_follow(), pets_get_enemy(), pets_move(), pets_move_golem(), pets_terminate_all(), polymorph_living(), receive_play_again(), and use_oratory().