Mana
|
Defines a class for storing generic item infos. More...
#include <iteminfo.h>
Public Member Functions | |
ItemInfo ()=default | |
ItemInfo (const ItemInfo &)=delete | |
ItemInfo & | operator= (const ItemInfo &)=delete |
const std::string & | getSprite (Gender gender, int race) const |
const std::string & | getSound (EquipmentSoundEvent event) const |
Public Attributes | |
int | id = 0 |
Item ID. | |
std::string | name |
SpriteDisplay | display |
Display info (like icon) | |
std::string | description |
Short description. | |
std::vector< std::string > | effect |
Description of effects. | |
int | weight = 0 |
Weight in grams. | |
std::string | missileParticleFile |
Effects to be shown when weapon attacks - see also effects.xml. | |
int | hitEffectId = 0 |
int | criticalHitEffectId = 0 |
std::string | attackAction = SpriteAction::INVALID |
Attack type, in case of weapon. | |
int | attackRange = 0 |
Attack range, will be equal to ATTACK_RANGE_NOT_SET if no weapon. | |
bool | equippable = false |
Whether this item can be equipped. | |
bool | activatable = false |
Whether this item can be activated. | |
ItemType | type = ITEM_UNUSABLE |
Item type. | |
std::vector< Replacement > | replacements |
Private Member Functions | |
void | setSprite (const std::string &animationFile, Gender gender, int race) |
void | addSound (EquipmentSoundEvent event, const std::string &filename) |
Private Attributes | |
int | mView = 0 |
Item ID of how this item looks. | |
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. | |
Friends | |
class | ItemDB |
class | TmwAthena::TaItemDB |
class | ManaServ::ManaServItemDB |
Defines a class for storing generic item infos.
Definition at line 99 of file iteminfo.h.
|
default |
|
delete |
|
private |
Definition at line 45 of file iteminfo.cpp.
const std::string & ItemInfo::getSound | ( | EquipmentSoundEvent | event | ) | const |
Definition at line 50 of file iteminfo.cpp.
const std::string & ItemInfo::getSprite | ( | Gender | gender, |
int | race | ||
) | const |
Definition at line 27 of file iteminfo.cpp.
|
private |
Definition at line 57 of file iteminfo.cpp.
|
friend |
Definition at line 101 of file iteminfo.h.
|
friend |
Definition at line 103 of file iteminfo.h.
|
friend |
Definition at line 102 of file iteminfo.h.
bool ItemInfo::activatable = false |
Whether this item can be activated.
Definition at line 134 of file iteminfo.h.
std::string ItemInfo::attackAction = SpriteAction::INVALID |
Attack type, in case of weapon.
See SpriteAction in spritedef.h for more info. Attack action sub-types (bow, sword, ...) are defined in items.xml.
Definition at line 128 of file iteminfo.h.
int ItemInfo::attackRange = 0 |
Attack range, will be equal to ATTACK_RANGE_NOT_SET if no weapon.
Definition at line 131 of file iteminfo.h.
int ItemInfo::criticalHitEffectId = 0 |
Definition at line 122 of file iteminfo.h.
std::string ItemInfo::description |
Short description.
Definition at line 115 of file iteminfo.h.
SpriteDisplay ItemInfo::display |
Display info (like icon)
Definition at line 114 of file iteminfo.h.
std::vector<std::string> ItemInfo::effect |
Description of effects.
Definition at line 116 of file iteminfo.h.
bool ItemInfo::equippable = false |
Whether this item can be equipped.
Definition at line 133 of file iteminfo.h.
int ItemInfo::hitEffectId = 0 |
Definition at line 121 of file iteminfo.h.
int ItemInfo::id = 0 |
Item ID.
Definition at line 112 of file iteminfo.h.
|
private |
Maps gender to sprite filenames.
Definition at line 150 of file iteminfo.h.
std::string ItemInfo::missileParticleFile |
Effects to be shown when weapon attacks - see also effects.xml.
Definition at line 120 of file iteminfo.h.
|
private |
Stores the names of sounds to be played at certain event.
Definition at line 153 of file iteminfo.h.
|
private |
Item ID of how this item looks.
Definition at line 147 of file iteminfo.h.
std::string ItemInfo::name |
Definition at line 113 of file iteminfo.h.
std::vector<Replacement> ItemInfo::replacements |
Definition at line 138 of file iteminfo.h.
ItemType ItemInfo::type = ITEM_UNUSABLE |
Item type.
Definition at line 136 of file iteminfo.h.
int ItemInfo::weight = 0 |
Weight in grams.
Definition at line 117 of file iteminfo.h.