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

Go to the source code of this file.


static method_ret book_type_apply (ob_methods *context, object *op, object *applier, int aflags)
void init_type_book (void)

Detailed Description

The implementation of the Book class of objects.

Definition in file book.c.

Function Documentation

◆ book_type_apply()

static method_ret book_type_apply ( ob_methods context,
object *  op,
object *  applier,
int  aflags 

Handles reading a regular (ie not containing a spell) book.

contextThe method context
opThe Book to apply
applierThe object attempting to apply the Book
aflagsSpecial flags (always apply/unapply)
Return values
METHOD_UNHANDLEDIf the Book wasn't read by a player
METHOD_OKIf applier was a player

Definition at line 51 of file book.c.

References calc_skill_exp(), change_exp(), draw_ext_info(), draw_ext_info_format(), esrv_update_item(), find_skill_by_name(), FLAG_BLIND, FLAG_IDENTIFIED, FLAG_NO_SKILL_IDENT, FLAG_WIZ, get_readable_message_type(), knowledge_read(), MAX_BUF, readable_message_type::message_subtype, readable_message_type::message_type, METHOD_OK, METHOD_UNHANDLED, MSG_TYPE_APPLY, MSG_TYPE_APPLY_ERROR, MSG_TYPE_APPLY_FAILURE, NDI_NAVY, NDI_UNIQUE, ob_describe(), QUERY_FLAG, SET_FLAG, UPD_FLAGS, and UPD_NAME.

Referenced by init_type_book().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init_type_book()

void init_type_book ( void  )

Initializer for the BOOK object type.

Definition at line 38 of file book.c.

References book_type_apply(), and register_apply().

Referenced by register_all_ob_types().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: