mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-28 14:53:58 +00:00
Do not allow training skills above their governing attribute
This commit is contained in:
parent
bfdca3b738
commit
627dcddb33
@ -130,6 +130,14 @@ namespace MWGui
|
|||||||
return;
|
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
|
// increase skill
|
||||||
MWWorld::LiveCellRef<ESM::NPC> *playerRef = player.get<ESM::NPC>();
|
MWWorld::LiveCellRef<ESM::NPC> *playerRef = player.get<ESM::NPC>();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user