Fix alchemy allowing same item ID in different slots (Fixes #1407)

deque
scrawl 11 years ago
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…
Cancel
Save