fix training limit

actorid
scrawl 12 years ago
parent 125315ebe7
commit e80394c0b5

@ -119,6 +119,13 @@ namespace MWGui
if (mWindowManager.getInventoryWindow()->getPlayerGold()<price)
return;
MWMechanics::NpcStats& npcStats = MWWorld::Class::get(mPtr).getNpcStats (mPtr);
if (npcStats.getSkill (skillId).getBase () <= pcStats.getSkill (skillId).getBase ())
{
mWindowManager.messageBox ("#{sServiceTrainingWords}", std::vector<std::string>());
return;
}
// increase skill
MWWorld::LiveCellRef<ESM::NPC> *playerRef = player.get<ESM::NPC>();
const ESM::Class *class_ = MWBase::Environment::get().getWorld()->getStore().classes.find (

@ -21,7 +21,7 @@
<Property key="TextAlign" value="Left"/>
<Property key="Caption" value="Draken (754)"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="244 163 60 24" name="CancelButton" align="Right Top">
<Widget type="AutoSizedButton" skin="MW_Button" position="244 161 60 24" name="CancelButton" align="Right Top">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="#{sCancel}"/>
</Widget>

Loading…
Cancel
Save