summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-08 20:40:13 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-08 23:17:42 +0300
commit877bfe276efcf663de5a8af8fa9464aaf935ca2d (patch)
treed00a91bae411640ca57b8cf7b8b2559a2fc4c36c /src/gui/windows
parent894af147511679d9db979b8169540c3e922ce375 (diff)
downloadplus-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.gz
plus-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.bz2
plus-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.xz
plus-877bfe276efcf663de5a8af8fa9464aaf935ca2d.zip
Simplify using rotational particle effect.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/skilldialog.cpp20
-rw-r--r--src/gui/windows/skilldialog.h4
2 files changed, 8 insertions, 16 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index fb82633fe..04d883402 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -590,33 +590,27 @@ SkillData *SkillDialog::getSkillData(const int id) const
return nullptr;
}
-void SkillDialog::triggerEffect(int effectId,
- const int defaultEffectId) const
+void SkillDialog::playUpdateEffect(const int id) const
{
if (!effectManager)
return;
- if (effectId == -1)
- effectId = defaultEffectId;
- if (effectId == -1)
- return;
- effectManager->trigger(effectId, localPlayer);
-}
-
-void SkillDialog::playUpdateEffect(const int id) const
-{
const SkillData *const data = getSkillData(id);
if (!data)
return;
- triggerEffect(data->updateEffectId,
+ effectManager->triggerDefault(data->updateEffectId,
+ localPlayer,
paths.getIntValue("skillLevelUpEffectId"));
}
void SkillDialog::playRemoveEffect(const int id) const
{
+ if (!effectManager)
+ return;
const SkillData *const data = getSkillData(id);
if (!data)
return;
- triggerEffect(data->removeEffectId,
+ effectManager->triggerDefault(data->removeEffectId,
+ localPlayer,
paths.getIntValue("skillRemoveEffectId"));
}
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index 1fa182e8b..0b2180191 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -30,6 +30,7 @@
#include "resources/skillowner.h"
#include "resources/skilltype.h"
+class Being;
class Button;
class Label;
class SkillModel;
@@ -130,9 +131,6 @@ class SkillDialog final : public Window,
private:
void addSkillDuration(SkillInfo *const skill);
- void triggerEffect(int effectId,
- const int defaultEffectId) const;
-
typedef std::map<int, SkillInfo*> SkillMap;
SkillMap mSkills;
std::vector<SkillInfo*> mDurations;