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/windows/skilldialog.cpp | |
parent | 894af147511679d9db979b8169540c3e922ce375 (diff) | |
download | mv-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.gz mv-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.bz2 mv-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.xz mv-877bfe276efcf663de5a8af8fa9464aaf935ca2d.zip |
Simplify using rotational particle effect.
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 20 |
1 files changed, 7 insertions, 13 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")); } |