Enchanting: fix inverted self-enchant success chance (Fixes #1701)

This commit is contained in:
scrawl 2014-07-26 00:59:35 +02:00
parent b370c0f7b5
commit 09607f992e

View file

@ -62,7 +62,7 @@ namespace MWMechanics
if(mSelfEnchanting)
{
if(getEnchantChance()<std::rand()/static_cast<double> (RAND_MAX)*100)
if(std::rand()/static_cast<double> (RAND_MAX)*100 < getEnchantChance())
return false;
mEnchanter.getClass().skillUsageSucceeded (mEnchanter, ESM::Skill::Enchant, 2);