[Package Index | Mudlib Index | Effect Index]
See also:
help::effects
.c
.
void add_effect(string eff, mixed arg)This method adds an effect onto the object. RThe arg is passed directly onto the function 'begining' on the effect object. If the result is non-zero then the return value of the begining function is used instead of the arg and stored away. If an effect of the same type is already on the object then the function 'merge_effects' will be called. If it returns a non-zero value then the arg for the initial effect will be updated to the new value, otherwise both effects will run with different arguments.
object affected_object()This method returns the outer most shadow on this object. This is useful for making sure functions get calklked right through the shadow list. If there are no objects being shadows, this_object() is returned.
varargs int * all_expected_ees(string func_name, int * enums)Returns the time until the next event that will call func_name. If enums is undefined, the event is searched for in this effect, otherwise the event is searched for in the specified effect(s). This returns the a list of the time in seconds until the function will be called in the effect(s) specified. NB: this is not the time *between* calls, but the time from Right Now until each call. If no outstanding calls to the function are found, an empty array is returned.
mixed arg_of(int enum)This method returns the current argument associated with the given effect number.
void delete_effect(int i)This removes an effect from the player. It uses the enum as returned from sid to enum. This is the number you see in the stat of the object next to the effect.
string eff_of(int enum)This method returns the effect object for the given effect number.
void effect_freeze()This method freezes all the current effects so that they do not continue to be processed. Basicly it removes the call_out for the effect_timer(). It also ensures the intrval for the immediately pending effect is correct.
void effect_unfreeze()This restarts the internal call_out.
void effects_desting()Called when an object is dested. Calls the desting method on all the effects.
int * effects_matching(string eff)This method returns an array of effects matching the classification. The start part of the classification is used to match, so passing "npc." into this function will match all the effects which modify how an npc functions.
void effects_quiting()Called when a player actually quits. Calls the quitting method on all the effects.
void effects_thru_death()This method removes all the effects as we die. It calls the function survive_death() on the effect objects themselves to determine if they should be kept when the living dies.
int enum_to_sid(int enum)This method turns an effect number into an effect id.
varargs int expected_ee(string func_name, int enum)Returns the time until the next event that will call func_name. If enum is undefined, the event is searched for in this effect, otherwise the event is searched for in the specified effect. If no outstanding calls to the function are found, -1 is returned.
int expected_tt(int flag, int new_enum)This method returns the time until any EE_REMOVE effect is expected to occur. It will return --1 if no remove event is scheduled. If the flag is not set to true, the the current enum is checked, otherwise the new_enum is checked.
int query_current_effect_enum()This method returns the current enum.
int query_logging_effects()
void reset_effects()This method removes all the current effects off the object and sets everything back to the initial state.
void set_arg_of(int enum, mixed newarg)This sets the argument of the given effect to a new value.
void set_logging_effects(int i)
int sid_to_enum(int sid)This method returns the effect number for the given effect id. The effect number is an internal nhandle used by delete_effect() arg_of() set_arg_of() functions. "id" is passed into the begining/end etc functions on the effect object.
varargs void submit_ee(mixed fun, mixed interval, int flags, mixed event_args)This submits an effect event schedule. It will call "function name" in your effect object after the interval specified in interval_spec, with behaviour modified by flags. Addtional args may optionally be sent to "function name" as well. If none are passed, args == 0. interval_spec can be one of:
Only one EE_REMOVE can be in place at a time. Subsequent EE_REMOVEs will wipe previous ones.
NB: submit_ee can ONLY be called from the effect object itself in the
course of a beginning/handler/end call, or from the effect shadow.
varargs void submit_ee2(int enum, mixed fun, mixed interval, int flags, mixed event_args)This submits an effect event for a specific effect. Apart from this it is the same as submit_ee()
void set_eeq(mixed * args)This method is used to force the effects setup in the object to be a specified value. THis is used in the effects effect which sets up effects on someone using a shadow. This should only be used on startup.
void set_effs(mixed * args)This method is used to force the effects setup in the object to be a specified value. THis is used in the effects effect which sets up effects on someone using a shadow. This should only be used on startup.
class effect_data { int current_enum; int next_id; int next_event_time; class effect_shadow * shadows; }
class effect_event { int inctime; mixed func; int eff_ob_num; mixed interval; int flags; mixed eff_ev_args; }
class effect_shadow { object shad_ob; int idnum; }