Atrinik Server 2.5
Functions
server/holy.c File Reference
#include <global.h>

Go to the source code of this file.

Functions

static godlinkinit_godslist ()
static void add_god_to_list (archetype *god_arch)
void init_gods ()
godlinkget_rand_god ()
objectpntr_to_god_obj (godlink *godlnk)
void free_all_god ()
void dump_gods ()

Detailed Description

God related common functions.

Definition in file holy.c.


Function Documentation

static void add_god_to_list ( archetype god_arch) [static]

Adds specified god to linked list, giving it an ID.

Parameters:
god_archGod to add. If NULL, will log an error.

Definition at line 81 of file holy.c.

void dump_gods ( )

Prints all gods using LOG().

Definition at line 173 of file holy.c.

void free_all_god ( )

Frees all god information.

Definition at line 157 of file holy.c.

godlink* get_rand_god ( )

Returns a random god.

Returns:
A random god, or NULL if no god was found.

Definition at line 116 of file holy.c.

void init_gods ( )

This takes a look at all of the archetypes to find the objects which correspond to the gods.

Definition at line 61 of file holy.c.

static godlink * init_godslist ( ) [static]

Initializes a god structure.

Definition at line 37 of file holy.c.

object* pntr_to_god_obj ( godlink godlnk)

Returns a pointer to the object.

We need to be VERY careful about using this, as we are returning a pointer to the archetype::clone object.

Parameters:
godlnkGod to get object.

Definition at line 146 of file holy.c.