1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 03:45:32 +00:00

Making knownEffect aware that there can be more than 4 potion effects

This commit is contained in:
Capostrophic 2017-08-18 00:47:28 +03:00 committed by GitHub
parent b73ed5ccac
commit 6c8c883dc0

View file

@ -457,7 +457,9 @@ bool MWMechanics::Alchemy::knownEffect(unsigned int potionEffectIndex, const MWW
static const float fWortChanceValue =
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fWortChanceValue")->getFloat();
return (potionEffectIndex <= 1 && alchemySkill >= fWortChanceValue)
|| (potionEffectIndex <= 3 && alchemySkill >= fWortChanceValue*2);
|| (potionEffectIndex <= 3 && alchemySkill >= fWortChanceValue*2)
|| (potionEffectIndex <= 5 && alchemySkill >= fWortChanceValue*3)
|| (potionEffectIndex <= 7 && alchemySkill >= fWortChanceValue*4);
}
MWMechanics::Alchemy::Result MWMechanics::Alchemy::create (const std::string& name)