summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-10 20:37:02 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-10 20:37:02 +0300
commitb7d3acab99fe4975d4598b6c9ac1ad88edfa8506 (patch)
treea488f015fd7acee7654dab610eb95e904ffaeaa5 /src/gui/windows
parent81184f3787f4b9208b7ac1aacb3489ca143c9ccd (diff)
downloadmanaverse-b7d3acab99fe4975d4598b6c9ac1ad88edfa8506.tar.gz
manaverse-b7d3acab99fe4975d4598b6c9ac1ad88edfa8506.tar.bz2
manaverse-b7d3acab99fe4975d4598b6c9ac1ad88edfa8506.tar.xz
manaverse-b7d3acab99fe4975d4598b6c9ac1ad88edfa8506.zip
Add support for casting status effect on ground.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/skilldialog.cpp21
-rw-r--r--src/gui/windows/skilldialog.h5
2 files changed, 25 insertions, 1 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index bf317b8cd..091c6c1d9 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -649,7 +649,8 @@ void SkillDialog::playCastingSrcEffect(const int id, Being *const being) const
paths.getIntValue("skillCastingSrcEffectId"));
}
-void SkillDialog::playCastingDstEffect(const int id, Being *const being) const
+void SkillDialog::playCastingDstEffect(const int id,
+ Being *const being) const
{
if (!effectManager)
return;
@@ -661,6 +662,24 @@ void SkillDialog::playCastingDstEffect(const int id, Being *const being) const
paths.getIntValue("skillCastingDstEffectId"));
}
+
+void SkillDialog::playCastingDstTileEffect(const int id,
+ const int x,
+ const int y,
+ const int delay) const
+{
+ if (!effectManager)
+ return;
+ SkillInfo *const info = getSkill(id);
+ if (!info)
+ return;
+ effectManager->triggerDefault(info->castingDstEffectId,
+ x * 32,
+ y * 32,
+ cur_time + delay / 1000, // end time in seconds
+ paths.getIntValue("skillCastingGroundEffectId"));
+}
+
void SkillDialog::useSkill(const SkillInfo *const info,
const AutoTarget autoTarget)
{
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index 8f085ee22..1e5740f58 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -130,6 +130,11 @@ class SkillDialog final : public Window,
void playCastingDstEffect(const int id,
Being *const being) const;
+ void playCastingDstTileEffect(const int id,
+ const int x,
+ const int y,
+ const int delay) const;
+
void slowLogic();
void removeSkill(const int id);