forked from teamnwah/openmw-tes3coop
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)
|
if (usageType>=4)
|
||||||
throw std::runtime_error ("skill usage type out of range");
|
throw std::runtime_error ("skill usage type out of range");
|
||||||
|
|
||||||
if (usageType>0)
|
if (usageType>=0)
|
||||||
{
|
{
|
||||||
skillFactor = skill->mData.mUseValue[usageType];
|
skillFactor = skill->mData.mUseValue[usageType];
|
||||||
|
|
||||||
if (skillFactor<0)
|
if (skillFactor<0)
|
||||||
throw std::runtime_error ("invalid skill gain factor");
|
throw std::runtime_error ("invalid skill gain factor");
|
||||||
|
|
||||||
|
if (skillFactor==0)
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MWWorld::Store<ESM::GameSetting> &gmst =
|
const MWWorld::Store<ESM::GameSetting> &gmst =
|
||||||
|
|
Loading…
Reference in a new issue