diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-07-23 02:34:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-07-23 02:34:02 +0300 |
commit | 27d585c7db1395b5e4b2caa4149a99d57f9ffbff (patch) | |
tree | 821c0cd4300643a010ae7abbdc4d112dd81193fc /src/gui/windows/skilldialog.cpp | |
parent | 6a65a4cf5b6b10839254c0c5846ec2dbfea882f8 (diff) | |
download | ManaVerse-27d585c7db1395b5e4b2caa4149a99d57f9ffbff.tar.gz ManaVerse-27d585c7db1395b5e4b2caa4149a99d57f9ffbff.tar.bz2 ManaVerse-27d585c7db1395b5e4b2caa4149a99d57f9ffbff.tar.xz ManaVerse-27d585c7db1395b5e4b2caa4149a99d57f9ffbff.zip |
Add skill attacking src and dst effects.
New skills attributes: srcEffectId, dstEffectId
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 8dcc10e2d..966168464 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -385,6 +385,10 @@ SkillInfo *SkillDialog::loadSkill(XmlNodePtr node, node, "castingSrcEffectId", -1); skill->castingDstEffectId = XML::getProperty( node, "castingDstEffectId", -1); + skill->srcEffectId = XML::getProperty( + node, "srcEffectId", -1); + skill->dstEffectId = XML::getProperty( + node, "dstEffectId", -1); skill->castingAction = XML::getProperty(node, "castingAction", SpriteAction::CAST); skill->castingRideAction = XML::getProperty(node, @@ -733,6 +737,31 @@ void SkillDialog::playCastingDstEffect(const int id, paths.getIntValue("skillCastingDstEffectId")); } +void SkillDialog::playSrcEffect(const int id, + Being *const being) const +{ + if (!effectManager) + return; + SkillInfo *const info = getSkill(id); + if (!info) + return; + effectManager->triggerDefault(info->srcEffectId, + being, + paths.getIntValue("skillSrcEffectId")); +} + +void SkillDialog::playDstEffect(const int id, + Being *const being) const +{ + if (!effectManager) + return; + SkillInfo *const info = getSkill(id); + if (!info) + return; + effectManager->triggerDefault(info->dstEffectId, + being, + paths.getIntValue("skillDstEffectId")); +} void SkillDialog::playCastingDstTileEffect(const int id, const int x, |