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

The implementation of mood floor objects. More...

#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
Include dependency graph for mood_floor.c:

Go to the source code of this file.

Functions

static void do_mood_floor (object *op, object *op2)
 Main function for mood floor objects.
void init_type_mood_floor (void)
 Initializer for the mood floor object type.
static method_ret mood_floor_type_process (ob_methods *context, object *op)
 Processes a mood floor.
static method_ret mood_floor_type_trigger (ob_methods *context, object *op, object *cause, int state)
 A mood floor is triggered.

Detailed Description

The implementation of mood floor objects.

Definition in file mood_floor.c.


Function Documentation

static void do_mood_floor ( object *  op,
object *  op2 
) [static]

Main function for mood floor objects.

This routine makes monsters who are standing on the 'mood floor' change their disposition if it is different. If floor is to be triggered must have a speed of zero (default is 1 for all but the charm floor type). by b.t. thomas@nomad.astro.psu.edu

Parameters:
opfloor that activates
op2object that caused op to activate. Should be either op (for floors with speed), or a connected button a player pushed. Must not be NULL. Will be used for charming floors to locate the player the monster will become a pet of.

Definition at line 62 of file mood_floor.c.

References add_friendly_object(), CLEAR_FLAG, FLAG_FRIENDLY, FLAG_MONSTER, FLAG_SLEEP, FLAG_UNAGGRESSIVE, GET_MAP_OB, GOLEM, PETMOVE, PLAYER, QUERY_FLAG, range_golem, remove_friendly_object(), SET_FLAG, and set_owner().

Referenced by mood_floor_type_process(), and mood_floor_type_trigger().

Here is the call graph for this function:

Here is the caller graph for this function:

void init_type_mood_floor ( void  )

Initializer for the mood floor object type.

Definition at line 40 of file mood_floor.c.

References MOOD_FLOOR, mood_floor_type_process(), mood_floor_type_trigger(), register_process(), and register_trigger().

Referenced by register_all_ob_types().

Here is the call graph for this function:

Here is the caller graph for this function:

static method_ret mood_floor_type_process ( ob_methods context,
object *  op 
) [static]

Processes a mood floor.

Parameters:
contextThe method context
opThe mood_floor to process
Return values:
METHOD_OK

Definition at line 144 of file mood_floor.c.

References do_mood_floor(), and METHOD_OK.

Referenced by init_type_mood_floor().

Here is the call graph for this function:

Here is the caller graph for this function:

static method_ret mood_floor_type_trigger ( ob_methods context,
object *  op,
object *  cause,
int  state 
) [static]

A mood floor is triggered.

Parameters:
contextIgnored.
opThe object being triggered
causeIgnored.
stateIgnored.
Return values:
METHOD_OK

Definition at line 157 of file mood_floor.c.

References do_mood_floor(), and METHOD_OK.

Referenced by init_type_mood_floor().

Here is the call graph for this function:

Here is the caller graph for this function: