Crossfire Server, Trunk  R20708
treasure.c File Reference
#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
+ Include dependency graph for treasure.c:

Go to the source code of this file.


void init_type_treasure (void)
static method_ret treasure_type_apply (ob_methods *context, object *op, object *applier, int aflags)

Detailed Description

The implementation of the Treasure class of objects.

Definition in file treasure.c.

Function Documentation

void init_type_treasure ( void  )

Initializer for the TREASURE object type.

Definition at line 38 of file treasure.c.

References register_apply(), TREASURE, and treasure_type_apply().

Referenced by register_all_ob_types().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static method_ret treasure_type_apply ( ob_methods context,
object op,
object applier,
int  aflags 

Attempts to apply treasure.

contextThe method context
opThe treasure to apply
applierThe object attempting to apply the treasure. Ignored unless a player
aflagsSpecial flags (always apply/unapply)
The return value is always METHOD_OK

Definition at line 51 of file treasure.c.

References obj::count, draw_ext_info(), draw_ext_info_format(), FLAG_ALIVE, INS_BELOW_ORIGINATOR, obj::inv, obj::invisible, obj::level, obj::map, MAX_BUF, METHOD_OK, MSG_TYPE_APPLY, MSG_TYPE_APPLY_FAILURE, MSG_TYPE_APPLY_SUCCESS, NDI_UNIQUE, object_decrease_nrof_by_one, object_insert_in_map_at(), object_remove(), object_was_destroyed, PLAYER, QUERY_FLAG, query_name(), RUNE, spring_trap(), TRAP, obj::type, obj::x, and obj::y.

Referenced by init_type_treasure().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: