[Package Index | Mudlib Index | Effect Index]
See also:
tidy_order
.c
.
int add_wizard(string order, string wizard)Add a wizard to an order. This will not add a wizard to the guild.
void fill_vacancies(string order)This will fill the spaces cleaned out by the cleanup functions. It will move the array of wizards upwards to fill the empty spots and place those who were on the top on the bottom of the list. occupancies is an array of the number of spots available in the given order
mixed * find_wizard(string wizard)This function will find any wizard regardless of which order they are in. It is an expensive function since it may have to check many orders and hence load several data files. It is used by the wizards guild object to find a wizard who was once inactive but who has returned ie. it's called fairly infrequently.
int get_data_file(string order)Checks to see if the order entered is a valid order. If not, writes an error to the log file. If it is a valid order, the order's data file is loaded.
void init_data(string order)Called by get_data_file resets the values of wizard_details and clears the cache of wizards remembered to make typing 'who wizards' less memory intensive. Each element of wizard_details contains the details for the corresponding wizard. These details are: wizard's level, a number from 0 to 8 wizard's time of advancement, a number wizard's rating, a number
int * query_capacities(string order)List how many spots are availible for wizards to occupy in a given order.
int query_capacity(string order, int which)List how many spots are availible for wizards to occupy in a given order, at a given level.
int * query_occupancies(string order)This method returns the number of wizards at each level in a given order
string * query_occupiers(string order, int level)This method returns the wizards by name at the specified level in a given order.
string query_order_name(string order)Function to find out the full name of an order.
string query_order_room(string order)An order can have a room that is informed when a wizard is promoted or demoted. This function returns the filename of that room if there is one.
string * query_orders()List all the orders.
mixed * query_wizard_details(string order)Displays the contents of the wizard_details array.
int query_wizard_level(string order, string wizard)Returns the wizard's order level if you know the order and the wizard
int query_wizard_rating(string order, string wizard)Returns the wizard's rating with the order and the wizard
int query_wizard_time(string order, string wizard)Returns the time at which the wizard last died or was demoted.
string * query_wizards(string order)Lists all the wizards in an order.
int remove_wizard(string order, string wizard)Remove a wizard from an order. This will be called by cleanup also This will happen if the player refreshes, gets deleted, etc.
void save_data_file(string order)Saves the data file for the order.
void set_capacity(string order, int which, int number)Change the number of spots availible for wizards to occupy in a given order.
void set_order_name(string order, string new_full_name)Set the full name of the order.
set_order_name("silver_star", "the Brothers of the Silver Star");
void set_order_room(string order, string new_order_room)Set the orders room.
void set_wizard_rating(string order, string wizard, int rating)Set the rating of a given wizard.
void tidy_order(string order, int i)This function is called by create() to tidy the order. It calls itself on a delayed callout gradually working through each wizard in each order and demoting those that need demoting.
void wizard_died(string order, string wizard)Clean up function! Demotes the wizard at death, for inactivity, removes them if they're no longer wizards, or have become creators. Writes errors to the log file. Contains debugging tools.