Crossfire Server, Branch 1.12  R12190
Functions
friend.c File Reference

Functions related to relationship management. More...

#include <global.h>
Include dependency graph for friend.c:

Go to the source code of this file.

Functions

void add_friendly_object (object *op)
 Add a new friendly object to the linked list of friendly objects.
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)
void dump_friendly_objects (void)
 Dumps all friendly objects.
int is_friendly (const object *op)
 Checks if the given object is already in the friendly list or not Lauwenmark - 31/07/05.
void remove_friendly_object (object *op)
 Removes the specified object from the linked list of friendly objects.

Detailed Description

Functions related to relationship management.

Definition in file friend.c.


Function Documentation

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.

Parameters:
opobject to add to the list.

Definition at line 43 of file friend.c.

References first_friendly_object, get_objectlink(), is_friendly(), llevError, and LOG().

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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(), and QUERY_FLAG.

Referenced by do_specials().

Here is the call graph for this function:

Here is the caller graph for this function:

void dump_friendly_objects ( void  )

Dumps all friendly objects.

Invoked in DM-mode with dumpfriendlyobjects command.

Note:
logs at the error level.

Definition at line 113 of file friend.c.

References first_friendly_object, llevError, and LOG().

Referenced by command_dumpfriendlyobjects().

Here is the call graph for this function:

Here is the caller graph for this function:

int is_friendly ( const object *  op)

Checks if the given object is already in the friendly list or not Lauwenmark - 31/07/05.

Parameters:
opitem to check
Returns:
1 if on friendly list, 0 else

Definition at line 157 of file friend.c.

References first_friendly_object.

Referenced by add_friendly_object(), cfapi_object_get_property(), and cfapi_object_set_property().

Here is the caller graph for this function:

void remove_friendly_object ( object *  op)

Removes the specified object from the linked list of friendly objects.

Parameters:
opobject to remove from list.

Definition at line 69 of file friend.c.

References CLEAR_FLAG, first_friendly_object, FLAG_FRIENDLY, llevError, and LOG().

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().

Here is the call graph for this function:

Here is the caller graph for this function: