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

Go to the source code of this file.

Functions

static objectspawn_monster (object *monster, object *spawn_point_ob, int range)
static int spawn_point_can_spawn (mapstruct *map, object *monster, int darkness)
static void insert_spawn_monster_loot (object *op, object *monster, object *tmp)
void spawn_point (object *op)

Detailed Description

Handles code for spawn points.

Definition in file spawn_point.c.


Function Documentation

static void insert_spawn_monster_loot ( object op,
object monster,
object tmp 
) [static]

Insert a copy of all items the spawn point monster has to the new monster. Takes care about random drop objects.

This will recursively call itself if the item to put to the new monster has an inventory.

Usually these items are put from the map maker inside the spawn monster inventory. Remember that these are additional items to the treasures list ones.

Parameters:
opThe spawn point object
monsterThe object where to put the copy of items to
tmpThe inventory pointer where we are copying the items from

Definition at line 256 of file spawn_point.c.

static object* spawn_monster ( object monster,
object spawn_point_ob,
int  range 
) [static]

Actually spawn the monster.

Parameters:
monsterMonster to generate.
spawn_pointSpawn point.
rangeMaximum range the monster can be spawned away.
Returns:
The generated monster, NULL on failure.

Definition at line 38 of file spawn_point.c.

void spawn_point ( object op)

Main spawn point processing function.

Parameters:
opSpawn point to process.

Definition at line 307 of file spawn_point.c.

static int spawn_point_can_spawn ( mapstruct map,
object monster,
int  darkness 
) [inline, static]

Check whether monster can be spawned, depending on the spawn point map's darkness and other factors.

Parameters:
mapSpawn point's map.
monsterThe monster to check.
darknessDarkness the monster may spawn int.
Returns:
1 if the monster can be spawned, 0 otherwise.

Definition at line 152 of file spawn_point.c.