An alchemy effect listed more than once in the same ingredient should not automatically create a potion of that effect (Bug #2722)

c++11
scrawl 10 years ago
parent d3ef075952
commit 33a3dabc31

@ -44,6 +44,8 @@ std::set<MWMechanics::EffectKey> MWMechanics::Alchemy::listEffects() const
{
const MWWorld::LiveCellRef<ESM::Ingredient> *ingredient = iter->get<ESM::Ingredient>();
std::set<EffectKey> seenEffects;
for (int i=0; i<4; ++i)
if (ingredient->mBase->mData.mEffectID[i]!=-1)
{
@ -51,7 +53,8 @@ std::set<MWMechanics::EffectKey> MWMechanics::Alchemy::listEffects() const
ingredient->mBase->mData.mEffectID[i], ingredient->mBase->mData.mSkills[i]!=-1 ?
ingredient->mBase->mData.mSkills[i] : ingredient->mBase->mData.mAttributes[i]);
++effects[key];
if (seenEffects.insert(key).second)
++effects[key];
}
}
}

Loading…
Cancel
Save