forked from mirror/openmw-tes3mp
Update alchemy effects after every created potion (#4079)
This commit is contained in:
parent
dca31b7ffa
commit
7559d25317
1 changed files with 1 additions and 7 deletions
|
@ -262,22 +262,16 @@ const ESM::Potion *MWMechanics::Alchemy::getRecord(const ESM::Potion& toFind) co
|
|||
|
||||
void MWMechanics::Alchemy::removeIngredients()
|
||||
{
|
||||
bool needsUpdate = false;
|
||||
|
||||
for (TIngredientsContainer::iterator iter (mIngredients.begin()); iter!=mIngredients.end(); ++iter)
|
||||
if (!iter->isEmpty())
|
||||
{
|
||||
iter->getContainerStore()->remove(*iter, 1, mAlchemist);
|
||||
|
||||
if (iter->getRefData().getCount()<1)
|
||||
{
|
||||
needsUpdate = true;
|
||||
*iter = MWWorld::Ptr();
|
||||
}
|
||||
}
|
||||
|
||||
if (needsUpdate)
|
||||
updateEffects();
|
||||
updateEffects();
|
||||
}
|
||||
|
||||
void MWMechanics::Alchemy::addPotion (const std::string& name)
|
||||
|
|
Loading…
Reference in a new issue