1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:23:52 +00:00

Fix InventoryStore::purgeEffect being reverted by the next recalculation of mMagicEffects

This commit is contained in:
MiroslavR 2016-06-29 22:54:11 +02:00
parent 528de956da
commit 72d2daae90

View file

@ -722,7 +722,11 @@ void MWWorld::InventoryStore::rechargeItems(float duration)
void MWWorld::InventoryStore::purgeEffect(short effectId) void MWWorld::InventoryStore::purgeEffect(short effectId)
{ {
mMagicEffects.remove(MWMechanics::EffectKey(effectId)); for (TSlots::const_iterator it = mSlots.begin(); it != mSlots.end(); ++it)
{
if (*it != end())
purgeEffect(effectId, (*it)->getCellRef().getRefId());
}
} }
void MWWorld::InventoryStore::purgeEffect(short effectId, const std::string &sourceId) void MWWorld::InventoryStore::purgeEffect(short effectId, const std::string &sourceId)