Crossfire Server, Trunk
|
Go to the source code of this file.
Functions | |
void | add_friendly_object (object *op) |
void | clean_friendly_list (void) |
void | clear_friendly_list (void) |
void | dump_friendly_objects (void) |
objectlink * | get_friends_of (const object *owner) |
object * | get_next_friend (object *current) |
int | is_friendly (const object *op) |
void | remove_friendly_object (object *op) |
Variables | |
static std::vector< std::pair< object *, tag_t > > | friends |
Functions related to relationship management.
Definition in file friend.cpp.
void add_friendly_object | ( | object * | op | ) |
Add a new friendly object to the 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 32 of file friend.cpp.
References friends, is_friendly(), llevError, LOG(), 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(), START_TEST(), 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 80 of file friend.cpp.
References disinfect::count, FLAG_FREED, FLAG_FRIENDLY, friends, say::item, llevDebug, LOG(), and QUERY_FLAG.
Referenced by do_specials(), and START_TEST().
void clear_friendly_list | ( | void | ) |
Totally clear the friendly list.
Definition at line 134 of file friend.cpp.
References friends.
Referenced by free_globals(), and teardown().
void dump_friendly_objects | ( | void | ) |
Dumps all friendly objects. Invoked in DM-mode with dumpfriendlyobjects command.
Definition at line 70 of file friend.cpp.
References friends.
Referenced by command_dumpfriendlyobjects().
objectlink* get_friends_of | ( | const object * | owner | ) |
Get a list of friendly objects for the specified owner.
owner | who to get objects of, may be NULL to get all friendly objects. |
Definition at line 117 of file friend.cpp.
References friends, and guildoracle::list.
Referenced by command_kill_pets(), command_showpets(), get_nearest_player(), pets_attempt_follow(), pets_terminate_all(), and START_TEST().
Get the next object on the friendly list.
current | current object, NULL to get the first item on the list. |
Definition at line 143 of file friend.cpp.
References replace::current, and friends.
Referenced by cfapi_friendlylist_get_next(), cfapi_system_get_object_vector(), and START_TEST().
int is_friendly | ( | const object * | op | ) |
Checks if the given object is already in the friendly list or not
op | item to check |
Definition at line 108 of file friend.cpp.
References friends.
Referenced by add_friendly_object(), cfapi_object_get_property(), cfapi_object_set_property(), and START_TEST().
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 52 of file friend.cpp.
References CLEAR_FLAG, FLAG_FRIENDLY, friends, llevError, LOG(), and give::op.
Referenced by cfapi_object_set_property(), change_object(), command_cast_spell(), command_kill_pets(), do_mood_floor(), enter_map(), 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(), START_TEST(), and use_oratory().
List of all friendly objects, object and its count.
Definition at line 23 of file friend.cpp.
Referenced by add_friendly_object(), clean_friendly_list(), clear_friendly_list(), dump_friendly_objects(), get_friends_of(), get_next_friend(), getFriendlyList(), is_friendly(), and remove_friendly_object().