|
|
|
@ -492,9 +492,9 @@ namespace MWMechanics
|
|
|
|
|
appliedLastingEffects.push_back(effect);
|
|
|
|
|
|
|
|
|
|
// 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())
|
|
|
|
|
&& caster == getPlayer() && magnitude >= target.getClass().getCreatureStats(target).getLevel())
|
|
|
|
|
if (((effectIt->mEffectID == ESM::MagicEffect::CommandHumanoid && target.getClass().isNpc())
|
|
|
|
|
|| (effectIt->mEffectID == ESM::MagicEffect::CommandCreature && target.getTypeName() == typeid(ESM::Creature).name()))
|
|
|
|
|
&& !caster.isEmpty() && caster.getClass().isActor() && target != getPlayer() && magnitude >= target.getClass().getCreatureStats(target).getLevel())
|
|
|
|
|
{
|
|
|
|
|
MWMechanics::AiFollow package(caster.getCellRef().getRefId(), true);
|
|
|
|
|
target.getClass().getCreatureStats(target).getAiSequence().stack(package, target);
|
|
|
|
|