ManaPlus
Public Member Functions | Data Fields | Static Private Member Functions | Private Attributes
ItemInfo Class Reference

#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 SpriteDisplaygetDisplay () 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)
 
MissileInfogetMissile ()
 
const MissileInfogetMissileConst () 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 SoundInfogetSound (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 IntMapgetTags () 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
 
IntMapaddReplaceSprite (const int sprite, const int direction)
 
const SpriteToItemMapgetSpriteToItemReplaceMap (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)
 

Private Attributes

SpriteDisplay mDisplay
 
MissileInfo mMissile
 
std::string mName
 
std::string mNameEn
 
std::string mDescription
 
std::string mEffect
 
std::string mUseButton
 
std::string mUseButton2
 
ItemDbTypeT mType
 
int mWeight
 
int mView
 
int mId
 
bool mIsRemoveSprites
 
SpriteToItemMapmSpriteToItemReplaceMap [10]
 
std::vector< SpriteToItemMap * > mSpriteToItemReplaceList
 
std::string mAttackAction
 
std::string mSkyAttackAction
 
std::string mWaterAttackAction
 
std::string mRideAttackAction
 
int mAttackRange
 
std::string mMissileParticle
 
std::map< int, std::string > mAnimationFiles
 
std::map< ItemSoundEvent::Type, SoundInfoVectmSounds
 
std::map< int, int > mTags
 
const std::map< ItemColor, ItemColorData > * mColorsList
 
const std::map< ItemColor, ItemColorData > * mIconColorsList
 
std::vector< ItemMenuItemmInventoryMenu
 
std::vector< ItemMenuItemmStorageMenu
 
std::vector< ItemMenuItemmCartMenu
 
std::string mColorsListName
 
std::string mIconColorsListName
 
ItemColor mCardColor
 
int mHitEffectId
 
int mCriticalHitEffectId
 
int mMissEffectId
 
int maxFloorOffsetX
 
int maxFloorOffsetY
 
CursorT mPickupCursor
 
bool mProtected
 

Detailed Description

Defines a class for storing item infos. This includes information used when the item is equipped.

Definition at line 53 of file iteminfo.h.

Constructor & Destructor Documentation

◆ ItemInfo()

ItemInfo::ItemInfo ( )

Constructor.

Definition at line 43 of file iteminfo.cpp.

43  :
44  mDisplay(),
45  mMissile(),
46  mName(),
47  mNameEn(),
48  mDescription(),
49  mEffect(),
50  mUseButton(),
51  mUseButton2(),
53  mWeight(0),
54  mView(0),
55  mId(0),
56  mIsRemoveSprites(false),
62  mAttackRange(0),
65  mSounds(),
66  mTags(),
67  mColorsList(nullptr),
68  mIconColorsList(nullptr),
70  mStorageMenu(),
71  mCartMenu(),
75  mHitEffectId(-1),
77  mMissEffectId(-1),
81  mProtected(false)
82 {
83  for (int f = 0; f < 10; f ++)
84  {
85  mSpriteToItemReplaceMap[f] = nullptr;
86  mDrawBefore[f] = -1;
87  mDrawAfter[f] = -1;
88  mDrawPriority[f] = 0;
89  }
90 }
std::string mName
Definition: iteminfo.h:345
int mWeight
Definition: iteminfo.h:352
MissileInfo mMissile
Definition: iteminfo.h:344
ItemColor mCardColor
Definition: iteminfo.h:388
int mDrawPriority[10]
Definition: iteminfo.h:335
int mAttackRange
Definition: iteminfo.h:370
int mDrawBefore[10]
Definition: iteminfo.h:333
int mHitEffectId
Definition: iteminfo.h:389
int maxFloorOffsetY
Definition: iteminfo.h:393
std::string mMissileParticle
Definition: iteminfo.h:373
std::string mRideAttackAction
Definition: iteminfo.h:369
int mId
Definition: iteminfo.h:354
std::string mIconColorsListName
Definition: iteminfo.h:387
SpriteDisplay mDisplay
Definition: iteminfo.h:343
int mView
Definition: iteminfo.h:353
std::string mUseButton
Definition: iteminfo.h:349
SpriteToItemMap * mSpriteToItemReplaceMap[10]
Definition: iteminfo.h:357
std::string mDescription
Definition: iteminfo.h:347
CursorT mPickupCursor
Definition: iteminfo.h:394
std::vector< ItemMenuItem > mStorageMenu
Definition: iteminfo.h:384
int mMissEffectId
Definition: iteminfo.h:391
const std::map< ItemColor, ItemColorData > * mColorsList
Definition: iteminfo.h:381
int mCriticalHitEffectId
Definition: iteminfo.h:390
int mDrawAfter[10]
Definition: iteminfo.h:334
std::vector< ItemMenuItem > mInventoryMenu
Definition: iteminfo.h:383
std::map< int, std::string > mAnimationFiles
Definition: iteminfo.h:376
std::map< ItemSoundEvent::Type, SoundInfoVect > mSounds
Definition: iteminfo.h:379
const std::map< ItemColor, ItemColorData > * mIconColorsList
Definition: iteminfo.h:382
ItemDbTypeT mType
Definition: iteminfo.h:351
std::string mWaterAttackAction
Definition: iteminfo.h:368
std::string mNameEn
Definition: iteminfo.h:346
std::string mColorsListName
Definition: iteminfo.h:386
std::vector< ItemMenuItem > mCartMenu
Definition: iteminfo.h:385
bool mProtected
Definition: iteminfo.h:395
int maxFloorOffsetX
Definition: iteminfo.h:392
std::string mSkyAttackAction
Definition: iteminfo.h:367
std::vector< SpriteToItemMap * > mSpriteToItemReplaceList
Definition: iteminfo.h:359
bool mIsRemoveSprites
Definition: iteminfo.h:355
std::string mEffect
Definition: iteminfo.h:348
std::string mAttackAction
Definition: iteminfo.h:366
std::string mUseButton2
Definition: iteminfo.h:350
std::map< int, int > mTags
Definition: iteminfo.h:380
static const int mapTileSize
Definition: map.h:27
const ItemColor ItemColor_zero
Definition: itemcolor.h:30
@ CURSOR_POINTER
Definition: cursor.h:29
static const std::string INVALID
Definition: spriteaction.h:72

References mDrawAfter, mDrawBefore, mDrawPriority, and mSpriteToItemReplaceMap.

◆ ~ItemInfo()

ItemInfo::~ItemInfo ( )

Definition at line 92 of file iteminfo.cpp.

93 {
96  for (int f = 0; f < 10; f ++)
97  mSpriteToItemReplaceMap[f] = nullptr;
98 }
void delete_all(Container &c)
Definition: dtor.h:56

References delete_all(), mSpriteToItemReplaceList, and mSpriteToItemReplaceMap.

Member Function Documentation

◆ addReplaceSprite()

IntMap * ItemInfo::addReplaceSprite ( const int  sprite,
const int  direction 
)

Definition at line 174 of file iteminfo.cpp.

176 {
177  if (direction < 0 || direction >= 10)
178  return nullptr;
179 
180  SpriteToItemMap *spMap = mSpriteToItemReplaceMap[direction];
181 
182  if (spMap == nullptr)
183  {
184  spMap = new SpriteToItemMap;
185  mSpriteToItemReplaceMap[direction] = spMap;
186  mSpriteToItemReplaceList.push_back(spMap);
187  }
188 
189  SpriteToItemMap::iterator it = spMap->find(sprite);
190  if (it == spMap->end())
191  {
192  IntMap tmp;
193  (*mSpriteToItemReplaceMap[direction])[sprite] = tmp;
194  it = mSpriteToItemReplaceMap[direction]->find(sprite);
195  }
196  return &it->second;
197 }
std::map< int, int > IntMap
Definition: intmap.h:27
std::map< int, IntMap > SpriteToItemMap
Definition: iteminfo.h:43

References mSpriteToItemReplaceList, and mSpriteToItemReplaceMap.

◆ addSound()

void ItemInfo::addSound ( const ItemSoundEvent::Type  event,
const std::string &  filename,
const int  delay 
)

Definition at line 153 of file iteminfo.cpp.

155 {
156  mSounds[event].push_back(SoundInfo(
157  filename,
158  delay));
159 }

References mSounds.

◆ addTag()

void ItemInfo::addTag ( const int  tag)
inline

Definition at line 226 of file iteminfo.h.

227  { mTags[tag] = 1; }

References mTags.

Referenced by ItemDB::load().

◆ getAttackAction()

const std::string& ItemInfo::getAttackAction ( ) const
inline

Definition at line 186 of file iteminfo.h.

187  { return mAttackAction; }

References mAttackAction.

Referenced by ItemDB::loadXmlFile().

◆ getAttackRange()

int ItemInfo::getAttackRange ( ) const
inline

Definition at line 198 of file iteminfo.h.

199  { return mAttackRange; }

References mAttackRange.

Referenced by ItemDB::loadXmlFile().

◆ getCardColor()

ItemColor ItemInfo::getCardColor ( ) const
inline

Definition at line 252 of file iteminfo.h.

253  { return mCardColor; }

References mCardColor.

Referenced by ItemDB::loadXmlFile().

◆ getCartMenu()

std::vector<ItemMenuItem>& ItemInfo::getCartMenu ( )
inline

Definition at line 323 of file iteminfo.h.

324  { return mCartMenu; }

References mCartMenu.

◆ getCartMenuConst()

const std::vector<ItemMenuItem>& ItemInfo::getCartMenuConst ( ) const
inline

Definition at line 330 of file iteminfo.h.

331  { return mCartMenu; }

References mCartMenu.

◆ getColor()

std::string ItemInfo::getColor ( const ItemColor  idx) const

Definition at line 430 of file iteminfo.cpp.

431 {
432  if (mColorsList == nullptr)
433  return std::string();
434 
435  const std::map <ItemColor, ItemColorData>::const_iterator
436  it = mColorsList->find(idx);
437  if (it == mColorsList->end())
438  {
439  reportAlways("Color %d for palette %s not found",
440  CAST_S32(idx),
441  mColorsListName.c_str())
442  return std::string();
443  }
444  return it->second.color;
445 }
#define CAST_S32
Definition: cast.h:30
#define reportAlways(...)
Definition: checkutils.h:253

References CAST_S32, mColorsList, mColorsListName, and reportAlways.

◆ getColorName()

std::string ItemInfo::getColorName ( const ItemColor  idx) const

Definition at line 413 of file iteminfo.cpp.

414 {
415  if (mColorsList == nullptr)
416  return std::string();
417 
418  const std::map <ItemColor, ItemColorData>::const_iterator
419  it = mColorsList->find(idx);
420  if (it == mColorsList->end())
421  {
422  reportAlways("Color %d for palette %s not found",
423  CAST_S32(idx),
424  mColorsListName.c_str())
425  return std::string();
426  }
427  return it->second.name;
428 }

References CAST_S32, mColorsList, mColorsListName, and reportAlways.

Referenced by CharCreateDialog::updateLook().

◆ getColorsListName()

std::string ItemInfo::getColorsListName ( ) const
inline

Definition at line 279 of file iteminfo.h.

280  { return mColorsListName; }

References mColorsListName.

Referenced by ItemDB::loadXmlFile().

◆ getColorsSize()

int ItemInfo::getColorsSize ( ) const
inline

Definition at line 304 of file iteminfo.h.

305  { return mColorsList != nullptr ? CAST_S32(mColorsList->size()) : 0; }

References CAST_S32, and mColorsList.

Referenced by CharCreateDialog::updateLook().

◆ getCriticalHitEffectId()

int ItemInfo::getCriticalHitEffectId ( ) const
inline

Definition at line 177 of file iteminfo.h.

178  { return mCriticalHitEffectId; }

References mCriticalHitEffectId.

Referenced by ItemDB::loadXmlFile().

◆ getDescription() [1/2]

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

Definition at line 100 of file iteminfo.h.

101  { return mDescription; }

References mDescription.

Referenced by ItemDB::loadXmlFile(), and ItemPopup::setItem().

◆ getDescription() [2/2]

const std::string ItemInfo::getDescription ( const ItemColor  color) const

Definition at line 253 of file iteminfo.cpp.

254 {
255  return replaceColors(mDescription, color);
256 }
const std::string replaceColors(std::string str, const ItemColor color) const
Definition: iteminfo.cpp:268

References mDescription, and replaceColors().

◆ getDisplay()

const SpriteDisplay& ItemInfo::getDisplay ( ) const
inline

Definition at line 94 of file iteminfo.h.

95  { return mDisplay; }

References mDisplay.

Referenced by ItemPopup::setItem().

◆ getDrawAfter()

int ItemInfo::getDrawAfter ( const int  direction) const

Definition at line 392 of file iteminfo.cpp.

393 {
394  if (direction < 0 || direction >= 10)
395  return -1;
396  return mDrawAfter[direction];
397 }

References mDrawAfter.

◆ getDrawBefore()

int ItemInfo::getDrawBefore ( const int  direction) const

Definition at line 385 of file iteminfo.cpp.

386 {
387  if (direction < 0 || direction >= 10)
388  return -1;
389  return mDrawBefore[direction];
390 }

References mDrawBefore.

◆ getDrawPriority()

int ItemInfo::getDrawPriority ( const int  direction) const

Definition at line 399 of file iteminfo.cpp.

400 {
401  if (direction < 0 || direction >= 10)
402  return 0;
403  return mDrawPriority[direction];
404 }

References mDrawPriority.

◆ getDyeColorsString()

std::string ItemInfo::getDyeColorsString ( const ItemColor  color) const

Definition at line 227 of file iteminfo.cpp.

228 {
229  if ((mColorsList == nullptr) || mColorsListName.empty())
230  return "";
231 
232  const std::map <ItemColor, ItemColorData>::const_iterator
233  it = mColorsList->find(color);
234  if (it == mColorsList->end())
235  return "";
236 
237  return it->second.color;
238 }

References mColorsList, and mColorsListName.

Referenced by EAthena::BeingRecv::processBeingChangeLookContinue(), and CharCreateDialog::updateHair().

◆ getDyeIconColorsString()

std::string ItemInfo::getDyeIconColorsString ( const ItemColor  color) const

Definition at line 240 of file iteminfo.cpp.

241 {
242  if ((mIconColorsList == nullptr) || mIconColorsListName.empty())
243  return "";
244 
245  const std::map <ItemColor, ItemColorData>::const_iterator
246  it = mIconColorsList->find(color);
247  if (it == mIconColorsList->end())
248  return "";
249 
250  return it->second.color;
251 }

References mIconColorsList, and mIconColorsListName.

Referenced by ItemPopup::setItem().

◆ getEffect()

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

Definition at line 109 of file iteminfo.h.

110  { return mEffect; }

References mEffect.

Referenced by ItemDB::loadXmlFile(), and ItemPopup::setItem().

◆ getHitEffectId()

int ItemInfo::getHitEffectId ( ) const
inline

Definition at line 171 of file iteminfo.h.

172  { return mHitEffectId; }

References mHitEffectId.

Referenced by ItemDB::loadXmlFile().

◆ getIconColor()

std::string ItemInfo::getIconColor ( const ItemColor  idx) const

Definition at line 464 of file iteminfo.cpp.

465 {
466  if (mIconColorsList == nullptr)
467  return std::string();
468 
469  const std::map <ItemColor, ItemColorData>::const_iterator
470  it = mIconColorsList->find(idx);
471  if (it == mIconColorsList->end())
472  {
473  reportAlways("Color %d for palette %s not found",
474  CAST_S32(idx),
475  mColorsListName.c_str())
476  return std::string();
477  }
478  return it->second.color;
479 }

References CAST_S32, mColorsListName, mIconColorsList, and reportAlways.

◆ getIconColorName()

std::string ItemInfo::getIconColorName ( const ItemColor  idx) const

Definition at line 447 of file iteminfo.cpp.

448 {
449  if (mIconColorsList == nullptr)
450  return std::string();
451 
452  const std::map <ItemColor, ItemColorData>::const_iterator
453  it = mIconColorsList->find(idx);
454  if (it == mIconColorsList->end())
455  {
456  reportAlways("Color %d for palette %s not found",
457  CAST_S32(idx),
458  mColorsListName.c_str())
459  return std::string();
460  }
461  return it->second.name;
462 }

References CAST_S32, mColorsListName, mIconColorsList, and reportAlways.

◆ getIconColorsListName()

std::string ItemInfo::getIconColorsListName ( ) const
inline

Definition at line 282 of file iteminfo.h.

283  { return mIconColorsListName; }

References mIconColorsListName.

Referenced by ItemDB::loadXmlFile().

◆ getIconColorsSize()

int ItemInfo::getIconColorsSize ( ) const
inline

Definition at line 307 of file iteminfo.h.

308  {
309  return mIconColorsList != nullptr ?
310  CAST_S32(mIconColorsList->size()) : 0;
311  }

References CAST_S32, and mIconColorsList.

◆ getId()

int ItemInfo::getId ( ) const
inline

Definition at line 68 of file iteminfo.h.

69  { return mId; }

References mId.

Referenced by ItemAmountWindow::action(), replaceItemLinks(), and ItemPopup::setItem().

◆ getInventoryMenu()

std::vector<ItemMenuItem>& ItemInfo::getInventoryMenu ( )
inline

Definition at line 319 of file iteminfo.h.

320  { return mInventoryMenu; }

References mInventoryMenu.

◆ getInventoryMenuConst()

const std::vector<ItemMenuItem>& ItemInfo::getInventoryMenuConst ( ) const
inline

Definition at line 326 of file iteminfo.h.

327  { return mInventoryMenu; }

References mInventoryMenu.

◆ getLink()

const std::string ItemInfo::getLink ( ) const

Definition at line 481 of file iteminfo.cpp.

482 {
483  return strprintf("[@@%d|%s@@]", mId, mName.c_str());
484 }
std::string strprintf(const char *const format,...)

References mId, mName, and strprintf().

◆ getMaxFloorOffsetX()

int ItemInfo::getMaxFloorOffsetX ( ) const
inline

Definition at line 241 of file iteminfo.h.

242  { return maxFloorOffsetX; }

References maxFloorOffsetX.

◆ getMaxFloorOffsetY()

int ItemInfo::getMaxFloorOffsetY ( ) const
inline

Definition at line 244 of file iteminfo.h.

245  { return maxFloorOffsetY; }

References maxFloorOffsetY.

◆ getMissEffectId()

int ItemInfo::getMissEffectId ( ) const
inline

Definition at line 183 of file iteminfo.h.

184  { return mMissEffectId; }

References mMissEffectId.

Referenced by ItemDB::loadXmlFile().

◆ getMissile()

MissileInfo& ItemInfo::getMissile ( )
inline

Definition at line 162 of file iteminfo.h.

163  { return mMissile; }

References mMissile.

◆ getMissileConst()

const MissileInfo& ItemInfo::getMissileConst ( ) const
inline

Definition at line 165 of file iteminfo.h.

166  { return mMissile; }

References mMissile.

Referenced by ItemDB::loadXmlFile().

◆ getName() [1/2]

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

◆ getName() [2/2]

const std::string ItemInfo::getName ( const ItemColor  color) const

Definition at line 258 of file iteminfo.cpp.

259 {
260  return replaceColors(mName, color);
261 }

References mName, and replaceColors().

◆ getNameEn() [1/2]

const std::string& ItemInfo::getNameEn ( ) const
inline

Definition at line 83 of file iteminfo.h.

84  { return mNameEn; }

References mNameEn.

◆ getNameEn() [2/2]

const std::string ItemInfo::getNameEn ( const ItemColor  color) const

Definition at line 263 of file iteminfo.cpp.

264 {
265  return replaceColors(mNameEn, color);
266 }

References mNameEn, and replaceColors().

◆ getPickupCursor()

CursorT ItemInfo::getPickupCursor ( ) const
inline

Definition at line 295 of file iteminfo.h.

296  { return mPickupCursor; }

References mPickupCursor.

◆ getReplaceToSpriteId()

int ItemInfo::getReplaceToSpriteId ( int  id) const

◆ getRideAttackAction()

const std::string& ItemInfo::getRideAttackAction ( ) const
inline

Definition at line 195 of file iteminfo.h.

196  { return mRideAttackAction; }

References mRideAttackAction.

Referenced by ItemDB::loadXmlFile().

◆ getSkyAttackAction()

const std::string& ItemInfo::getSkyAttackAction ( ) const
inline

Definition at line 189 of file iteminfo.h.

190  { return mSkyAttackAction; }

References mSkyAttackAction.

Referenced by ItemDB::loadXmlFile().

◆ getSound()

const SoundInfo & ItemInfo::getSound ( const ItemSoundEvent::Type  event) const

Definition at line 161 of file iteminfo.cpp.

162 {
163  static const SoundInfo empty("", 0);
164  std::map<ItemSoundEvent::Type, SoundInfoVect>::const_iterator i;
165 
166  i = mSounds.find(event);
167 
168  if (i == mSounds.end())
169  return empty;
170  return (!i->second.empty()) ? i->second[CAST_U32(rand())
171  % i->second.size()] : empty;
172 }
#define CAST_U32
Definition: cast.h:31
std::string empty
Definition: podict.cpp:26

References CAST_U32, empty, and mSounds.

Referenced by ItemSoundManager::getSoundEffect().

◆ getSprite()

const std::string & ItemInfo::getSprite ( const GenderT  gender,
const BeingTypeId  race 
) const

Definition at line 100 of file iteminfo.cpp.

102 {
103  if (mView != 0)
104  {
105  // Forward the request to the item defining how to view this item
106  return ItemDB::get(mView).getSprite(gender, race);
107  }
108  static const std::string empty;
109  std::map<int, std::string>::const_iterator i =
110  mAnimationFiles.find(CAST_S32(gender) +
111  toInt(race, int) * 4);
112 
113  if (i != mAnimationFiles.end())
114  return i->second;
115  i = mAnimationFiles.find(CAST_S32(gender));
116  if (i != mAnimationFiles.end())
117  return i->second;
118  return empty;
119 }
const std::string & getSprite(const GenderT gender, const BeingTypeId race) const
Definition: iteminfo.cpp:100
#define toInt(val, name)
Definition: intdefines.h:47
const ItemInfo & get(const int id)
Definition: itemdb.cpp:792

References CAST_S32, empty, ItemDB::get(), getSprite(), mAnimationFiles, mView, and toInt.

Referenced by Inventory::findItemBySprite(), and getSprite().

◆ getSpriteToItemReplaceMap()

const SpriteToItemMap * ItemInfo::getSpriteToItemReplaceMap ( const int  directions) const

Definition at line 293 of file iteminfo.cpp.

295 {
296  if (direction < 0 || direction >= 10)
297  return nullptr;
298 
299  const SpriteToItemMap *const spMap = mSpriteToItemReplaceMap[direction];
300  if (spMap != nullptr)
301  return spMap;
302  if (direction == SpriteDirection::UPLEFT
303  || direction == SpriteDirection::UPRIGHT)
304  {
306  }
307 
308  if (direction == SpriteDirection::DOWNLEFT
309  || direction == SpriteDirection::DOWNRIGHT)
310  {
312  }
313 
314  return nullptr;
315 }

References SpriteDirection::DOWN, SpriteDirection::DOWNLEFT, SpriteDirection::DOWNRIGHT, mSpriteToItemReplaceMap, SpriteDirection::UP, SpriteDirection::UPLEFT, and SpriteDirection::UPRIGHT.

◆ getStorageMenu()

std::vector<ItemMenuItem>& ItemInfo::getStorageMenu ( )
inline

Definition at line 321 of file iteminfo.h.

322  { return mStorageMenu; }

References mStorageMenu.

◆ getStorageMenuConst()

const std::vector<ItemMenuItem>& ItemInfo::getStorageMenuConst ( ) const
inline

Definition at line 328 of file iteminfo.h.

329  { return mStorageMenu; }

References mStorageMenu.

◆ getTags()

const IntMap& ItemInfo::getTags ( ) const
inline

Definition at line 223 of file iteminfo.h.

224  { return mTags; }

References mTags.

◆ getType()

ItemDbTypeT ItemInfo::getType ( ) const
inline

◆ getUseButton()

const std::string& ItemInfo::getUseButton ( ) const
inline

Definition at line 118 of file iteminfo.h.

119  { return mUseButton; }

References mUseButton.

Referenced by ItemDB::loadXmlFile().

◆ getUseButton2()

const std::string& ItemInfo::getUseButton2 ( ) const
inline

Definition at line 124 of file iteminfo.h.

125  { return mUseButton2; }

References mUseButton2.

◆ getView()

int ItemInfo::getView ( ) const
inline

Definition at line 136 of file iteminfo.h.

137  { return mView; }

References mView.

Referenced by ItemDB::loadXmlFile().

◆ getWaterAttackAction()

const std::string& ItemInfo::getWaterAttackAction ( ) const
inline

Definition at line 192 of file iteminfo.h.

193  { return mWaterAttackAction; }

References mWaterAttackAction.

Referenced by ItemDB::loadXmlFile().

◆ getWeight()

int ItemInfo::getWeight ( ) const
inline

Definition at line 133 of file iteminfo.h.

134  { return mWeight; }

References mWeight.

Referenced by ItemDB::loadXmlFile(), and ItemPopup::setItem().

◆ isHaveColors()

bool ItemInfo::isHaveColors ( ) const
inline

Definition at line 273 of file iteminfo.h.

274  { return !mColorsListName.empty(); }

References mColorsListName.

◆ isHaveIconColors()

bool ItemInfo::isHaveIconColors ( ) const
inline

Definition at line 276 of file iteminfo.h.

277  { return !mIconColorsListName.empty(); }

References mIconColorsListName.

◆ isProtected()

bool ItemInfo::isProtected ( ) const
inline

Definition at line 301 of file iteminfo.h.

302  { return mProtected; }

References mProtected.

◆ isRemoveItemId()

bool ItemInfo::isRemoveItemId ( int  id) const

◆ isRemoveSprites()

bool ItemInfo::isRemoveSprites ( ) const
inline

Definition at line 232 of file iteminfo.h.

233  { return mIsRemoveSprites; }

References mIsRemoveSprites.

◆ replaceColors()

const std::string ItemInfo::replaceColors ( std::string  str,
const ItemColor  color 
) const

Definition at line 268 of file iteminfo.cpp.

270 {
271  std::string name;
272  if ((mColorsList != nullptr) && !mColorsListName.empty())
273  {
274  const std::map <ItemColor, ItemColorData>::const_iterator
275  it = mColorsList->find(color);
276  if (it == mColorsList->end())
277  name = "unknown";
278  else
279  name = it->second.name;
280  }
281  else
282  {
283  name = "unknown";
284  }
285 
286  str = replaceAll(str, "%color%", name);
287  if (!name.empty())
288  name[0] = CAST_S8(toupper(name[0]));
289 
290  return replaceAll(str, "%Color%", name);
291 }
#define CAST_S8
Definition: cast.h:26
std::string & replaceAll(std::string &context, const std::string &from, const std::string &to)

References CAST_S8, mColorsList, mColorsListName, and replaceAll().

Referenced by getDescription(), getName(), and getNameEn().

◆ setAttackAction()

void ItemInfo::setAttackAction ( const std::string &  attackAction)

Definition at line 121 of file iteminfo.cpp.

122 {
123  if (attackAction.empty())
124  mAttackAction = SpriteAction::ATTACK; // (Equal to unarmed animation)
125  else
126  mAttackAction = attackAction;
127 }
static const std::string ATTACK("attack")

References SpriteAction::ATTACK(), and mAttackAction.

◆ setAttackRange()

void ItemInfo::setAttackRange ( const int  r)
inline

Definition at line 201 of file iteminfo.h.

202  { mAttackRange = r; }

References mAttackRange.

◆ setCardColor()

void ItemInfo::setCardColor ( const ItemColor  color)
inline

Definition at line 249 of file iteminfo.h.

250  { mCardColor = color; }

References mCardColor.

◆ setColorsList()

void ItemInfo::setColorsList ( const std::string &  name)

Definition at line 199 of file iteminfo.cpp.

200 {
201  if (name.empty())
202  {
203  mColorsList = nullptr;
204  mColorsListName.clear();
205  }
206  else
207  {
209  mColorsListName = name;
210  }
211 }
const std::map< ItemColor, ItemColorData > * getColorsList(const std::string &name)
Definition: colordb.cpp:219

References ColorDB::getColorsList(), mColorsList, and mColorsListName.

◆ setCriticalHitEffectId()

void ItemInfo::setCriticalHitEffectId ( const int  s)
inline

Definition at line 174 of file iteminfo.h.

175  { mCriticalHitEffectId = s; }

References mCriticalHitEffectId.

◆ setDescription()

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

Definition at line 97 of file iteminfo.h.

98  { mDescription = description; }

References mDescription.

◆ setDisplay()

void ItemInfo::setDisplay ( const SpriteDisplay display)
inline

Definition at line 91 of file iteminfo.h.

92  { mDisplay = display; }

References mDisplay.

Referenced by ItemDB::load().

◆ setDrawAfter()

void ItemInfo::setDrawAfter ( const int  direction,
const int  n 
)

Definition at line 375 of file iteminfo.cpp.

376 {
377  setSpriteOrder(&mDrawAfter[0], direction, n, -1);
378 }
static void setSpriteOrder(int *const ptr, const int direction, const int n, const int def)
Definition: iteminfo.cpp:317

References mDrawAfter, and setSpriteOrder().

◆ setDrawBefore()

void ItemInfo::setDrawBefore ( const int  direction,
const int  n 
)

Definition at line 370 of file iteminfo.cpp.

371 {
372  setSpriteOrder(&mDrawBefore[0], direction, n, -1);
373 }

References mDrawBefore, and setSpriteOrder().

◆ setDrawPriority()

void ItemInfo::setDrawPriority ( const int  direction,
const int  n 
)

Definition at line 380 of file iteminfo.cpp.

381 {
382  setSpriteOrder(&mDrawPriority[0], direction, n, 0);
383 }

References mDrawPriority, and setSpriteOrder().

◆ setEffect()

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

Definition at line 106 of file iteminfo.h.

107  { mEffect = effect; }

References mEffect.

◆ setHitEffectId()

void ItemInfo::setHitEffectId ( const int  s)
inline

Definition at line 168 of file iteminfo.h.

169  { mHitEffectId = s; }

References mHitEffectId.

◆ setIconColorsList()

void ItemInfo::setIconColorsList ( const std::string &  name)

Definition at line 213 of file iteminfo.cpp.

214 {
215  if (name.empty())
216  {
217  mIconColorsList = nullptr;
218  mIconColorsListName.clear();
219  }
220  else
221  {
223  mIconColorsListName = name;
224  }
225 }

References ColorDB::getColorsList(), mIconColorsList, and mIconColorsListName.

◆ setId()

void ItemInfo::setId ( const int  id)
inline

Definition at line 65 of file iteminfo.h.

66  { mId = id; }

References mId.

◆ setMaxFloorOffsetX()

void ItemInfo::setMaxFloorOffsetX ( const int  i)
inline

Definition at line 235 of file iteminfo.h.

236  { maxFloorOffsetX = i; }

References maxFloorOffsetX.

◆ setMaxFloorOffsetY()

void ItemInfo::setMaxFloorOffsetY ( const int  i)
inline

Definition at line 238 of file iteminfo.h.

239  { maxFloorOffsetY = i; }

References maxFloorOffsetY.

◆ setMissEffectId()

void ItemInfo::setMissEffectId ( const int  s)
inline

Definition at line 180 of file iteminfo.h.

181  { mMissEffectId = s; }

References mMissEffectId.

◆ setMissileParticleFile()

void ItemInfo::setMissileParticleFile ( const std::string &  s)
inline

Definition at line 159 of file iteminfo.h.

160  { mMissile.particle = s; }
std::string particle
Definition: missileinfo.h:41

References mMissile, and MissileInfo::particle.

◆ setName()

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

Definition at line 71 of file iteminfo.h.

72  { mName = name; }

References mName.

Referenced by ItemDB::load().

◆ setNameEn()

void ItemInfo::setNameEn ( const std::string &  name)
inline

Definition at line 80 of file iteminfo.h.

81  { mNameEn = name; }

References mNameEn.

◆ setPickupCursor() [1/2]

void ItemInfo::setPickupCursor ( const CursorT cursor)
inline

Definition at line 292 of file iteminfo.h.

293  { mPickupCursor = cursor; }

References mPickupCursor.

◆ setPickupCursor() [2/2]

void ItemInfo::setPickupCursor ( const std::string &  cursor)
inline

Definition at line 289 of file iteminfo.h.

290  { return setPickupCursor(Cursors::stringToCursor(cursor)); }
void setPickupCursor(const std::string &cursor)
Definition: iteminfo.h:289
CursorT stringToCursor(const std::string &name)
Definition: cursors.cpp:60

References Cursors::stringToCursor().

◆ setProtected()

void ItemInfo::setProtected ( const bool  b)
inline

Definition at line 298 of file iteminfo.h.

299  { mProtected = b; }

References mProtected.

◆ setRemoveSprites()

void ItemInfo::setRemoveSprites ( )
inline

Definition at line 229 of file iteminfo.h.

230  { mIsRemoveSprites = true; }

References mIsRemoveSprites.

◆ setRideAttackAction()

void ItemInfo::setRideAttackAction ( const std::string &  attackAction)

Definition at line 145 of file iteminfo.cpp.

146 {
147  if (attackAction.empty())
149  else
150  mRideAttackAction = attackAction;
151 }
static const std::string ATTACKRIDE("attackride")

References SpriteAction::ATTACKRIDE(), and mRideAttackAction.

◆ setSkyAttackAction()

void ItemInfo::setSkyAttackAction ( const std::string &  attackAction)

Definition at line 129 of file iteminfo.cpp.

130 {
131  if (attackAction.empty())
133  else
134  mSkyAttackAction = attackAction;
135 }
static const std::string ATTACKSKY("attacksky")

References SpriteAction::ATTACKSKY(), and mSkyAttackAction.

◆ setSprite()

void ItemInfo::setSprite ( const std::string &  animationFile,
const GenderT  gender,
const int  race 
)

Definition at line 406 of file iteminfo.cpp.

409 {
410  mAnimationFiles[CAST_S32(gender) + race * 4] = animationFile;
411 }

References CAST_S32, and mAnimationFiles.

Referenced by ItemDB::load().

◆ setSpriteOrder()

void ItemInfo::setSpriteOrder ( int *const  ptr,
const int  direction,
const int  n,
const int  def 
)
staticprivate

Definition at line 317 of file iteminfo.cpp.

321 {
322  switch (direction)
323  {
324  case -1:
325  {
326  for (int f = 0; f < 10; f ++)
327  {
328  if (ptr[f] == def)
329  ptr[f] = n;
330  }
331  return;
332  }
333  case -2:
334  {
335  ptr[SpriteDirection::DOWN] = n;
336  ptr[SpriteDirection::DOWNLEFT] = n;
338  return;
339  }
340  case -3:
341  {
342  ptr[SpriteDirection::UP] = n;
343  ptr[SpriteDirection::UPLEFT] = n;
344  ptr[SpriteDirection::UPRIGHT] = n;
345  return;
346  }
347  default:
348  break;
349  }
350  if (direction < 0 || direction >= 9)
351  return;
352 
353  if (direction == SpriteDirection::UP)
354  {
355  if (ptr[SpriteDirection::UPLEFT] == def)
356  ptr[SpriteDirection::UPLEFT] = n;
357  if (ptr[SpriteDirection::UPRIGHT] == def)
358  ptr[SpriteDirection::UPRIGHT] = n;
359  }
360  else if (direction == SpriteDirection::DOWN)
361  {
362  if (ptr[SpriteDirection::DOWNLEFT] == def)
363  ptr[SpriteDirection::DOWNLEFT] = n;
364  if (ptr[SpriteDirection::DOWNRIGHT] == def)
366  }
367  ptr[direction] = n;
368 }

References SpriteDirection::DOWN, SpriteDirection::DOWNLEFT, SpriteDirection::DOWNRIGHT, SpriteDirection::UP, SpriteDirection::UPLEFT, and SpriteDirection::UPRIGHT.

Referenced by setDrawAfter(), setDrawBefore(), and setDrawPriority().

◆ setType()

void ItemInfo::setType ( const ItemDbTypeT  type)
inline

Definition at line 112 of file iteminfo.h.

113  { mType = type; }

References mType.

◆ setUseButton()

void ItemInfo::setUseButton ( const std::string &  str)
inline

Definition at line 115 of file iteminfo.h.

116  { mUseButton = str; }

References mUseButton.

◆ setUseButton2()

void ItemInfo::setUseButton2 ( const std::string &  str)
inline

Definition at line 121 of file iteminfo.h.

122  { mUseButton2 = str; }

References mUseButton2.

◆ setView()

void ItemInfo::setView ( const int  view)
inline

Definition at line 139 of file iteminfo.h.

140  { mView = view; }

References mView.

◆ setWaterAttackAction()

void ItemInfo::setWaterAttackAction ( const std::string &  attackAction)

Definition at line 137 of file iteminfo.cpp.

138 {
139  if (attackAction.empty())
141  else
142  mWaterAttackAction = attackAction;
143 }
static const std::string ATTACKWATER("attackwater")

References SpriteAction::ATTACKWATER(), and mWaterAttackAction.

◆ setWeight()

void ItemInfo::setWeight ( const int  weight)
inline

Definition at line 130 of file iteminfo.h.

131  { mWeight = weight; }

References mWeight.

Field Documentation

◆ mAnimationFiles

std::map<int, std::string> ItemInfo::mAnimationFiles
private

Maps gender to sprite filenames.

Definition at line 376 of file iteminfo.h.

Referenced by getSprite(), and setSprite().

◆ mAttackAction

std::string ItemInfo::mAttackAction
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().

◆ mAttackRange

int ItemInfo::mAttackRange
private

Attack range, will be zero if non weapon.

Definition at line 370 of file iteminfo.h.

Referenced by getAttackRange(), and setAttackRange().

◆ maxFloorOffsetX

int ItemInfo::maxFloorOffsetX
private

Definition at line 392 of file iteminfo.h.

Referenced by getMaxFloorOffsetX(), and setMaxFloorOffsetX().

◆ maxFloorOffsetY

int ItemInfo::maxFloorOffsetY
private

Definition at line 393 of file iteminfo.h.

Referenced by getMaxFloorOffsetY(), and setMaxFloorOffsetY().

◆ mCardColor

ItemColor ItemInfo::mCardColor
private

Definition at line 388 of file iteminfo.h.

Referenced by getCardColor(), and setCardColor().

◆ mCartMenu

std::vector<ItemMenuItem> ItemInfo::mCartMenu
private

Definition at line 385 of file iteminfo.h.

Referenced by getCartMenu(), and getCartMenuConst().

◆ mColorsList

const std::map<ItemColor, ItemColorData>* ItemInfo::mColorsList
private

◆ mColorsListName

std::string ItemInfo::mColorsListName
private

◆ mCriticalHitEffectId

int ItemInfo::mCriticalHitEffectId
private

Definition at line 390 of file iteminfo.h.

Referenced by getCriticalHitEffectId(), and setCriticalHitEffectId().

◆ mDescription

std::string ItemInfo::mDescription
private

Short description.

Definition at line 347 of file iteminfo.h.

Referenced by getDescription(), and setDescription().

◆ mDisplay

SpriteDisplay ItemInfo::mDisplay
private

Display info (like icon)

Definition at line 343 of file iteminfo.h.

Referenced by getDisplay(), and setDisplay().

◆ mDrawAfter

int ItemInfo::mDrawAfter[10]

Definition at line 334 of file iteminfo.h.

Referenced by getDrawAfter(), ItemInfo(), and setDrawAfter().

◆ mDrawBefore

int ItemInfo::mDrawBefore[10]

Definition at line 333 of file iteminfo.h.

Referenced by getDrawBefore(), ItemInfo(), and setDrawBefore().

◆ mDrawPriority

int ItemInfo::mDrawPriority[10]

Definition at line 335 of file iteminfo.h.

Referenced by getDrawPriority(), ItemInfo(), Being::recalcSpritesOrder(), and setDrawPriority().

◆ mEffect

std::string ItemInfo::mEffect
private

Description of effects.

Definition at line 348 of file iteminfo.h.

Referenced by getEffect(), and setEffect().

◆ mHitEffectId

int ItemInfo::mHitEffectId
private

Definition at line 389 of file iteminfo.h.

Referenced by getHitEffectId(), and setHitEffectId().

◆ mIconColorsList

const std::map<ItemColor, ItemColorData>* ItemInfo::mIconColorsList
private

◆ mIconColorsListName

std::string ItemInfo::mIconColorsListName
private

◆ mId

int ItemInfo::mId
private

Item ID

Definition at line 354 of file iteminfo.h.

Referenced by getId(), getLink(), and setId().

◆ mInventoryMenu

std::vector<ItemMenuItem> ItemInfo::mInventoryMenu
private

Definition at line 383 of file iteminfo.h.

Referenced by getInventoryMenu(), and getInventoryMenuConst().

◆ mIsRemoveSprites

bool ItemInfo::mIsRemoveSprites
private

Definition at line 355 of file iteminfo.h.

Referenced by isRemoveSprites(), and setRemoveSprites().

◆ mMissEffectId

int ItemInfo::mMissEffectId
private

Definition at line 391 of file iteminfo.h.

Referenced by getMissEffectId(), and setMissEffectId().

◆ mMissile

MissileInfo ItemInfo::mMissile
private

Definition at line 344 of file iteminfo.h.

Referenced by getMissile(), getMissileConst(), and setMissileParticleFile().

◆ mMissileParticle

std::string ItemInfo::mMissileParticle
private

Definition at line 373 of file iteminfo.h.

◆ mName

std::string ItemInfo::mName
private

Definition at line 345 of file iteminfo.h.

Referenced by getLink(), getName(), and setName().

◆ mNameEn

std::string ItemInfo::mNameEn
private

Definition at line 346 of file iteminfo.h.

Referenced by getNameEn(), and setNameEn().

◆ mPickupCursor

CursorT ItemInfo::mPickupCursor
private

Definition at line 394 of file iteminfo.h.

Referenced by getPickupCursor(), and setPickupCursor().

◆ mProtected

bool ItemInfo::mProtected
private

Definition at line 395 of file iteminfo.h.

Referenced by isProtected(), and setProtected().

◆ mRideAttackAction

std::string ItemInfo::mRideAttackAction
private

Definition at line 369 of file iteminfo.h.

Referenced by getRideAttackAction(), and setRideAttackAction().

◆ mSkyAttackAction

std::string ItemInfo::mSkyAttackAction
private

Definition at line 367 of file iteminfo.h.

Referenced by getSkyAttackAction(), and setSkyAttackAction().

◆ mSounds

std::map<ItemSoundEvent::Type, SoundInfoVect> ItemInfo::mSounds
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().

◆ mSpriteToItemReplaceList

std::vector<SpriteToItemMap*> ItemInfo::mSpriteToItemReplaceList
private

Definition at line 359 of file iteminfo.h.

Referenced by addReplaceSprite(), and ~ItemInfo().

◆ mSpriteToItemReplaceMap

SpriteToItemMap* ItemInfo::mSpriteToItemReplaceMap[10]
private

Definition at line 357 of file iteminfo.h.

Referenced by addReplaceSprite(), getSpriteToItemReplaceMap(), ItemInfo(), and ~ItemInfo().

◆ mStorageMenu

std::vector<ItemMenuItem> ItemInfo::mStorageMenu
private

Definition at line 384 of file iteminfo.h.

Referenced by getStorageMenu(), and getStorageMenuConst().

◆ mTags

std::map<int, int> ItemInfo::mTags
private

Definition at line 380 of file iteminfo.h.

Referenced by addTag(), and getTags().

◆ mType

ItemDbTypeT ItemInfo::mType
private

Item type.

Definition at line 351 of file iteminfo.h.

Referenced by getType(), and setType().

◆ mUseButton

std::string ItemInfo::mUseButton
private

Definition at line 349 of file iteminfo.h.

Referenced by getUseButton(), and setUseButton().

◆ mUseButton2

std::string ItemInfo::mUseButton2
private

Definition at line 350 of file iteminfo.h.

Referenced by getUseButton2(), and setUseButton2().

◆ mView

int ItemInfo::mView
private

Item ID of how this item looks.

Definition at line 353 of file iteminfo.h.

Referenced by getSprite(), getView(), and setView().

◆ mWaterAttackAction

std::string ItemInfo::mWaterAttackAction
private

Definition at line 368 of file iteminfo.h.

Referenced by getWaterAttackAction(), and setWaterAttackAction().

◆ mWeight

int ItemInfo::mWeight
private

Weight in grams.

Definition at line 352 of file iteminfo.h.

Referenced by getWeight(), and setWeight().


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