diff options
Diffstat (limited to 'src/resources/iteminfo.cpp')
-rw-r--r-- | src/resources/iteminfo.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index 4b85beb64..d788613bf 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -49,6 +49,8 @@ ItemInfo::ItemInfo() : mIsRemoveSprites(false), mSpriteToItemReplaceList(), mAttackAction(SpriteAction::INVALID), + mSkyAttackAction(SpriteAction::INVALID), + mWaterAttackAction(SpriteAction::INVALID), mAttackRange(0), mMissileParticle(), mAnimationFiles(), @@ -112,6 +114,22 @@ void ItemInfo::setAttackAction(const std::string &attackAction) mAttackAction = attackAction; } +void ItemInfo::setSkyAttackAction(const std::string &attackAction) +{ + if (attackAction.empty()) + mSkyAttackAction = SpriteAction::ATTACKSKY; + else + mSkyAttackAction = attackAction; +} + +void ItemInfo::setWaterAttackAction(const std::string &attackAction) +{ + if (attackAction.empty()) + mWaterAttackAction = SpriteAction::ATTACKWATER; + else + mWaterAttackAction = attackAction; +} + void ItemInfo::addSound(const SoundEvent event, const std::string &filename, const int delay) { |