mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-18 13:12:50 +00:00
Fix alchemy allowing same item ID in different slots (Fixes #1407)
This commit is contained in:
parent
40d6c8abf7
commit
f3cece8dec
@ -395,7 +395,8 @@ int MWMechanics::Alchemy::addIngredient (const MWWorld::Ptr& ingredient)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
for (TIngredientsIterator iter (mIngredients.begin()); iter!=mIngredients.end(); ++iter)
|
for (TIngredientsIterator iter (mIngredients.begin()); iter!=mIngredients.end(); ++iter)
|
||||||
if (!iter->isEmpty() && ingredient.get<ESM::Ingredient>()==iter->get<ESM::Ingredient>())
|
if (!iter->isEmpty() && Misc::StringUtils::ciEqual(ingredient.getClass().getId(ingredient),
|
||||||
|
iter->getClass().getId(*iter)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
mIngredients[slot] = ingredient;
|
mIngredients[slot] = ingredient;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user