summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/skilldialog.cpp29
-rw-r--r--src/gui/windows/skilldialog.h6
2 files changed, 35 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,
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index b5baa35d6..bd66491e2 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -128,6 +128,12 @@ class SkillDialog final : public Window,
void playRemoveEffect(const int id) const;
+ void playSrcEffect(const int id,
+ Being *const being) const;
+
+ void playDstEffect(const int id,
+ Being *const being) const;
+
void playCastingSrcEffect(const int id,
Being *const being) const;