summaryrefslogtreecommitdiff
path: root/src/gui/widgets/skillinfo.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 21:42:33 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 22:43:38 +0300
commit3411edb5d3ae07d247421e4b8f7936a22b7b4027 (patch)
tree63685d0979938a42a62b3f0a880663bb06f4e8ca /src/gui/widgets/skillinfo.cpp
parent390e5da0f9ecc4407aa7d4bcba1af5730db56271 (diff)
downloadplus-3411edb5d3ae07d247421e4b8f7936a22b7b4027.tar.gz
plus-3411edb5d3ae07d247421e4b8f7936a22b7b4027.tar.bz2
plus-3411edb5d3ae07d247421e4b8f7936a22b7b4027.tar.xz
plus-3411edb5d3ae07d247421e4b8f7936a22b7b4027.zip
Convert Attributes enum into strong typed enum.
Diffstat (limited to 'src/gui/widgets/skillinfo.cpp')
-rw-r--r--src/gui/widgets/skillinfo.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/gui/widgets/skillinfo.cpp b/src/gui/widgets/skillinfo.cpp
index d16994bae..0778b6c12 100644
--- a/src/gui/widgets/skillinfo.cpp
+++ b/src/gui/widgets/skillinfo.cpp
@@ -37,12 +37,9 @@
SkillInfo::SkillInfo() :
skillLevel(),
- skillExp(),
skillEffect(),
useButton(),
errorText(),
- progress(0.0F),
- color(),
dataMap(),
model(nullptr),
data(nullptr),
@@ -76,9 +73,7 @@ SkillInfo::~SkillInfo()
void SkillInfo::update()
{
const int baseLevel = PlayerInfo::getSkillLevel(id);
- const std::pair<int, int> exp = PlayerInfo::getStatExperience(id);
-
- if (modifiable == Modifiable_false && baseLevel == 0 && exp.second == 0)
+ if (modifiable == Modifiable_false && baseLevel == 0)
{
if (visible == Visible_true)
{
@@ -160,20 +155,6 @@ void SkillInfo::update()
level = baseLevel;
skillLevelWidth = -1;
- if (exp.second)
- {
- skillExp = strprintf("%d / %d", exp.first, exp.second);
- progress = static_cast<float>(exp.first)
- / static_cast<float>(exp.second);
- }
- else
- {
- skillExp.clear();
- progress = 0.0F;
- }
-
- color = Theme::getProgressColor(Theme::PROG_EXP, progress);
-
if (updateVisibility && model)
model->updateVisibilities();