mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 20:45:32 +00:00
another skill gain fix
This commit is contained in:
parent
caaffd1ec2
commit
0e7ba008ad
1 changed files with 4 additions and 1 deletions
|
@ -117,12 +117,15 @@ float MWMechanics::NpcStats::getSkillGain (int skillIndex, const ESM::Class& cla
|
|||
if (usageType>=4)
|
||||
throw std::runtime_error ("skill usage type out of range");
|
||||
|
||||
if (usageType>0)
|
||||
if (usageType>=0)
|
||||
{
|
||||
skillFactor = skill->mData.mUseValue[usageType];
|
||||
|
||||
if (skillFactor<0)
|
||||
throw std::runtime_error ("invalid skill gain factor");
|
||||
|
||||
if (skillFactor==0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const MWWorld::Store<ESM::GameSetting> &gmst =
|
||||
|
|
Loading…
Reference in a new issue