Pol  Rev 533
UArmor Class Reference

#include <armor.h>

+ Inheritance diagram for UArmor:
+ Collaboration diagram for UArmor:

List of all members.

Public Member Functions

virtual unsigned short ar () const
virtual Itemclone () const
virtual bool covers (unsigned short layer) const
void set_onhitscript (const std::string &scriptname)
std::set< unsigned short > tmplzones ()

Protected Member Functions

 UArmor (const ArmorDesc &descriptor, const ArmorDesc *permanent_descriptor)
const ArmorDescdescriptor () const
virtual BObjectImpget_script_member (const char *membername) const
virtual BObjectImpget_script_member_id (const int id) const
const ScriptDefonhitscript () const
virtual void printProperties (std::ostream &os) const
virtual void readProperties (ConfigElem &elem)
virtual bool script_isa (unsigned isatype) const
virtual BObjectImpset_script_member (const char *membername, const std::string &value)
 id test
virtual BObjectImpset_script_member (const char *membername, int value)
 id test
virtual BObjectImpset_script_member_id (const int id, const std::string &value)
virtual BObjectImpset_script_member_id (const int id, int value)
 id test

Private Types

typedef Equipment base

Private Attributes

short ar_mod_
ScriptDef onhitscript_
const ArmorDesctmpl

Friends

class Item

Detailed Description

Definition at line 25 of file armor.h.


Member Typedef Documentation

typedef Equipment UArmor::base [private]

Reimplemented from Equipment.

Definition at line 27 of file armor.h.


Constructor & Destructor Documentation

UArmor::UArmor ( const ArmorDesc descriptor,
const ArmorDesc permanent_descriptor 
) [protected]

Definition at line 97 of file armor.cpp.


Member Function Documentation

unsigned short UArmor::ar ( ) const [virtual]

Definition at line 105 of file armor.cpp.

References ArmorDesc::ar, ar_mod_, Equipment::hp_, Equipment::maxhp(), and tmpl.

Referenced by Character::armor_absorb_damage(), Character::attack(), Character::get_hitscript_params(), get_script_member_id(), Item::has_resistance(), NPC::refresh_ar(), and Character::refresh_ar().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Item * UArmor::clone ( ) const [virtual]

Reimplemented from Equipment.

Definition at line 126 of file armor.cpp.

References ar_mod_, Equipment::clone(), onhitscript_, and tmpl.

+ Here is the call graph for this function:

bool UArmor::covers ( unsigned short  layer) const [virtual]

Definition at line 121 of file armor.cpp.

References tmpl, and ArmorDesc::zones.

const ArmorDesc& UArmor::descriptor ( ) const [protected]
BObjectImp * UArmor::get_script_member ( const char *  membername) const [protected, virtual]

Reimplemented from Equipment.

Definition at line 3273 of file uoscrobj.cpp.

References get_script_member_id(), getKnownObjMember(), and ObjMember::id.

+ Here is the call graph for this function:

BObjectImp * UArmor::get_script_member_id ( const int  id) const [protected, virtual]

Reimplemented from Equipment.

Definition at line 3257 of file uoscrobj.cpp.

References ar(), ArmorDesc::ar, ar_mod_, MBR_AR, MBR_AR_BASE, MBR_AR_MOD, MBR_ONHIT_SCRIPT, onhitscript_, ItemDesc::pkg, ScriptDef::relativename(), and tmpl.

Referenced by get_script_member().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const ScriptDef& UArmor::onhitscript ( ) const [protected]
void UArmor::printProperties ( std::ostream &  os) const [protected, virtual]

Reimplemented from Equipment.

Definition at line 135 of file armor.cpp.

References ar_mod_, ArmorDesc::on_hit_script, onhitscript_, pf_endl, ItemDesc::pkg, Equipment::printProperties(), ScriptDef::relativename(), and tmpl.

+ Here is the call graph for this function:

void UArmor::readProperties ( ConfigElem elem) [protected, virtual]

Reimplemented from Equipment.

Definition at line 144 of file armor.cpp.

References ar_mod_, Equipment::readProperties(), ConfigElem::remove_int(), ConfigElem::remove_string(), and set_onhitscript().

+ Here is the call graph for this function:

bool UArmor::script_isa ( unsigned  isatype) const [protected, virtual]

Reimplemented from Equipment.

Definition at line 3725 of file uoscrobj.cpp.

References POLCLASS_ARMOR, and Equipment::script_isa().

+ Here is the call graph for this function:

void UArmor::set_onhitscript ( const std::string &  scriptname)

Definition at line 151 of file armor.cpp.

References ScriptDef::clear(), ScriptDef::config(), Item::itemdesc(), and onhitscript_.

Referenced by readProperties(), and set_script_member_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObjectImp * UArmor::set_script_member ( const char *  membername,
const std::string &  value 
) [protected, virtual]

id test

Reimplemented from Item.

Definition at line 3294 of file uoscrobj.cpp.

References getKnownObjMember(), ObjMember::id, and set_script_member_id().

+ Here is the call graph for this function:

BObjectImp * UArmor::set_script_member ( const char *  membername,
int  value 
) [protected, virtual]

id test

Reimplemented from Equipment.

Definition at line 3327 of file uoscrobj.cpp.

References getKnownObjMember(), ObjMember::id, and set_script_member_id().

+ Here is the call graph for this function:

BObjectImp * UArmor::set_script_member_id ( const int  id,
const std::string &  value 
) [protected, virtual]

Reimplemented from Item.

Definition at line 3282 of file uoscrobj.cpp.

References MBR_ONHIT_SCRIPT, and set_onhitscript().

Referenced by set_script_member(), and set_script_member_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObjectImp * UArmor::set_script_member_id ( const int  id,
int  value 
) [protected, virtual]

id test

Reimplemented from Equipment.

Definition at line 3303 of file uoscrobj.cpp.

References ar_mod_, chr_from_wornitems(), Item::container, IsCharacter(), MBR_AR_MOD, ARUpdater::on_change(), UObject::serial, and set_script_member_id().

+ Here is the call graph for this function:

std::set< unsigned short > UArmor::tmplzones ( ) [inline]

Definition at line 61 of file armor.h.

References tmpl, and ArmorDesc::zones.

Referenced by NPC::refresh_ar(), and Character::refresh_ar().

+ Here is the caller graph for this function:


Friends And Related Function Documentation

friend class Item [friend]

Definition at line 47 of file armor.h.


Member Data Documentation

short UArmor::ar_mod_ [private]

Definition at line 58 of file armor.h.

Referenced by clone(), get_script_member_id(), printProperties(), and set_onhitscript().

const ArmorDesc* UArmor::tmpl [private]

Definition at line 55 of file armor.h.

Referenced by ar(), clone(), covers(), get_script_member_id(), printProperties(), and tmplzones().


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