mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 12:42:11 +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;
|
||||
|
||||
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;
|
||||
|
||||
mIngredients[slot] = ingredient;
|
||||
|
Loading…
Reference in New Issue
Block a user