mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-12 21:39:26 +00:00
An alchemy effect listed more than once in the same ingredient should not automatically create a potion of that effect (Bug #2722)
This commit is contained in:
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…
Reference in New Issue
Block a user