56 mIsRemoveSprites(false),
57 mSpriteToItemReplaceList(),
73 mIconColorsListName(),
76 mCriticalHitEffectId(-1),
83 for (
int f = 0; f < 10; f ++)
96 for (
int f = 0; f < 10; f ++)
108 static const std::string
empty;
109 std::map<int, std::string>::const_iterator i =
111 toInt(race,
int) * 4);
123 if (attackAction.empty())
131 if (attackAction.empty())
139 if (attackAction.empty())
147 if (attackAction.empty())
154 const std::string &filename,
const int delay)
164 std::map<ItemSoundEvent::Type, SoundInfoVect>::const_iterator i;
170 return (!i->second.empty()) ? i->second[
CAST_U32(rand())
171 % i->second.size()] :
empty;
177 if (direction < 0 || direction >= 10)
182 if (spMap ==
nullptr)
189 SpriteToItemMap::iterator it = spMap->find(sprite);
190 if (it == spMap->end())
232 const std::map <ItemColor, ItemColorData>::const_iterator
237 return it->second.color;
245 const std::map <ItemColor, ItemColorData>::const_iterator
250 return it->second.color;
274 const std::map <ItemColor, ItemColorData>::const_iterator
279 name = it->second.name;
288 name[0] =
CAST_S8(toupper(name[0]));
296 if (direction < 0 || direction >= 10)
300 if (spMap !=
nullptr)
326 for (
int f = 0; f < 10; f ++)
350 if (direction < 0 || direction >= 9)
387 if (direction < 0 || direction >= 10)
394 if (direction < 0 || direction >= 10)
401 if (direction < 0 || direction >= 10)
416 return std::string();
418 const std::map <ItemColor, ItemColorData>::const_iterator
425 return std::string();
427 return it->second.name;
433 return std::string();
435 const std::map <ItemColor, ItemColorData>::const_iterator
442 return std::string();
444 return it->second.color;
450 return std::string();
452 const std::map <ItemColor, ItemColorData>::const_iterator
459 return std::string();
461 return it->second.name;
467 return std::string();
469 const std::map <ItemColor, ItemColorData>::const_iterator
476 return std::string();
478 return it->second.color;
#define reportAlways(...)
const std::string & getSprite(const GenderT gender, const BeingTypeId race) const
const std::string & getDescription() const
std::string getColor(const ItemColor idx) const
const std::string & getName() const
std::string getIconColorName(const ItemColor idx) const
void setRideAttackAction(const std::string &attackAction)
int getDrawAfter(const int direction) const
void setSkyAttackAction(const std::string &attackAction)
std::string getDyeColorsString(const ItemColor color) const
int getDrawBefore(const int direction) const
const std::string & getNameEn() const
std::string getColorName(const ItemColor idx) const
std::string mRideAttackAction
IntMap * addReplaceSprite(const int sprite, const int direction)
std::string getIconColor(const ItemColor idx) const
std::string mIconColorsListName
SpriteToItemMap * mSpriteToItemReplaceMap[10]
const SoundInfo & getSound(const ItemSoundEvent::Type event) const
void setIconColorsList(const std::string &name)
int getDrawPriority(const int direction) const
void setColorsList(const std::string &name)
const std::map< ItemColor, ItemColorData > * mColorsList
void setSprite(const std::string &animationFile, const GenderT gender, const int race)
void setDrawAfter(const int direction, const int n)
std::map< int, std::string > mAnimationFiles
std::map< ItemSoundEvent::Type, SoundInfoVect > mSounds
const std::map< ItemColor, ItemColorData > * mIconColorsList
void setAttackAction(const std::string &attackAction)
const std::string getLink() const
std::string mWaterAttackAction
void addSound(const ItemSoundEvent::Type event, const std::string &filename, const int delay)
const SpriteToItemMap * getSpriteToItemReplaceMap(const int directions) const
void setDrawPriority(const int direction, const int n)
std::string mColorsListName
static void setSpriteOrder(int *const ptr, const int direction, const int n, const int def)
void setWaterAttackAction(const std::string &attackAction)
const std::string replaceColors(std::string str, const ItemColor color) const
std::string getDyeIconColorsString(const ItemColor color) const
std::string mSkyAttackAction
void setDrawBefore(const int direction, const int n)
std::vector< SpriteToItemMap * > mSpriteToItemReplaceList
std::string mAttackAction
static const int mapTileSize
void delete_all(Container &c)
std::map< int, int > IntMap
const ItemColor ItemColor_zero
std::map< int, IntMap > SpriteToItemMap
const std::map< ItemColor, ItemColorData > * getColorsList(const std::string &name)
const ItemInfo & get(const int id)
static const std::string ATTACKWATER("attackwater")
static const std::string ATTACKSKY("attacksky")
static const std::string INVALID
static const std::string ATTACKRIDE("attackride")
static const std::string ATTACK("attack")
std::vector< std::string > mSounds
std::string & replaceAll(std::string &context, const std::string &from, const std::string &to)
std::string strprintf(const char *const format,...)