summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-25 17:12:04 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-25 17:18:41 +0300
commitc7d6fb280271feb57022542f72584fbbbcfb2bc8 (patch)
treed7038817963a70467a56b5fdb429f3061088f28e /src/gui/windows
parent44db10623278632b890b0e2cea4fe7add7d4cc74 (diff)
downloadmanaplus-c7d6fb280271feb57022542f72584fbbbcfb2bc8.tar.gz
manaplus-c7d6fb280271feb57022542f72584fbbbcfb2bc8.tar.bz2
manaplus-c7d6fb280271feb57022542f72584fbbbcfb2bc8.tar.xz
manaplus-c7d6fb280271feb57022542f72584fbbbcfb2bc8.zip
Allow set for each skill own levelup particle effect.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/skilldialog.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index bbefbd5a7..2804b8734 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -366,6 +366,8 @@ void SkillDialog::loadXmlFile(const std::string &fileName)
node, "soundMissDelay", 0);
data->invokeCmd = XML::getProperty(
node, "invokeCmd", "");
+ data->updateEffectId = XML::getProperty(
+ node, "levelUpEffectId", -1);
skill->addData(level, data);
}
@@ -576,14 +578,24 @@ void SkillDialog::updateQuest(const int var, const int val)
void SkillDialog::playUpdateEffect(const int id) const
{
- const int effectId = paths.getIntValue("skillLevelUpEffectId");
- if (!effectManager || effectId == -1)
+ if (!effectManager)
return;
const SkillMap::const_iterator it = mSkills.find(id);
if (it != mSkills.end())
{
- if (it->second)
+ SkillInfo *const info = it->second;
+ if (info)
+ {
+ const SkillData *const data = info->data;
+ if (!data)
+ return;
+ int effectId = data->updateEffectId;
+ if (effectId == -1)
+ effectId = paths.getIntValue("skillLevelUpEffectId");
+ if (effectId == -1)
+ return;
effectManager->trigger(effectId, localPlayer);
+ }
}
}