diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-24 17:42:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-24 17:42:28 +0300 |
commit | 466829aef10af6b95d0f443226e8549f4399b567 (patch) | |
tree | 2b0e790cad32c16a7b283e82732820032efe9b91 /src/gui/skilldialog.cpp | |
parent | a5f9e965323ad4b211405736eda7557cbe6a013a (diff) | |
download | plus-466829aef10af6b95d0f443226e8549f4399b567.tar.gz plus-466829aef10af6b95d0f443226e8549f4399b567.tar.bz2 plus-466829aef10af6b95d0f443226e8549f4399b567.tar.xz plus-466829aef10af6b95d0f443226e8549f4399b567.zip |
Add particle effect support for skill levelup.
New option skillLevelUpEffectId
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r-- | src/gui/skilldialog.cpp | 16 |
1 files changed, 15 insertions, 1 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) |