summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-17 13:36:17 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-17 13:36:17 +0300
commitd220dec50c6fb9218092e8caab87fcee6ef11e71 (patch)
tree0f5068c2882e15996acd34fd63ebf43bce5baebc /src/gui
parent66f684799ad742d6214a6e3e9107219bef48b3f0 (diff)
downloadmanaplus-d220dec50c6fb9218092e8caab87fcee6ef11e71.tar.gz
manaplus-d220dec50c6fb9218092e8caab87fcee6ef11e71.tar.bz2
manaplus-d220dec50c6fb9218092e8caab87fcee6ef11e71.tar.xz
manaplus-d220dec50c6fb9218092e8caab87fcee6ef11e71.zip
Use actual skill level in processing skill attack.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/skilldialog.cpp8
-rw-r--r--src/gui/skilldialog.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 992877671..ee2834a35 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -727,6 +727,14 @@ SkillData *SkillInfo::getData(const int l)
return (*it).second;
}
+SkillData *SkillInfo::getData1(const int l)
+{
+ SkillDataMapIter it = dataMap.find(l);
+ if (it == dataMap.end())
+ return dataMap[0];
+ return (*it).second;
+}
+
SkillData::SkillData() :
icon(nullptr)
{
diff --git a/src/gui/skilldialog.h b/src/gui/skilldialog.h
index 3cfff0c84..7ca8b942a 100644
--- a/src/gui/skilldialog.h
+++ b/src/gui/skilldialog.h
@@ -92,6 +92,8 @@ struct SkillInfo final
SkillData *getData(const int level);
+ SkillData *getData1(const int level);
+
void addData(const int level, SkillData *const data);
};