Crossfire Server, Branches 1.12
R18729
|
#include <global.h>
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 43 of file friend.c.
References obj::count, first_friendly_object, get_objectlink(), oblnk::id, is_friendly(), llevError, LOG(), obj::name, oblnk::next, and oblnk::ob.
Referenced by add_player(), animate_weapon(), cfapi_object_set_property(), do_mood_floor(), fix_summon_pet(), hit_player(), mood_change(), polymorph_living(), receive_play_again(), summon_golem(), summon_object(), and use_oratory().
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 124 of file friend.c.
References first_friendly_object, FLAG_FREED, FLAG_FRIENDLY, llevDebug, LOG(), oblnk::next, 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 113 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 157 of file friend.c.
References first_friendly_object, oblnk::next, and oblnk::ob.
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 69 of file friend.c.
References CLEAR_FLAG, obj::count, first_friendly_object, FLAG_FRIENDLY, llevError, LOG(), obj::name, oblnk::next, and oblnk::ob.
Referenced by cfapi_object_set_property(), clear_object(), command_cast_spell(), command_kill_pets(), do_mood_floor(), enter_map(), free_object2(), get_nearest_player(), get_pet_enemy(), hit_player(), kill_object(), kill_player(), mood_change(), move_golem(), move_monster(), pet_move(), polymorph_living(), receive_play_again(), remove_all_pets(), terminate_all_pets(), and use_oratory().