Pol  Rev 533
ItemDesc Class Reference

#include <itemdesc.h>

+ Inheritance diagram for ItemDesc:
+ Collaboration diagram for ItemDesc:

List of all members.

Public Types

enum  Movable { UNMOVABLE, MOVABLE, DEFAULT }
enum  Type {
  ITEMDESC, CONTAINERDESC, DOORDESC, WEAPONDESC,
  ARMORDESC, BOATDESC, HOUSEDESC, SPELLBOOKDESC,
  SPELLSCROLLDESC, MAPDESC
}

Public Member Functions

 ItemDesc (u32 objtype, ConfigElem &elem, Type type, const Package *pkg)
 ItemDesc (Type type)
virtual ~ItemDesc ()
bool default_movable () const
std::string objtype_description () const
virtual void PopulateStruct (BStruct *descriptor) const
void unload_scripts ()

Static Public Member Functions

static ItemDesccreate (ConfigElem &elem, const Package *pkg)

Public Attributes

unsigned short base_str_req
bool blocks_casting_if_in_hand
bool can_use_while_frozen
bool can_use_while_paralyzed
u16 color
ScriptDef control_script
ScriptDef create_script
unsigned decay_time
bool decays_on_multis
std::string desc
ScriptDef destroy_script
unsigned short doubleclick_range
ElementDamages element_damage
Resistances element_resist
std::string equip_script
u8 facing
bool ghosts_can_use
u16 graphic
std::set< std::string > ignore_cprops
bool invisible
bool lockable
ExportScriptmethod_script
enum ItemDesc::Movable movable
u16 multiid
bool newbie
u32 objtype
std::string objtypename
ScriptDef on_use_script
const Packagepkg
PropertyList props
double quality
bool requires_attention
Dice resist_dice
std::vector< ResourceComponentresources
unsigned short stack_limit
std::string tooltip
Type type
std::string unequip_script
bool use_requires_los
unsigned int vendor_buys_for
unsigned int vendor_sells_for
ScriptDef walk_on_script
int weightdiv
int weightmult

Detailed Description

Definition at line 40 of file itemdesc.h.


Member Enumeration Documentation

Enumerator:
UNMOVABLE 
MOVABLE 
DEFAULT 

Definition at line 91 of file itemdesc.h.

Enumerator:
ITEMDESC 
CONTAINERDESC 
DOORDESC 
WEAPONDESC 
ARMORDESC 
BOATDESC 
HOUSEDESC 
SPELLBOOKDESC 
SPELLSCROLLDESC 
MAPDESC 

Definition at line 43 of file itemdesc.h.


Constructor & Destructor Documentation

ItemDesc::ItemDesc ( Type  type) [explicit]

Definition at line 476 of file itemdesc.cpp.

ItemDesc::~ItemDesc ( ) [virtual]

Definition at line 509 of file itemdesc.cpp.

References unload_scripts().

+ Here is the call graph for this function:


Member Function Documentation

ItemDesc * ItemDesc::create ( ConfigElem elem,
const Package pkg 
) [static]

Definition at line 111 of file itemdesc.cpp.

References find_itemdesc(), ITEMDESC, ItemDesc(), objtype, objtype_description(), old_objtype_conversions, ConfigElemBase::rest(), ConfigElem::throw_error(), ConfigElemBase::type(), and ConfigElemBase::type_is().

Referenced by CreateItemDescriptor(), and read_itemdesc_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ItemDesc::default_movable ( ) const

Definition at line 626 of file itemdesc.cpp.

References DEFAULT, graphic, FLAG::MOVABLE, movable, and tile_flags().

Referenced by PopulateStruct().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 616 of file itemdesc.cpp.

References hexint(), Package::name(), objtype, objtypename, and pkg.

Referenced by create(), and ItemDesc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ItemDesc::PopulateStruct ( BStruct descriptor) const [virtual]

Reimplemented in MapDesc, HouseDesc, BoatDesc, MultiDesc, SpellScrollDesc, SpellbookDesc, DoorDesc, ContainerDesc, WeaponDesc, ArmorDesc, and EquipDesc.

Definition at line 514 of file itemdesc.cpp.

References ObjArray::addElement(), BStruct::addMember(), BDictionary::addMember(), ARMORDESC, base_str_req, blocks_casting_if_in_hand, BOATDESC, can_use_while_frozen, can_use_while_paralyzed, Resistances::cold, ElementDamages::cold, color, CONTAINERDESC, control_script, create_script, decay_time, decays_on_multis, decint(), default_movable(), desc, destroy_script, DOORDESC, doubleclick_range, element_damage, element_resist, Resistances::energy, ElementDamages::energy, equip_script, facing, Resistances::fire, ElementDamages::fire, PropertyList::getprop(), PropertyList::getpropnames(), ghosts_can_use, graphic, HOUSEDESC, ignore_cprops, invisible, ITEMDESC, lockable, MAPDESC, method_script, multiid, newbie, objtype, objtypename, on_use_script, Resistances::physical, ElementDamages::physical, pkg, Resistances::poison, ElementDamages::poison, props, quality, ScriptDef::relativename(), requires_attention, resources, ExportScript::scriptname(), SPELLBOOKDESC, SPELLSCROLLDESC, stack_limit, tooltip, type, unequip_script, BObjectImp::unpack(), use_requires_los, vendor_buys_for, vendor_sells_for, walk_on_script, WEAPONDESC, weightdiv, and weightmult.

Referenced by EquipDesc::PopulateStruct(), ContainerDesc::PopulateStruct(), DoorDesc::PopulateStruct(), SpellScrollDesc::PopulateStruct(), MultiDesc::PopulateStruct(), and MapDesc::PopulateStruct().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 607 of file itemdesc.cpp.

References method_script.

Referenced by ~ItemDesc(), and UWeapon::~UWeapon().

+ Here is the caller graph for this function:


Member Data Documentation

Definition at line 100 of file itemdesc.h.

Referenced by PopulateStruct().

Definition at line 96 of file itemdesc.h.

Referenced by PopulateStruct().

Definition at line 95 of file itemdesc.h.

Referenced by PopulateStruct().

Definition at line 72 of file itemdesc.h.

Referenced by _create_item_in_container(), and PopulateStruct().

Definition at line 83 of file itemdesc.h.

Referenced by PopulateStruct().

Definition at line 99 of file itemdesc.h.

Referenced by decay_worldzone(), and PopulateStruct().

std::string ItemDesc::desc

Definition at line 77 of file itemdesc.h.

Referenced by Item::create(), and PopulateStruct().

Definition at line 85 of file itemdesc.h.

Referenced by decay_worldzone(), and PopulateStruct().

Definition at line 109 of file itemdesc.h.

Referenced by ItemDesc(), and PopulateStruct().

Definition at line 108 of file itemdesc.h.

Referenced by ItemDesc(), and PopulateStruct().

Definition at line 81 of file itemdesc.h.

Referenced by PopulateStruct(), and Item::printProperties().

Definition at line 74 of file itemdesc.h.

Referenced by PopulateStruct().

Definition at line 94 of file itemdesc.h.

Referenced by PopulateStruct().

std::set<std::string> ItemDesc::ignore_cprops

Definition at line 114 of file itemdesc.h.

Referenced by Item::has_only_default_cprops(), ItemDesc(), and PopulateStruct().

Definition at line 98 of file itemdesc.h.

Referenced by Item::default_invisible(), and PopulateStruct().

Definition at line 87 of file itemdesc.h.

Referenced by PopulateStruct().

Definition at line 97 of file itemdesc.h.

Referenced by Item::default_newbie(), and PopulateStruct().

std::string ItemDesc::objtypename

Definition at line 68 of file itemdesc.h.

Referenced by ItemDesc(), objtype_description(), PopulateStruct(), and write_objtypes_txt().

Definition at line 103 of file itemdesc.h.

Referenced by Equipment::Equipment(), and PopulateStruct().

Definition at line 106 of file itemdesc.h.

Definition at line 111 of file itemdesc.h.

Referenced by ItemDesc(), and PopulateStruct().

std::string ItemDesc::tooltip

Definition at line 78 of file itemdesc.h.

Referenced by ItemDesc(), and PopulateStruct().

Definition at line 82 of file itemdesc.h.

Referenced by PopulateStruct(), and Item::printProperties().

Definition at line 93 of file itemdesc.h.

Referenced by PopulateStruct().

Definition at line 89 of file itemdesc.h.

Referenced by Item::buyprice(), and PopulateStruct().

Definition at line 88 of file itemdesc.h.

Referenced by PopulateStruct(), and Item::sellprice().

Definition at line 76 of file itemdesc.h.

Referenced by ItemDesc(), and PopulateStruct().

Definition at line 75 of file itemdesc.h.

Referenced by ItemDesc(), and PopulateStruct().


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