Crossfire Server, Trunk
|
#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
Go to the source code of this file.
Functions | |
static void | do_mood_floor (object *op, object *op2) |
void | init_type_mood_floor (void) |
static method_ret | mood_floor_type_process (object *op) |
static method_ret | mood_floor_type_trigger (object *op, object *cause, int state) |
The implementation of mood floor objects.
Definition in file mood_floor.cpp.
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. thoma s@no mad.a stro .psu. edu
op | floor that activates |
op2 | object 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.cpp.
References object::above, add_friendly_object(), CLEAR_FLAG, object::contr, FLAG_FRIENDLY, FLAG_MONSTER, FLAG_SLEEP, FLAG_UNAGGRESSIVE, GET_MAP_OB, GOLEM, player::golem_count, llevError, LOG(), object::map, map_find_by_flag(), object_clear_owner(), object_get_owner(), object_set_enemy(), object_set_owner(), object_update_speed(), give::op, PETMOVE, PLAYER, QUERY_FLAG, range_golem, player::ranges, remove_friendly_object(), SET_FLAG, Ice::tmp, object::type, object::x, and object::y.
Referenced by mood_floor_type_process(), and mood_floor_type_trigger().
void init_type_mood_floor | ( | void | ) |
Initializer for the mood floor object type.
Definition at line 40 of file mood_floor.cpp.
References MOOD_FLOOR, mood_floor_type_process(), mood_floor_type_trigger(), register_process(), and register_trigger().
Referenced by register_all_ob_types().
|
static |
Processes a mood floor.
op | The mood_floor to process |
METHOD_OK |
Definition at line 151 of file mood_floor.cpp.
References do_mood_floor(), METHOD_OK, and give::op.
Referenced by init_type_mood_floor().
|
static |
A mood floor is triggered.
op | The object being triggered |
cause | Ignored. |
state | Ignored. |
METHOD_OK |
Definition at line 163 of file mood_floor.cpp.
References do_mood_floor(), METHOD_OK, give::op, dragon::state, and nlohmann::detail::void().
Referenced by init_type_mood_floor().