summaryrefslogtreecommitdiff
path: root/src/resources/iteminfo.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-07-23 23:19:30 +0300
committerAndrei Karas <akaras@inbox.ru>2013-07-23 23:19:30 +0300
commit91075015ad4b5bd576c1a5668a11ea0227dd6bd1 (patch)
tree181df7013e6bfdd41cad4f2e9f18ad8944b79d04 /src/resources/iteminfo.cpp
parent66f7df70fb03d487ae0c667adec3d5ad6e11721e (diff)
downloadmanaverse-91075015ad4b5bd576c1a5668a11ea0227dd6bd1.tar.gz
manaverse-91075015ad4b5bd576c1a5668a11ea0227dd6bd1.tar.bz2
manaverse-91075015ad4b5bd576c1a5668a11ea0227dd6bd1.tar.xz
manaverse-91075015ad4b5bd576c1a5668a11ea0227dd6bd1.zip
add support for attacksky and attackwater actions.
Diffstat (limited to 'src/resources/iteminfo.cpp')
-rw-r--r--src/resources/iteminfo.cpp18
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)
{