|
|
|
@ -732,11 +732,19 @@ namespace MWMechanics
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UpdateSummonedCreatures updateSummonedCreatures(ptr);
|
|
|
|
|
creatureStats.getActiveSpells().visitEffectSources(updateSummonedCreatures);
|
|
|
|
|
if (ptr.getClass().hasInventoryStore(ptr))
|
|
|
|
|
ptr.getClass().getInventoryStore(ptr).visitEffectSources(updateSummonedCreatures);
|
|
|
|
|
updateSummonedCreatures.process();
|
|
|
|
|
bool hasSummonEffect = false;
|
|
|
|
|
for (MagicEffects::Collection::const_iterator it = effects.begin(); it != effects.end(); ++it)
|
|
|
|
|
if (it->first.mId >= ESM::MagicEffect::SummonScamp && it->first.mId <= ESM::MagicEffect::SummonStormAtronach)
|
|
|
|
|
hasSummonEffect = true;
|
|
|
|
|
|
|
|
|
|
if (!creatureStats.getSummonedCreatureMap().empty() || !creatureStats.getSummonedCreatureGraveyard().empty() || hasSummonEffect)
|
|
|
|
|
{
|
|
|
|
|
UpdateSummonedCreatures updateSummonedCreatures(ptr);
|
|
|
|
|
creatureStats.getActiveSpells().visitEffectSources(updateSummonedCreatures);
|
|
|
|
|
if (ptr.getClass().hasInventoryStore(ptr))
|
|
|
|
|
ptr.getClass().getInventoryStore(ptr).visitEffectSources(updateSummonedCreatures);
|
|
|
|
|
updateSummonedCreatures.process();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Actors::calculateNpcStatModifiers (const MWWorld::Ptr& ptr, float duration)
|
|
|
|
|