Pol  Rev 533
Spellbook Class Reference

#include <spelbook.h>

+ Inheritance diagram for Spellbook:
+ Collaboration diagram for Spellbook:

List of all members.

Public Member Functions

 Spellbook (const SpellbookDesc &descriptor)
virtual ~Spellbook ()
virtual void add (Item *item)
bool add_spellid (unsigned int spellid)
virtual void double_click (Client *client)
bool has_spellid (unsigned int spellid) const
virtual void printOn (std::ostream &os) const
virtual void printProperties (std::ostream &os) const
virtual void printSelfOn (std::ostream &os) const
virtual void readProperties (ConfigElem &elem)
bool remove_spellid (unsigned int spellid)
virtual bool script_isa (unsigned isatype) const
virtual BObjectImpscript_method (const char *methodname, Executor &ex)
 id test
virtual BObjectImpscript_method_id (const int id, Executor &ex)
void send_book_old (Client *client)

Public Attributes

u8 bitwise_contents [8]
u8 spell_school

Private Member Functions

virtual void add_bulk (int item_count_delta, int weight_delta)
void calc_current_bitwise_contents ()
virtual bool can_add (const Item &item) const

Friends

class Item

Detailed Description

Definition at line 24 of file spelbook.h.


Constructor & Destructor Documentation

Spellbook::Spellbook ( const SpellbookDesc descriptor) [explicit]

Definition at line 31 of file spelbook.cpp.

References bitwise_contents, spell_school, and SpellbookDesc::spelltype.

Spellbook::~Spellbook ( ) [virtual]

Definition at line 56 of file spelbook.cpp.


Member Function Documentation

void Spellbook::add ( Item item) [virtual]

Reimplemented from UContainer.

Definition at line 248 of file spelbook.cpp.

References bitwise_contents, convert_objtype_to_spellnum(), UObject::destroy(), UObject::objtype_, and spell_school.

+ Here is the call graph for this function:

void Spellbook::add_bulk ( int  item_count_delta,
int  weight_delta 
) [private, virtual]

Reimplemented from UContainer.

Definition at line 242 of file spelbook.cpp.

bool Spellbook::add_spellid ( unsigned int  spellid)

Definition at line 197 of file spelbook.cpp.

References bitwise_contents, and has_spellid().

Referenced by script_method_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 289 of file spelbook.cpp.

References UContainer::begin(), bitwise_contents, convert_objtype_to_spellnum(), UObject::destroy(), UContainer::end(), GET_ITEM_PTR, UObject::objtype_, and spell_school.

Referenced by double_click().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Spellbook::can_add ( const Item item) const [private, virtual]

Reimplemented from UContainer.

Definition at line 221 of file spelbook.cpp.

References bitwise_contents, convert_objtype_to_spellnum(), UObject::objtype_, spell_school, and spell_scroll_objtype_limits.

+ Here is the call graph for this function:

bool Spellbook::has_spellid ( unsigned int  spellid) const

Definition at line 140 of file spelbook.cpp.

References bitwise_contents, and spell_school.

Referenced by add_spellid(), knows_spell(), remove_spellid(), and script_method_id().

+ Here is the caller graph for this function:

void Spellbook::printOn ( std::ostream &  os) const [virtual]

Reimplemented from UContainer.

Definition at line 279 of file spelbook.cpp.

References UContainer::printContents(), and UObject::printOn().

+ Here is the call graph for this function:

void Spellbook::printProperties ( std::ostream &  os) const [virtual]

Reimplemented from ULockable.

Definition at line 259 of file spelbook.cpp.

References bitwise_contents, pf_endl, and ULockable::printProperties().

+ Here is the call graph for this function:

void Spellbook::printSelfOn ( std::ostream &  os) const [virtual]

Reimplemented from UContainer.

Definition at line 284 of file spelbook.cpp.

References UObject::printOn().

+ Here is the call graph for this function:

void Spellbook::readProperties ( ConfigElem elem) [virtual]

Reimplemented from UContainer.

Definition at line 267 of file spelbook.cpp.

References bitwise_contents, ULockable::readProperties(), and ConfigElem::remove_ushort().

+ Here is the call graph for this function:

bool Spellbook::remove_spellid ( unsigned int  spellid)

Definition at line 173 of file spelbook.cpp.

References bitwise_contents, and has_spellid().

Referenced by script_method_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Spellbook::script_isa ( unsigned  isatype) const [virtual]

Reimplemented from UContainer.

Definition at line 3695 of file uoscrobj.cpp.

References POLCLASS_SPELLBOOK, and ULockable::script_isa().

+ Here is the call graph for this function:

BObjectImp * Spellbook::script_method ( const char *  methodname,
Executor ex 
) [virtual]

id test

Reimplemented from Item.

Definition at line 2678 of file uoscrobj.cpp.

References getKnownObjMethod(), ObjMethod::id, and script_method_id().

+ Here is the call graph for this function:

BObjectImp * Spellbook::script_method_id ( const int  id,
Executor ex 
) [virtual]

Reimplemented from Item.

Definition at line 2590 of file uoscrobj.cpp.

References add_spellid(), ObjArray::addElement(), Executor::getParam(), has_spellid(), Executor::hasParams(), MTH_ADDSPELL, MTH_HASSPELL, MTH_REMOVESPELL, MTH_SPELLS, remove_spellid(), Item::script_method_id(), and spell_school.

Referenced by script_method().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Spellbook::send_book_old ( Client client)

Definition at line 341 of file spelbook.cpp.

References ULockable::locked_, Client::pause(), Client::restart(), send_open_gump(), send_spellbook_contents(), and send_sysmessage().

Referenced by double_click().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


Friends And Related Function Documentation

friend class Item [friend]

Reimplemented from ULockable.

Definition at line 52 of file spelbook.h.


Member Data Documentation


The documentation for this class was generated from the following files: