forked from teamnwah/openmw-tes3coop
fix skill window update
invoke winMgr->updateSkillArea() in mechanicsmanagerimp.cpp after looping over ESM::Skill::SkillEnum if any updates have occurred.
This commit is contained in:
parent
809f5cd01b
commit
465b7361e1
1 changed files with 3 additions and 0 deletions
|
@ -338,16 +338,19 @@ namespace MWMechanics
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool updateSkills = false;
|
||||||
//Loop over ESM::Skill::SkillEnum
|
//Loop over ESM::Skill::SkillEnum
|
||||||
for(int i = 0; i < ESM::Skill::Length; ++i)
|
for(int i = 0; i < ESM::Skill::Length; ++i)
|
||||||
{
|
{
|
||||||
if(stats.getSkill(i) != mWatchedSkills[i] || mWatchedStatsEmpty)
|
if(stats.getSkill(i) != mWatchedSkills[i] || mWatchedStatsEmpty)
|
||||||
{
|
{
|
||||||
|
updateSkills = true;
|
||||||
mWatchedSkills[i] = stats.getSkill(i);
|
mWatchedSkills[i] = stats.getSkill(i);
|
||||||
winMgr->setValue((ESM::Skill::SkillEnum)i, stats.getSkill(i));
|
winMgr->setValue((ESM::Skill::SkillEnum)i, stats.getSkill(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (updateSkills) { winMgr->updateSkillArea(); }
|
||||||
winMgr->setValue("level", stats.getLevel());
|
winMgr->setValue("level", stats.getLevel());
|
||||||
|
|
||||||
mWatchedStatsEmpty = false;
|
mWatchedStatsEmpty = false;
|
||||||
|
|
Loading…
Reference in a new issue