forked from mirror/openmw-tes3mp
parent
e825010107
commit
f2240dde9c
2 changed files with 5 additions and 7 deletions
|
@ -84,10 +84,8 @@ public:
|
|||
const std::string& sourceName, const std::string& sourceId, int casterActorId,
|
||||
float magnitude, float remainingTime = -1, float totalTime = -1)
|
||||
{
|
||||
MWWorld::Ptr player = MWMechanics::getPlayer();
|
||||
if ( ((key.mId == ESM::MagicEffect::CommandHumanoid && mActor.getClass().isNpc())
|
||||
|| (key.mId == ESM::MagicEffect::CommandCreature && mActor.getTypeName() == typeid(ESM::Creature).name()))
|
||||
&& casterActorId == player.getClass().getCreatureStats(player).getActorId()
|
||||
if (((key.mId == ESM::MagicEffect::CommandHumanoid && mActor.getClass().isNpc())
|
||||
|| (key.mId == ESM::MagicEffect::CommandCreature && mActor.getTypeName() == typeid(ESM::Creature).name()))
|
||||
&& magnitude >= mActor.getClass().getCreatureStats(mActor).getLevel())
|
||||
mCommanded = true;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue