summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/skilldialog.cpp16
-rw-r--r--src/gui/skilldialog.h4
2 files changed, 18 insertions, 2 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 11b11ba8e..b0e3d8e91 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -22,10 +22,11 @@
#include "gui/skilldialog.h"
+#include "configuration.h"
+#include "effectmanager.h"
#include "itemshortcut.h"
#include "localplayer.h"
#include "playerinfo.h"
-#include "configuration.h"
#include "gui/setup.h"
#include "gui/shortcutwindow.h"
@@ -668,6 +669,19 @@ void SkillDialog::updateQuest(const int var, const int val)
}
}
+void SkillDialog::playUpdateEffect(const int id)
+{
+ const int effectId = paths.getIntValue("skillLevelUpEffectId");
+ if (!effectManager || effectId == -1)
+ return;
+ const SkillMap::const_iterator it = mSkills.find(id);
+ if (it != mSkills.end())
+ {
+ if (it->second)
+ effectManager->trigger(effectId, player_node);
+ }
+}
+
SkillInfo::SkillInfo() :
level(0), skillLevelWidth(0), id(0), modifiable(false),
visible(false), model(nullptr), progress(0.0f), range(0)
diff --git a/src/gui/skilldialog.h b/src/gui/skilldialog.h
index cf2b518e2..968e171d9 100644
--- a/src/gui/skilldialog.h
+++ b/src/gui/skilldialog.h
@@ -32,7 +32,7 @@
#include <vector>
const int SKILL_MIN_ID = 200000;
-const int SKILL_VAR_MIN_ID = 1000000;
+const unsigned int SKILL_VAR_MIN_ID = 1000000;
class Button;
class Label;
@@ -148,6 +148,8 @@ class SkillDialog final : public Window, public gcn::ActionListener
void updateQuest(const int var, const int val);
+ void playUpdateEffect(const int id);
+
private:
typedef std::map<int, SkillInfo*> SkillMap;
SkillMap mSkills;