[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/property_tracker.c

Property tracker.

Written by Taffyd

Started 10/06/99 3:42AM

Inherits

This class inherits the following classes /std/object.c

Includes

This class includes the following files /include/player_handler.h, /include/login.h and /include/login_handler.h

Method index

Public Functions

These are functions that everyone can access.

add_invalid_property
varargs int add_invalid_property(string property,
                                 mixed func,
                                 mixed obj)

This function allows a new invalid property to be added to the list of invalid ones. The last two parameters are used so that you can add a callback if you want to convert a property over to the quest handler or whatever. They are optional.

Parameters:
property - the property name to be added
func - this parameter specifies the name of the function to be called when the property is removed
obj - this parameter specifies the path of the object on which func is called when the property is removed

Returns:
1 if the property was added as invalid, 0 if it was not.

Example:
add_invalid_property( "womble frog" )

add_invalid_property( "grave_digger", "convert_property", "/d/sur/Nowhere/chars/isabel" )

check_properties
void check_properties(mixed person,
                      string type)

This method is called by the login handler every time someone logs onto the MUD. It checks through any properties that they have, and removes them if they are marked as invalid.

If a property function was set, then this function is called now when the property is removed. It is passed three parameters, string property, object player, and mixed property_data.



Parameters:
person - the person who is logging on
type - the type of login event. Only LOGIN events are used by this object.

See also:
/include/login.h and /obj/handlers/login_handler.c


convert_no_score
void convert_no_score(string property,
                      object who,
                      mixed data)
query_invalid_properties
string query_invalid_properties()

This returns a list of all the properties that are marked as invalid.

Returns:
an array of invalid properties


remove_invalid_property
int remove_invalid_property(string property)
remove_warmth
int remove_warmth(string property,
                  object who,
                  mixed data)
reset_data
void reset_data()
save_file
void save_file()