Atrinik Server 2.5
Functions
types/door.c File Reference
#include <global.h>

Go to the source code of this file.

Functions

int open_door (object *op, mapstruct *m, int x, int y, int mode)
objectfind_key (object *op, object *door)
void open_locked_door (object *op, object *opener)
void close_locked_door (object *op)

Detailed Description

Door related code.

Definition in file door.c.


Function Documentation

void close_locked_door ( object op)

Close a locked door that has been opened.

Parameters:
opDoor object to close.

Definition at line 234 of file door.c.

object* find_key ( object op,
object door 
)

Search object for the needed key to open a door/container.

Parameters:
opObject to search in.
doorThe object to find the key for.
Returns:
The key pointer if found, NULL otherwise.

Definition at line 102 of file door.c.

int open_door ( object op,
mapstruct m,
int  x,
int  y,
int  mode 
)

Open a door (or check whether it can be opened).

Parameters:
opObject which will open the door.
mMap where the door is.
xX position of the door.
yY position of the door.
mode
  • 0: Check but don't open the door.
  • 1: Check and open the door if possible.
Returns:
1 if door was opened (or can be), 0 if not and is not possible to open.

Definition at line 42 of file door.c.

void open_locked_door ( object op,
object opener 
)

Open a locked door. This function checks to see if there are similar locked doors nearby, if the door to open has FLAG_CURSED (cursed 1) set. The nearby doors must also have FLAG_CURSED set.

Parameters:
opDoor object to open.
openerObject opening the door.

Definition at line 135 of file door.c.