mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
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++;
|
||||
|
||||
int mult = pcStats.getLevelupAttributeMultiplier (i);
|
||||
mult = std::min(mult, 100-pcStats.getAttribute(i).getBase());
|
||||
text->setCaption(mult <= 1 ? "" : "x" + MyGUI::utility::toString(mult));
|
||||
}
|
||||
else
|
||||
|
|
|
@ -268,6 +268,7 @@ void MWMechanics::NpcStats::levelUp()
|
|||
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
|
||||
|
||||
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)
|
||||
mSkillIncreases[i] = 0;
|
||||
|
|
Loading…
Reference in a new issue