ManaPlus
|
#include <iteminfo.h>
Public Member Functions | |
ItemInfo () | |
~ItemInfo () | |
void | setId (const int id) |
int | getId () const |
void | setName (const std::string &name) |
const std::string & | getName () const |
const std::string | getName (const ItemColor color) const |
void | setNameEn (const std::string &name) |
const std::string & | getNameEn () const |
const std::string | getNameEn (const ItemColor color) const |
const std::string | getLink () const |
void | setDisplay (const SpriteDisplay &display) |
const SpriteDisplay & | getDisplay () const |
void | setDescription (const std::string &description) |
const std::string & | getDescription () const |
const std::string | getDescription (const ItemColor color) const |
void | setEffect (const std::string &effect) |
const std::string & | getEffect () const |
void | setType (const ItemDbTypeT type) |
void | setUseButton (const std::string &str) |
const std::string & | getUseButton () const |
void | setUseButton2 (const std::string &str) |
const std::string & | getUseButton2 () const |
ItemDbTypeT | getType () const |
void | setWeight (const int weight) |
int | getWeight () const |
int | getView () const |
void | setView (const int view) |
void | setSprite (const std::string &animationFile, const GenderT gender, const int race) |
const std::string & | getSprite (const GenderT gender, const BeingTypeId race) const |
void | setAttackAction (const std::string &attackAction) |
void | setSkyAttackAction (const std::string &attackAction) |
void | setWaterAttackAction (const std::string &attackAction) |
void | setRideAttackAction (const std::string &attackAction) |
void | setMissileParticleFile (const std::string &s) |
MissileInfo & | getMissile () |
const MissileInfo & | getMissileConst () const |
void | setHitEffectId (const int s) |
int | getHitEffectId () const |
void | setCriticalHitEffectId (const int s) |
int | getCriticalHitEffectId () const |
void | setMissEffectId (const int s) |
int | getMissEffectId () const |
const std::string & | getAttackAction () const |
const std::string & | getSkyAttackAction () const |
const std::string & | getWaterAttackAction () const |
const std::string & | getRideAttackAction () const |
int | getAttackRange () const |
void | setAttackRange (const int r) |
void | addSound (const ItemSoundEvent::Type event, const std::string &filename, const int delay) |
const SoundInfo & | getSound (const ItemSoundEvent::Type event) const |
int | getDrawBefore (const int direction) const |
void | setDrawBefore (const int direction, const int n) |
int | getDrawAfter (const int direction) const |
void | setDrawAfter (const int direction, const int n) |
int | getDrawPriority (const int direction) const |
void | setDrawPriority (const int direction, const int n) |
const IntMap & | getTags () const |
void | addTag (const int tag) |
void | setRemoveSprites () |
bool | isRemoveSprites () const |
void | setMaxFloorOffsetX (const int i) |
void | setMaxFloorOffsetY (const int i) |
int | getMaxFloorOffsetX () const |
int | getMaxFloorOffsetY () const |
bool | isRemoveItemId (int id) const |
void | setCardColor (const ItemColor color) |
ItemColor | getCardColor () const |
int | getReplaceToSpriteId (int id) const |
IntMap * | addReplaceSprite (const int sprite, const int direction) |
const SpriteToItemMap * | getSpriteToItemReplaceMap (const int directions) const |
std::string | getDyeColorsString (const ItemColor color) const |
std::string | getDyeIconColorsString (const ItemColor color) const |
void | setColorsList (const std::string &name) |
void | setIconColorsList (const std::string &name) |
bool | isHaveColors () const |
bool | isHaveIconColors () const |
std::string | getColorsListName () const |
std::string | getIconColorsListName () const |
const std::string | replaceColors (std::string str, const ItemColor color) const |
void | setPickupCursor (const std::string &cursor) |
void | setPickupCursor (const CursorT &cursor) |
CursorT | getPickupCursor () const |
void | setProtected (const bool b) |
bool | isProtected () const |
int | getColorsSize () const |
int | getIconColorsSize () const |
std::string | getColorName (const ItemColor idx) const |
std::string | getColor (const ItemColor idx) const |
std::string | getIconColorName (const ItemColor idx) const |
std::string | getIconColor (const ItemColor idx) const |
std::vector< ItemMenuItem > & | getInventoryMenu () |
std::vector< ItemMenuItem > & | getStorageMenu () |
std::vector< ItemMenuItem > & | getCartMenu () |
const std::vector< ItemMenuItem > & | getInventoryMenuConst () const A_CONST |
const std::vector< ItemMenuItem > & | getStorageMenuConst () const A_CONST |
const std::vector< ItemMenuItem > & | getCartMenuConst () const A_CONST |
Data Fields | |
int | mDrawBefore [10] |
int | mDrawAfter [10] |
int | mDrawPriority [10] |
Static Private Member Functions | |
static void | setSpriteOrder (int *const ptr, const int direction, const int n, const int def) |
Defines a class for storing item infos. This includes information used when the item is equipped.
Definition at line 53 of file iteminfo.h.
ItemInfo::ItemInfo | ( | ) |
Constructor.
Definition at line 43 of file iteminfo.cpp.
References mDrawAfter, mDrawBefore, mDrawPriority, and mSpriteToItemReplaceMap.
ItemInfo::~ItemInfo | ( | ) |
Definition at line 92 of file iteminfo.cpp.
References delete_all(), mSpriteToItemReplaceList, and mSpriteToItemReplaceMap.
IntMap * ItemInfo::addReplaceSprite | ( | const int | sprite, |
const int | direction | ||
) |
Definition at line 174 of file iteminfo.cpp.
References mSpriteToItemReplaceList, and mSpriteToItemReplaceMap.
void ItemInfo::addSound | ( | const ItemSoundEvent::Type | event, |
const std::string & | filename, | ||
const int | delay | ||
) |
|
inline |
|
inline |
Definition at line 186 of file iteminfo.h.
References mAttackAction.
Referenced by ItemDB::loadXmlFile().
|
inline |
Definition at line 198 of file iteminfo.h.
References mAttackRange.
Referenced by ItemDB::loadXmlFile().
|
inline |
Definition at line 252 of file iteminfo.h.
References mCardColor.
Referenced by ItemDB::loadXmlFile().
|
inline |
|
inline |
std::string ItemInfo::getColor | ( | const ItemColor | idx | ) | const |
Definition at line 430 of file iteminfo.cpp.
References CAST_S32, mColorsList, mColorsListName, and reportAlways.
std::string ItemInfo::getColorName | ( | const ItemColor | idx | ) | const |
Definition at line 413 of file iteminfo.cpp.
References CAST_S32, mColorsList, mColorsListName, and reportAlways.
Referenced by CharCreateDialog::updateLook().
|
inline |
Definition at line 279 of file iteminfo.h.
References mColorsListName.
Referenced by ItemDB::loadXmlFile().
|
inline |
Definition at line 304 of file iteminfo.h.
References CAST_S32, and mColorsList.
Referenced by CharCreateDialog::updateLook().
|
inline |
Definition at line 177 of file iteminfo.h.
References mCriticalHitEffectId.
Referenced by ItemDB::loadXmlFile().
|
inline |
Definition at line 100 of file iteminfo.h.
References mDescription.
Referenced by ItemDB::loadXmlFile(), and ItemPopup::setItem().
const std::string ItemInfo::getDescription | ( | const ItemColor | color | ) | const |
Definition at line 253 of file iteminfo.cpp.
References mDescription, and replaceColors().
|
inline |
int ItemInfo::getDrawAfter | ( | const int | direction | ) | const |
int ItemInfo::getDrawBefore | ( | const int | direction | ) | const |
int ItemInfo::getDrawPriority | ( | const int | direction | ) | const |
std::string ItemInfo::getDyeColorsString | ( | const ItemColor | color | ) | const |
Definition at line 227 of file iteminfo.cpp.
References mColorsList, and mColorsListName.
Referenced by EAthena::BeingRecv::processBeingChangeLookContinue(), and CharCreateDialog::updateHair().
std::string ItemInfo::getDyeIconColorsString | ( | const ItemColor | color | ) | const |
Definition at line 240 of file iteminfo.cpp.
References mIconColorsList, and mIconColorsListName.
Referenced by ItemPopup::setItem().
|
inline |
Definition at line 109 of file iteminfo.h.
References mEffect.
Referenced by ItemDB::loadXmlFile(), and ItemPopup::setItem().
|
inline |
Definition at line 171 of file iteminfo.h.
References mHitEffectId.
Referenced by ItemDB::loadXmlFile().
std::string ItemInfo::getIconColor | ( | const ItemColor | idx | ) | const |
Definition at line 464 of file iteminfo.cpp.
References CAST_S32, mColorsListName, mIconColorsList, and reportAlways.
std::string ItemInfo::getIconColorName | ( | const ItemColor | idx | ) | const |
Definition at line 447 of file iteminfo.cpp.
References CAST_S32, mColorsListName, mIconColorsList, and reportAlways.
|
inline |
Definition at line 282 of file iteminfo.h.
References mIconColorsListName.
Referenced by ItemDB::loadXmlFile().
|
inline |
Definition at line 307 of file iteminfo.h.
References CAST_S32, and mIconColorsList.
|
inline |
Definition at line 68 of file iteminfo.h.
References mId.
Referenced by ItemAmountWindow::action(), replaceItemLinks(), and ItemPopup::setItem().
|
inline |
|
inline |
const std::string ItemInfo::getLink | ( | ) | const |
|
inline |
|
inline |
|
inline |
Definition at line 183 of file iteminfo.h.
References mMissEffectId.
Referenced by ItemDB::loadXmlFile().
|
inline |
|
inline |
Definition at line 165 of file iteminfo.h.
References mMissile.
Referenced by ItemDB::loadXmlFile().
|
inline |
Definition at line 74 of file iteminfo.h.
References mName.
Referenced by ShopWindow::announce(), ItemDB::loadXmlFile(), ItemContainer::mousePressed(), anonymous_namespace{itemcontainer.cpp}::SortItemAlphaFunctor::operator()(), anonymous_namespace{itemcontainer.cpp}::SortItemTypeFunctor::operator()(), ShopWindow::processRequest(), BrowserBoxTools::replaceLinkCommands(), ItemPopup::setItem(), CharCreateDialog::updateHair(), CharCreateDialog::updateLook(), and ItemContainer::updateMatrix().
const std::string ItemInfo::getName | ( | const ItemColor | color | ) | const |
Definition at line 258 of file iteminfo.cpp.
References mName, and replaceColors().
|
inline |
const std::string ItemInfo::getNameEn | ( | const ItemColor | color | ) | const |
Definition at line 263 of file iteminfo.cpp.
References mNameEn, and replaceColors().
|
inline |
int ItemInfo::getReplaceToSpriteId | ( | int | id | ) | const |
|
inline |
Definition at line 195 of file iteminfo.h.
References mRideAttackAction.
Referenced by ItemDB::loadXmlFile().
|
inline |
Definition at line 189 of file iteminfo.h.
References mSkyAttackAction.
Referenced by ItemDB::loadXmlFile().
const SoundInfo & ItemInfo::getSound | ( | const ItemSoundEvent::Type | event | ) | const |
Definition at line 161 of file iteminfo.cpp.
References CAST_U32, empty, and mSounds.
Referenced by ItemSoundManager::getSoundEffect().
const std::string & ItemInfo::getSprite | ( | const GenderT | gender, |
const BeingTypeId | race | ||
) | const |
Definition at line 100 of file iteminfo.cpp.
References CAST_S32, empty, ItemDB::get(), getSprite(), mAnimationFiles, mView, and toInt.
Referenced by Inventory::findItemBySprite(), and getSprite().
const SpriteToItemMap * ItemInfo::getSpriteToItemReplaceMap | ( | const int | directions | ) | const |
Definition at line 293 of file iteminfo.cpp.
References SpriteDirection::DOWN, SpriteDirection::DOWNLEFT, SpriteDirection::DOWNRIGHT, mSpriteToItemReplaceMap, SpriteDirection::UP, SpriteDirection::UPLEFT, and SpriteDirection::UPRIGHT.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 127 of file iteminfo.h.
References mType.
Referenced by ItemDB::loadXmlFile(), anonymous_namespace{itemcontainer.cpp}::SortItemTypeFunctor::operator()(), and ItemPopup::setItem().
|
inline |
Definition at line 118 of file iteminfo.h.
References mUseButton.
Referenced by ItemDB::loadXmlFile().
|
inline |
|
inline |
|
inline |
Definition at line 192 of file iteminfo.h.
References mWaterAttackAction.
Referenced by ItemDB::loadXmlFile().
|
inline |
Definition at line 133 of file iteminfo.h.
References mWeight.
Referenced by ItemDB::loadXmlFile(), and ItemPopup::setItem().
|
inline |
|
inline |
|
inline |
bool ItemInfo::isRemoveItemId | ( | int | id | ) | const |
|
inline |
const std::string ItemInfo::replaceColors | ( | std::string | str, |
const ItemColor | color | ||
) | const |
Definition at line 268 of file iteminfo.cpp.
References CAST_S8, mColorsList, mColorsListName, and replaceAll().
Referenced by getDescription(), getName(), and getNameEn().
void ItemInfo::setAttackAction | ( | const std::string & | attackAction | ) |
Definition at line 121 of file iteminfo.cpp.
References SpriteAction::ATTACK(), and mAttackAction.
|
inline |
|
inline |
void ItemInfo::setColorsList | ( | const std::string & | name | ) |
Definition at line 199 of file iteminfo.cpp.
References ColorDB::getColorsList(), mColorsList, and mColorsListName.
|
inline |
|
inline |
|
inline |
void ItemInfo::setDrawAfter | ( | const int | direction, |
const int | n | ||
) |
Definition at line 375 of file iteminfo.cpp.
References mDrawAfter, and setSpriteOrder().
void ItemInfo::setDrawBefore | ( | const int | direction, |
const int | n | ||
) |
Definition at line 370 of file iteminfo.cpp.
References mDrawBefore, and setSpriteOrder().
void ItemInfo::setDrawPriority | ( | const int | direction, |
const int | n | ||
) |
Definition at line 380 of file iteminfo.cpp.
References mDrawPriority, and setSpriteOrder().
|
inline |
|
inline |
void ItemInfo::setIconColorsList | ( | const std::string & | name | ) |
Definition at line 213 of file iteminfo.cpp.
References ColorDB::getColorsList(), mIconColorsList, and mIconColorsListName.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void ItemInfo::setRideAttackAction | ( | const std::string & | attackAction | ) |
Definition at line 145 of file iteminfo.cpp.
References SpriteAction::ATTACKRIDE(), and mRideAttackAction.
void ItemInfo::setSkyAttackAction | ( | const std::string & | attackAction | ) |
Definition at line 129 of file iteminfo.cpp.
References SpriteAction::ATTACKSKY(), and mSkyAttackAction.
void ItemInfo::setSprite | ( | const std::string & | animationFile, |
const GenderT | gender, | ||
const int | race | ||
) |
Definition at line 406 of file iteminfo.cpp.
References CAST_S32, and mAnimationFiles.
Referenced by ItemDB::load().
|
staticprivate |
Definition at line 317 of file iteminfo.cpp.
References SpriteDirection::DOWN, SpriteDirection::DOWNLEFT, SpriteDirection::DOWNRIGHT, SpriteDirection::UP, SpriteDirection::UPLEFT, and SpriteDirection::UPRIGHT.
Referenced by setDrawAfter(), setDrawBefore(), and setDrawPriority().
|
inline |
|
inline |
|
inline |
|
inline |
void ItemInfo::setWaterAttackAction | ( | const std::string & | attackAction | ) |
Definition at line 137 of file iteminfo.cpp.
References SpriteAction::ATTACKWATER(), and mWaterAttackAction.
|
inline |
|
private |
Maps gender to sprite filenames.
Definition at line 376 of file iteminfo.h.
Referenced by getSprite(), and setSprite().
|
private |
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 366 of file iteminfo.h.
Referenced by getAttackAction(), and setAttackAction().
|
private |
Attack range, will be zero if non weapon.
Definition at line 370 of file iteminfo.h.
Referenced by getAttackRange(), and setAttackRange().
|
private |
Definition at line 392 of file iteminfo.h.
Referenced by getMaxFloorOffsetX(), and setMaxFloorOffsetX().
|
private |
Definition at line 393 of file iteminfo.h.
Referenced by getMaxFloorOffsetY(), and setMaxFloorOffsetY().
|
private |
Definition at line 388 of file iteminfo.h.
Referenced by getCardColor(), and setCardColor().
|
private |
Definition at line 385 of file iteminfo.h.
Referenced by getCartMenu(), and getCartMenuConst().
|
private |
Definition at line 381 of file iteminfo.h.
Referenced by getColor(), getColorName(), getColorsSize(), getDyeColorsString(), replaceColors(), and setColorsList().
|
private |
Definition at line 386 of file iteminfo.h.
Referenced by getColor(), getColorName(), getColorsListName(), getDyeColorsString(), getIconColor(), getIconColorName(), isHaveColors(), replaceColors(), and setColorsList().
|
private |
Definition at line 390 of file iteminfo.h.
Referenced by getCriticalHitEffectId(), and setCriticalHitEffectId().
|
private |
Short description.
Definition at line 347 of file iteminfo.h.
Referenced by getDescription(), and setDescription().
|
private |
Display info (like icon)
Definition at line 343 of file iteminfo.h.
Referenced by getDisplay(), and setDisplay().
int ItemInfo::mDrawAfter[10] |
Definition at line 334 of file iteminfo.h.
Referenced by getDrawAfter(), ItemInfo(), and setDrawAfter().
int ItemInfo::mDrawBefore[10] |
Definition at line 333 of file iteminfo.h.
Referenced by getDrawBefore(), ItemInfo(), and setDrawBefore().
int ItemInfo::mDrawPriority[10] |
Definition at line 335 of file iteminfo.h.
Referenced by getDrawPriority(), ItemInfo(), Being::recalcSpritesOrder(), and setDrawPriority().
|
private |
Description of effects.
Definition at line 348 of file iteminfo.h.
Referenced by getEffect(), and setEffect().
|
private |
Definition at line 389 of file iteminfo.h.
Referenced by getHitEffectId(), and setHitEffectId().
|
private |
Definition at line 382 of file iteminfo.h.
Referenced by getDyeIconColorsString(), getIconColor(), getIconColorName(), getIconColorsSize(), and setIconColorsList().
|
private |
Definition at line 387 of file iteminfo.h.
Referenced by getDyeIconColorsString(), getIconColorsListName(), isHaveIconColors(), and setIconColorsList().
|
private |
|
private |
Definition at line 383 of file iteminfo.h.
Referenced by getInventoryMenu(), and getInventoryMenuConst().
|
private |
Definition at line 355 of file iteminfo.h.
Referenced by isRemoveSprites(), and setRemoveSprites().
|
private |
Definition at line 391 of file iteminfo.h.
Referenced by getMissEffectId(), and setMissEffectId().
|
private |
Definition at line 344 of file iteminfo.h.
Referenced by getMissile(), getMissileConst(), and setMissileParticleFile().
|
private |
Definition at line 373 of file iteminfo.h.
|
private |
Definition at line 345 of file iteminfo.h.
|
private |
Definition at line 346 of file iteminfo.h.
Referenced by getNameEn(), and setNameEn().
|
private |
Definition at line 394 of file iteminfo.h.
Referenced by getPickupCursor(), and setPickupCursor().
|
private |
Definition at line 395 of file iteminfo.h.
Referenced by isProtected(), and setProtected().
|
private |
Definition at line 369 of file iteminfo.h.
Referenced by getRideAttackAction(), and setRideAttackAction().
|
private |
Definition at line 367 of file iteminfo.h.
Referenced by getSkyAttackAction(), and setSkyAttackAction().
|
private |
Stores the names of sounds to be played at certain event.
Definition at line 379 of file iteminfo.h.
Referenced by addSound(), and getSound().
|
private |
Definition at line 359 of file iteminfo.h.
Referenced by addReplaceSprite(), and ~ItemInfo().
|
private |
Definition at line 357 of file iteminfo.h.
Referenced by addReplaceSprite(), getSpriteToItemReplaceMap(), ItemInfo(), and ~ItemInfo().
|
private |
Definition at line 384 of file iteminfo.h.
Referenced by getStorageMenu(), and getStorageMenuConst().
|
private |
Definition at line 380 of file iteminfo.h.
|
private |
|
private |
Definition at line 349 of file iteminfo.h.
Referenced by getUseButton(), and setUseButton().
|
private |
Definition at line 350 of file iteminfo.h.
Referenced by getUseButton2(), and setUseButton2().
|
private |
Item ID of how this item looks.
Definition at line 353 of file iteminfo.h.
Referenced by getSprite(), getView(), and setView().
|
private |
Definition at line 368 of file iteminfo.h.
Referenced by getWaterAttackAction(), and setWaterAttackAction().
|
private |
Weight in grams.
Definition at line 352 of file iteminfo.h.
Referenced by getWeight(), and setWeight().