Merge pull request #206 from OpenMW/master

Add OpenMW commits up to 23 Apr 2017, part 2
This commit is contained in:
David Cernat 2017-04-23 21:35:09 +03:00 committed by GitHub
commit 5c5c62f33a

View file

@ -846,7 +846,7 @@ void MWWorld::InventoryStore::visitEffectSources(MWMechanics::EffectSourceVisito
int i=0; int i=0;
for (std::vector<ESM::ENAMstruct>::const_iterator effectIt (enchantment.mEffects.mList.begin()); for (std::vector<ESM::ENAMstruct>::const_iterator effectIt (enchantment.mEffects.mList.begin());
effectIt!=enchantment.mEffects.mList.end(); ++effectIt) effectIt!=enchantment.mEffects.mList.end(); ++effectIt, ++i)
{ {
// Don't get spell icon display information for enchantments that weren't actually applied // Don't get spell icon display information for enchantments that weren't actually applied
if (mMagicEffects.get(MWMechanics::EffectKey(*effectIt)).getMagnitude() == 0) if (mMagicEffects.get(MWMechanics::EffectKey(*effectIt)).getMagnitude() == 0)
@ -856,8 +856,6 @@ void MWWorld::InventoryStore::visitEffectSources(MWMechanics::EffectSourceVisito
magnitude *= params.mMultiplier; magnitude *= params.mMultiplier;
if (magnitude > 0) if (magnitude > 0)
visitor.visit(MWMechanics::EffectKey(*effectIt), (**iter).getClass().getName(**iter), (**iter).getCellRef().getRefId(), -1, magnitude); visitor.visit(MWMechanics::EffectKey(*effectIt), (**iter).getClass().getName(**iter), (**iter).getCellRef().getRefId(), -1, magnitude);
++i;
} }
} }
} }