forked from teamnwah/openmw-tes3coop
Cap the displayed attribute multiplier in levelup to attribute points left to 100
This commit is contained in:
parent
b5e0e45c78
commit
61ec9196c8
2 changed files with 2 additions and 0 deletions
|
@ -176,6 +176,7 @@ namespace MWGui
|
||||||
availableAttributes++;
|
availableAttributes++;
|
||||||
|
|
||||||
int mult = pcStats.getLevelupAttributeMultiplier (i);
|
int mult = pcStats.getLevelupAttributeMultiplier (i);
|
||||||
|
mult = std::min(mult, 100-pcStats.getAttribute(i).getBase());
|
||||||
text->setCaption(mult <= 1 ? "" : "x" + MyGUI::utility::toString(mult));
|
text->setCaption(mult <= 1 ? "" : "x" + MyGUI::utility::toString(mult));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -268,6 +268,7 @@ void MWMechanics::NpcStats::levelUp()
|
||||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
|
||||||
|
|
||||||
mLevelProgress -= gmst.find("iLevelUpTotal")->getInt();
|
mLevelProgress -= gmst.find("iLevelUpTotal")->getInt();
|
||||||
|
mLevelProgress = std::max(0, mLevelProgress); // might be necessary when levelup was invoked via console
|
||||||
|
|
||||||
for (int i=0; i<ESM::Attribute::Length; ++i)
|
for (int i=0; i<ESM::Attribute::Length; ++i)
|
||||||
mSkillIncreases[i] = 0;
|
mSkillIncreases[i] = 0;
|
||||||
|
|
Loading…
Reference in a new issue