1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 21:35:24 +00:00

Merge pull request #1432 from akortunov/alchemyfix

Update alchemy effects after every created potion (#4079)
This commit is contained in:
scrawl 2017-09-07 20:51:42 +00:00 committed by GitHub
commit 8f1c8759e4
2 changed files with 2 additions and 7 deletions

View File

@ -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)

View File

@ -23,6 +23,7 @@ namespace Gui
private:
MyGUI::Widget* mLeft;
MyGUI::Widget* mRight;
MyGUI::Widget* mClient;
void align();
};