summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/skilldialog.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index b0e3d8e91..39be5eea7 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -662,7 +662,7 @@ void SkillDialog::updateQuest(const int var, const int val)
SkillInfo *const info = it->second;
if (info)
{
- PlayerInfo::setStatBase(id, val);
+ PlayerInfo::setSkillLevel(id, val);
info->level = val;
info->update();
}
@@ -699,11 +699,10 @@ SkillInfo::~SkillInfo()
void SkillInfo::update()
{
- const int baseLevel = PlayerInfo::getStatBase(id);
- const int effLevel = PlayerInfo::getStatEffective(id);
+ const int baseLevel = PlayerInfo::getSkillLevel(id);
const std::pair<int, int> exp = PlayerInfo::getStatExperience(id);
- if (!modifiable && baseLevel == 0 && effLevel == 0 && exp.second == 0)
+ if (!modifiable && baseLevel == 0 && exp.second == 0)
{
if (visible)
{
@@ -717,18 +716,11 @@ void SkillInfo::update()
const bool updateVisibility = !visible;
visible = true;
- if (effLevel != baseLevel)
- {
- skillLevel = strprintf(_("Lvl: %d (%+d)"), baseLevel,
- effLevel - baseLevel);
- }
+ if (baseLevel == 0)
+ skillLevel.clear();
else
- {
- if (baseLevel == 0)
- skillLevel.clear();
- else
- skillLevel = strprintf(_("Lvl: %d"), baseLevel);
- }
+ skillLevel = strprintf(_("Lvl: %d"), baseLevel);
+
level = baseLevel;
skillLevelWidth = -1;