summaryrefslogtreecommitdiff
path: root/src/resources/iteminfo.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-07 20:11:00 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-07 20:44:11 +0300
commit8ec4e8575001e50ac2917b0a1599d2a6223aa337 (patch)
tree376a7cc5ec7cb1debd6a13694c8717268325a93f /src/resources/iteminfo.h
parentf4fa1d27c333e0b75e787eb03a2280afe7bcce6c (diff)
downloadmv-8ec4e8575001e50ac2917b0a1599d2a6223aa337.tar.gz
mv-8ec4e8575001e50ac2917b0a1599d2a6223aa337.tar.bz2
mv-8ec4e8575001e50ac2917b0a1599d2a6223aa337.tar.xz
mv-8ec4e8575001e50ac2917b0a1599d2a6223aa337.zip
Add additional attributes to missile particle in items.
Diffstat (limited to 'src/resources/iteminfo.h')
-rw-r--r--src/resources/iteminfo.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index a80442882..8abc78717 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -31,6 +31,7 @@
#include "resources/cursors.h"
#include "resources/itemcolordata.h"
+#include "resources/missileinfo.h"
#include "resources/soundinfo.h"
#include "resources/sprite/spritedisplay.h"
@@ -153,11 +154,17 @@ class ItemInfo final
// Handlers for seting and getting the string
// used for particles when attacking
void setMissileParticleFile(const std::string &s) noexcept2
- { mMissileParticleFile = s; }
+ { mMissile.particle = s; }
const std::string &getMissileParticleFile() const noexcept2
A_WARN_UNUSED
- { return mMissileParticleFile; }
+ { return mMissile.particle; }
+
+ MissileInfo &getMissile() noexcept2 A_WARN_UNUSED
+ { return mMissile; }
+
+ const MissileInfo &getMissileConst() const noexcept2 A_WARN_UNUSED
+ { return mMissile; }
void setHitEffectId(const int s) noexcept2
{ mHitEffectId = s; }
@@ -246,9 +253,6 @@ class ItemInfo final
ItemColor getCardColor() const noexcept2
{ return mCardColor; }
- /** Effects to be shown when weapon attacks - see also effects.xml */
- std::string mMissileParticleFile;
-
int getReplaceToSpriteId(int id) const A_WARN_UNUSED;
IntMap *addReplaceSprite(const int sprite,
@@ -324,6 +328,7 @@ class ItemInfo final
const int def = -1) A_NONNULL(1);
SpriteDisplay mDisplay; /**< Display info (like icon) */
+ MissileInfo mMissile;
std::string mName;
std::string mNameEn;
std::string mDescription; /**< Short description. */