diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-08 20:40:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-08 23:17:42 +0300 |
commit | 877bfe276efcf663de5a8af8fa9464aaf935ca2d (patch) | |
tree | d00a91bae411640ca57b8cf7b8b2559a2fc4c36c /src/gui | |
parent | 894af147511679d9db979b8169540c3e922ce375 (diff) | |
download | plus-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.gz plus-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.bz2 plus-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.xz plus-877bfe276efcf663de5a8af8fa9464aaf935ca2d.zip |
Simplify using rotational particle effect.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 20 | ||||
-rw-r--r-- | src/gui/windows/skilldialog.h | 4 |
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; |