|
|
|
@ -536,6 +536,13 @@ namespace MWMechanics
|
|
|
|
|
|
|
|
|
|
appliedLastingEffects.push_back(effect);
|
|
|
|
|
|
|
|
|
|
// Unequip all items, if a spell with the ExtraSpell effect was casted
|
|
|
|
|
if (effectIt->mEffectID == ESM::MagicEffect::ExtraSpell && target.getClass().hasInventoryStore(target))
|
|
|
|
|
{
|
|
|
|
|
MWWorld::InventoryStore& store = target.getClass().getInventoryStore(target);
|
|
|
|
|
store.unequipAll(target);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Command spells should have their effect, including taking the target out of combat, each time the spell successfully affects the target
|
|
|
|
|
if (((effectIt->mEffectID == ESM::MagicEffect::CommandHumanoid && target.getClass().isNpc())
|
|
|
|
|
|| (effectIt->mEffectID == ESM::MagicEffect::CommandCreature && target.getTypeName() == typeid(ESM::Creature).name()))
|
|
|
|
|