forked from teamnwah/openmw-tes3coop
Do not allow training skills above their governing attribute
This commit is contained in:
parent
bfdca3b738
commit
627dcddb33
1 changed files with 8 additions and 0 deletions
|
@ -130,6 +130,14 @@ namespace MWGui
|
|||
return;
|
||||
}
|
||||
|
||||
// You can not train a skill above its governing attribute
|
||||
const ESM::Skill* skill = MWBase::Environment::get().getWorld()->getStore().get<ESM::Skill>().find(skillId);
|
||||
if (pcStats.getSkill(skillId).getBase() >= pcStats.getAttribute(skill->mData.mAttribute).getBase())
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage17}");
|
||||
return;
|
||||
}
|
||||
|
||||
// increase skill
|
||||
MWWorld::LiveCellRef<ESM::NPC> *playerRef = player.get<ESM::NPC>();
|
||||
|
||||
|
|
Loading…
Reference in a new issue