summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/skilldialog.cpp28
-rw-r--r--src/gui/windows/skilldialog.h6
2 files changed, 34 insertions, 0 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 04d883402..31cf81ad4 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -325,6 +325,10 @@ void SkillDialog::loadXmlFile(const std::string &fileName)
node, "errorText", name);
skill->alwaysVisible = XML::getBoolProperty(
node, "alwaysVisible", false);
+ skill->castingSrcEffectId = XML::getProperty(
+ node, "castingSrcEffectId", -1);
+ skill->castingDstEffectId = XML::getProperty(
+ node, "castingDstEffectId", -1);
skill->visible = skill->alwaysVisible;
model->addSkill(skill);
mSkills[id] = skill;
@@ -614,6 +618,30 @@ void SkillDialog::playRemoveEffect(const int id) const
paths.getIntValue("skillRemoveEffectId"));
}
+void SkillDialog::playCastingSrcEffect(const int id, Being *const being) const
+{
+ if (!effectManager)
+ return;
+ SkillInfo *const info = getSkill(id);
+ if (!info)
+ return;
+ effectManager->triggerDefault(info->castingSrcEffectId,
+ being,
+ paths.getIntValue("skillCastingSrcEffectId"));
+}
+
+void SkillDialog::playCastingDstEffect(const int id, Being *const being) const
+{
+ if (!effectManager)
+ return;
+ SkillInfo *const info = getSkill(id);
+ if (!info)
+ return;
+ effectManager->triggerDefault(info->castingDstEffectId,
+ being,
+ paths.getIntValue("skillCastingDstEffectId"));
+}
+
void SkillDialog::useSkill(const SkillInfo *const info)
{
const SkillData *const data = info->data;
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index 0b2180191..9388e96cb 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -120,6 +120,12 @@ class SkillDialog final : public Window,
void playRemoveEffect(const int id) const;
+ void playCastingSrcEffect(const int id,
+ Being *const being) const;
+
+ void playCastingDstEffect(const int id,
+ Being *const being) const;
+
void slowLogic();
void removeSkill(const int id);