Atrinik Server  4.0
Functions
rune.c File Reference
#include <global.h>
#include <player.h>
#include <object.h>
#include <object_methods.h>
#include <disease.h>
#include <rune.h>

Go to the source code of this file.

Functions

void rune_spring (object *op, object *victim)
 
static int move_on_func (object *op, object *victim, object *originator, int state)
 
static int process_treasure_func (object *op, object **ret, int difficulty, treasure_affinity_t *affinity, int flags)
 
 OBJECT_TYPE_INIT_DEFINE (rune)
 

Detailed Description

Handles code for runes.

Author
Alex Tokar

Definition in file rune.c.

Function Documentation

static int move_on_func ( object op,
object victim,
object originator,
int  state 
)
static

Triggered when an object moves moves off a square and when object moves onto a square.

Parameters
opThe object that wants to catch this event.
victimThe object moving.
originatorThe object that is the cause of the move.
state1 if the object is moving onto a square, 0 if moving off a square.

Definition at line 135 of file rune.c.

OBJECT_TYPE_INIT_DEFINE ( rune  )

Initialize the rune type object methods.

Definition at line 170 of file rune.c.

static int process_treasure_func ( object op,
object **  ret,
int  difficulty,
treasure_affinity_t *  affinity,
int  flags 
)
static

Process generated treasure.

Parameters
opObject to process.
[out]retIf the function returns OBJECT_METHOD_OK, this variable will contain the processed treasure object, which may be different from 'op' (which may be destroyed). Indeterminate on any other return value.
difficultyDifficulty level.
affinityTreasure affinity.
flagsA combination of GT_xxx flags.
Returns
One of Object method return values.
Warning
If OBJECT_METHOD_ERROR is returned from this function, it is possible that the original object has been destroyed and thus any further processing should stop.

Definition at line 146 of file rune.c.

void rune_spring ( object op,
object victim 
)

Springs a rune.

Parameters
opThe rune.
victimVictim of the rune.

Definition at line 48 of file rune.c.