mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +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>();
|
const MWWorld::LiveCellRef<ESM::Ingredient> *ingredient = iter->get<ESM::Ingredient>();
|
||||||
|
|
||||||
|
std::set<EffectKey> seenEffects;
|
||||||
|
|
||||||
for (int i=0; i<4; ++i)
|
for (int i=0; i<4; ++i)
|
||||||
if (ingredient->mBase->mData.mEffectID[i]!=-1)
|
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.mEffectID[i], ingredient->mBase->mData.mSkills[i]!=-1 ?
|
||||||
ingredient->mBase->mData.mSkills[i] : ingredient->mBase->mData.mAttributes[i]);
|
ingredient->mBase->mData.mSkills[i] : ingredient->mBase->mData.mAttributes[i]);
|
||||||
|
|
||||||
++effects[key];
|
if (seenEffects.insert(key).second)
|
||||||
|
++effects[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user