#include <iteminfo.h>
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. | |
| ItemInfo::ItemInfo | ( | ) | [inline] |
| 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.
std::string ItemInfo::mImageName [protected] |
std::string ItemInfo::mName [protected] |
Definition at line 196 of file iteminfo.h.
std::string ItemInfo::mDescription [protected] |
std::string ItemInfo::mEffect [protected] |
ItemType ItemInfo::mType [protected] |
std::string ItemInfo::mParticle [protected] |
short ItemInfo::mWeight [protected] |
int ItemInfo::mView [protected] |
int ItemInfo::mId [protected] |
SpriteAction ItemInfo::mAttackType [protected] |
int ItemInfo::mAttackRange [protected] |
std::map<int, std::string> ItemInfo::mAnimationFiles [protected] |
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.
1.5.5