Atrinik Server  4.0
Functions
container.c File Reference
#include <global.h>
#include <plugin.h>
#include <arch.h>
#include <player.h>
#include <object.h>
#include <object_methods.h>
#include <container.h>
#include <rune.h>
#include <key.h>

Go to the source code of this file.

Functions

bool container_check_magical (object *op, object *container)
 
static void container_open (object *applier, object *op)
 
bool container_close (object *applier, object *op)
 
static int apply_func (object *op, object *applier, int aflags)
 
static void remove_inv_func (object *op)
 
static void remove_map_func (object *op)
 
 OBJECT_TYPE_INIT_DEFINE (container)
 

Detailed Description

Handles code for handling containers.

Author
Alex Tokar

Definition in file container.c.

Function Documentation

static int apply_func ( object op,
object applier,
int  aflags 
)
static

Applies an object.

Parameters
opThe object to apply.
applierThe object that executes the apply action.
aflagsSpecial (always apply/unapply) flags.

Definition at line 263 of file container.c.

bool container_check_magical ( object op,
object container 
)

Check if both objects are magical containers.

Parameters
opObject being put into the container.
containerThe container.
Returns
True if both op and container are magical containers, false otherwise.

Definition at line 53 of file container.c.

bool container_close ( object applier,
object op 
)

Close a container and remove player from the container's linked list.

Parameters
applierThe player. If NULL, we will unlink all players from the container 'op'.
opThe container object. If NULL, unlink the applier's current container.
Returns
True if the container was closed and has no players left looking into the container, false otherwise.

Definition at line 176 of file container.c.

static void container_open ( object applier,
object op 
)
static

Actually open a container, springing traps/monsters, and doing the linked list linking.

Parameters
applierPlayer that is opening the container.
opThe container.

Definition at line 74 of file container.c.

OBJECT_TYPE_INIT_DEFINE ( container  )

Initialize the container type object methods.

Definition at line 435 of file container.c.

static void remove_inv_func ( object op)
static

Called when an object is removed from inventory.

Parameters
opThe object being removed.

Definition at line 420 of file container.c.

static void remove_map_func ( object op)
static

Called when an object is removed from map.

Parameters
opThe object being removed.

Definition at line 427 of file container.c.