ItemInfo Class Reference

#include <iteminfo.h>

List of all members.


Detailed Description

Defines a class for storing item infos.

This includes information used when the item is equipped.

Definition at line 111 of file iteminfo.h.


Public Member Functions

 ItemInfo ()
 Constructor.
void setId (int id)
int getId () const
void setName (const std::string &name)
const std::string & getName () const
void setParticleEffect (const std::string &particleEffect)
std::string getParticleEffect () const
void setImageName (const std::string &imageName)
const std::string & getImageName () const
void setDescription (const std::string &description)
const std::string & getDescription () const
void setEffect (const std::string &effect)
const std::string & getEffect () const
void setType (ItemType type)
ItemType getType () const
void setWeight (short weight)
short getWeight () const
void setView (int view)
void setSprite (const std::string &animationFile, Gender gender)
const std::string & getSprite (Gender gender) const
void setWeaponType (int)
SpriteAction getAttackType () const
int getAttackRange () const
void setAttackRange (int r)
void addSound (EquipmentSoundEvent event, const std::string &filename)
const std::string & getSound (EquipmentSoundEvent event) const

Protected Attributes

std::string mImageName
 The filename of the icon image.
std::string mName
std::string mDescription
 Short description.
std::string mEffect
 Description of effects.
ItemType mType
 Item type.
std::string mParticle
 Particle effect used with this item.
short mWeight
 Weight in grams.
int mView
 Item ID of how this item looks.
int mId
 Item ID.
SpriteAction mAttackType
 Attack type, in case of weapon.
int mAttackRange
 Attack range, will be zero if non weapon.
std::map< int, std::string > mAnimationFiles
 Maps gender to sprite filenames.
std::map< EquipmentSoundEvent,
std::vector< std::string > > 
mSounds
 Stores the names of sounds to be played at certain event.

Constructor & Destructor Documentation

ItemInfo::ItemInfo (  )  [inline]

Constructor.

Definition at line 117 of file iteminfo.h.


Member Function Documentation

void ItemInfo::setId ( int  id  )  [inline]

Definition at line 125 of file iteminfo.h.

int ItemInfo::getId (  )  const [inline]

Definition at line 128 of file iteminfo.h.

void ItemInfo::setName ( const std::string &  name  )  [inline]

Definition at line 131 of file iteminfo.h.

const std::string& ItemInfo::getName (  )  const [inline]

Definition at line 134 of file iteminfo.h.

void ItemInfo::setParticleEffect ( const std::string &  particleEffect  )  [inline]

Definition at line 137 of file iteminfo.h.

std::string ItemInfo::getParticleEffect (  )  const [inline]

Definition at line 140 of file iteminfo.h.

void ItemInfo::setImageName ( const std::string &  imageName  )  [inline]

Definition at line 142 of file iteminfo.h.

const std::string& ItemInfo::getImageName (  )  const [inline]

Definition at line 145 of file iteminfo.h.

void ItemInfo::setDescription ( const std::string &  description  )  [inline]

Definition at line 148 of file iteminfo.h.

const std::string& ItemInfo::getDescription (  )  const [inline]

Definition at line 151 of file iteminfo.h.

void ItemInfo::setEffect ( const std::string &  effect  )  [inline]

Definition at line 154 of file iteminfo.h.

const std::string& ItemInfo::getEffect (  )  const [inline]

Definition at line 157 of file iteminfo.h.

void ItemInfo::setType ( ItemType  type  )  [inline]

Definition at line 159 of file iteminfo.h.

ItemType ItemInfo::getType (  )  const [inline]

Definition at line 162 of file iteminfo.h.

void ItemInfo::setWeight ( short  weight  )  [inline]

Definition at line 165 of file iteminfo.h.

short ItemInfo::getWeight (  )  const [inline]

Definition at line 168 of file iteminfo.h.

void ItemInfo::setView ( int  view  )  [inline]

Definition at line 171 of file iteminfo.h.

void ItemInfo::setSprite ( const std::string &  animationFile,
Gender  gender 
) [inline]

Definition at line 174 of file iteminfo.h.

const std::string & ItemInfo::getSprite ( Gender  gender  )  const

Definition at line 26 of file iteminfo.cpp.

void ItemInfo::setWeaponType ( int  type  ) 

Definition at line 43 of file iteminfo.cpp.

SpriteAction ItemInfo::getAttackType (  )  const [inline]

Definition at line 181 of file iteminfo.h.

int ItemInfo::getAttackRange (  )  const [inline]

Definition at line 184 of file iteminfo.h.

void ItemInfo::setAttackRange ( int  r  )  [inline]

Definition at line 187 of file iteminfo.h.

void ItemInfo::addSound ( EquipmentSoundEvent  event,
const std::string &  filename 
)

Definition at line 69 of file iteminfo.cpp.

const std::string & ItemInfo::getSound ( EquipmentSoundEvent  event  )  const

Definition at line 74 of file iteminfo.cpp.


Member Data Documentation

std::string ItemInfo::mImageName [protected]

The filename of the icon image.

Definition at line 195 of file iteminfo.h.

std::string ItemInfo::mName [protected]

Definition at line 196 of file iteminfo.h.

std::string ItemInfo::mDescription [protected]

Short description.

Definition at line 197 of file iteminfo.h.

std::string ItemInfo::mEffect [protected]

Description of effects.

Definition at line 198 of file iteminfo.h.

Item type.

Definition at line 199 of file iteminfo.h.

std::string ItemInfo::mParticle [protected]

Particle effect used with this item.

Definition at line 200 of file iteminfo.h.

short ItemInfo::mWeight [protected]

Weight in grams.

Definition at line 201 of file iteminfo.h.

int ItemInfo::mView [protected]

Item ID of how this item looks.

Definition at line 202 of file iteminfo.h.

int ItemInfo::mId [protected]

Item ID.

Definition at line 203 of file iteminfo.h.

Attack type, in case of weapon.

Definition at line 206 of file iteminfo.h.

int ItemInfo::mAttackRange [protected]

Attack range, will be zero if non weapon.

Definition at line 207 of file iteminfo.h.

std::map<int, std::string> ItemInfo::mAnimationFiles [protected]

Maps gender to sprite filenames.

Definition at line 210 of file iteminfo.h.

std::map< EquipmentSoundEvent, std::vector<std::string> > ItemInfo::mSounds [protected]

Stores the names of sounds to be played at certain event.

Definition at line 213 of file iteminfo.h.


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

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5