fix training limit

actorid
scrawl 12 years ago
parent 125315ebe7
commit e80394c0b5

@ -119,6 +119,13 @@ namespace MWGui
if (mWindowManager.getInventoryWindow()->getPlayerGold()<price) if (mWindowManager.getInventoryWindow()->getPlayerGold()<price)
return; 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 // increase skill
MWWorld::LiveCellRef<ESM::NPC> *playerRef = player.get<ESM::NPC>(); MWWorld::LiveCellRef<ESM::NPC> *playerRef = player.get<ESM::NPC>();
const ESM::Class *class_ = MWBase::Environment::get().getWorld()->getStore().classes.find ( const ESM::Class *class_ = MWBase::Environment::get().getWorld()->getStore().classes.find (

@ -21,7 +21,7 @@
<Property key="TextAlign" value="Left"/> <Property key="TextAlign" value="Left"/>
<Property key="Caption" value="Draken (754)"/> <Property key="Caption" value="Draken (754)"/>
</Widget> </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="ExpandDirection" value="Left"/>
<Property key="Caption" value="#{sCancel}"/> <Property key="Caption" value="#{sCancel}"/>
</Widget> </Widget>

Loading…
Cancel
Save