From 4fe5fd9a471760c8ce54c71c8cdf3f27c8fb27ae Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 9 Apr 2015 17:53:52 +0300 Subject: On skill attacks on target for show effect use skill attribute skillHitEffectId. --- src/gui/windows/skilldialog.cpp | 13 +++++++++++++ src/gui/windows/skilldialog.h | 3 +++ 2 files changed, 16 insertions(+) (limited to 'src/gui') diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index a835666f3..2e2e69fa9 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -596,6 +596,19 @@ SkillData *SkillDialog::getSkillData(const int id) const return nullptr; } +SkillData *SkillDialog::getSkillDataByLevel(const int id, + const int level) const +{ + const SkillMap::const_iterator it = mSkills.find(id); + if (it != mSkills.end()) + { + SkillInfo *const info = it->second; + if (info) + return info->getData1(level); + } + return nullptr; +} + void SkillDialog::playUpdateEffect(const int id) const { if (!effectManager) diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h index 9388e96cb..7a55c691b 100644 --- a/src/gui/windows/skilldialog.h +++ b/src/gui/windows/skilldialog.h @@ -134,6 +134,9 @@ class SkillDialog final : public Window, SkillData *getSkillData(const int id) const; + SkillData *getSkillDataByLevel(const int id, + const int level) const; + private: void addSkillDuration(SkillInfo *const skill); -- cgit v1.2.3-70-g09d2