diff options
Diffstat (limited to 'src/gui/windows')
-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; |