Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields

Item Class Reference

Collaboration diagram for Item:

Collaboration graph
[legend]

Detailed Description

Author:
Gabor Torok
This class is both the UI representation (shape) of the rpgItem and it's state (for example, wear). All instances of the RpgItem point to the same RpgItem, but a new Item is created for each.


Public Member Functions

 Item (Session *session, RpgItem *rpgItem, int level=1, bool loading=false)
ItemInfo * save ()
Color * getColor ()
void setColor (Color *c)
void setShape (GLShape *s)
GLShape * getShape ()
RpgItem * getRpgItem ()
bool isBlocking ()
void setBlocking (bool b)
int getCurrentCharges ()
void setCurrentCharges (int n)
void setWeight (float f)
void setSpell (Spell *spell)
Spell * getSpell ()
void setShowCursed (bool b)
bool getShowCursed ()
void getDetailedDescription (char *s, bool precise=true)
char * getItemName ()
int getContainedItemCount ()
bool addContainedItem (Item *item, bool force=false)
ItemremoveContainedItem (int index)
ItemgetContainedItem (int index)
bool isContainedItem (Item *item)
bool getContainsMagicItem ()
bool decrementCharges ()
const char * getRandomSound ()
void enchant (int level)
int getLevel ()
float getWeight ()
int getPrice ()
int getAction ()
int getSpeed ()
int getDistance ()
int getMaxCharges ()
int getDuration ()
int getQuality ()
bool isMagicItem ()
map< int, int > * getSkillBonusMap ()
int getSkillBonus (int skill)
int getMagicLevel ()
int getBonus ()
int getDamageMultiplier ()
char * getMonsterType ()
MagicSchool * getSchool ()
int rollMagicDamage ()
int getMagicResistance ()
char * describeMagicDamage ()
bool isCursed ()
bool isStateModSet (int mod)
bool isStateModProtected (int mod)
void debugMagic (char *s)

Static Public Member Functions

static Itemload (Session *session, ItemInfo *info)
static void initItems (ShapePalette *shapePal)

Static Public Attributes

static map< int, vector< string > * > soundMap

Protected Member Functions

void commonInit (bool loading=false)
float getRandomSum (float base, int count)
void describeMagic (char *s, char *itemName)


The documentation for this class was generated from the following files:
Generated on Thu Jun 16 21:50:46 2005 for scourge by  doxygen 1.4.0