|
|
|
@ -88,12 +88,13 @@ class CheckActorCommanded : public MWMechanics::EffectSourceVisitor
|
|
|
|
|
MWWorld::Ptr mActor;
|
|
|
|
|
public:
|
|
|
|
|
bool mCommanded;
|
|
|
|
|
|
|
|
|
|
CheckActorCommanded(const MWWorld::Ptr& actor)
|
|
|
|
|
: mActor(actor)
|
|
|
|
|
, mCommanded(false){}
|
|
|
|
|
, mCommanded(false){}
|
|
|
|
|
|
|
|
|
|
virtual void visit (MWMechanics::EffectKey key,
|
|
|
|
|
const std::string& sourceName, const std::string& sourceId, int casterActorId,
|
|
|
|
|
virtual void visit (MWMechanics::EffectKey key, int effectIndex,
|
|
|
|
|
const std::string& sourceName, const std::string& sourceId, int casterActorId,
|
|
|
|
|
float magnitude, float remainingTime = -1, float totalTime = -1)
|
|
|
|
|
{
|
|
|
|
|
if (((key.mId == ESM::MagicEffect::CommandHumanoid && mActor.getClass().isNpc())
|
|
|
|
@ -156,8 +157,8 @@ namespace MWMechanics
|
|
|
|
|
GetStuntedMagickaDuration(const MWWorld::Ptr& actor)
|
|
|
|
|
: mRemainingTime(0.f){}
|
|
|
|
|
|
|
|
|
|
virtual void visit (MWMechanics::EffectKey key,
|
|
|
|
|
const std::string& sourceName, const std::string& sourceId, int casterActorId,
|
|
|
|
|
virtual void visit (MWMechanics::EffectKey key, int effectIndex,
|
|
|
|
|
const std::string& sourceName, const std::string& sourceId, int casterActorId,
|
|
|
|
|
float magnitude, float remainingTime = -1, float totalTime = -1)
|
|
|
|
|
{
|
|
|
|
|
if (mRemainingTime == -1) return;
|
|
|
|
@ -186,8 +187,8 @@ namespace MWMechanics
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void visit (MWMechanics::EffectKey key,
|
|
|
|
|
const std::string& sourceName, const std::string& sourceId, int casterActorId,
|
|
|
|
|
virtual void visit (MWMechanics::EffectKey key, int effectIndex,
|
|
|
|
|
const std::string& sourceName, const std::string& sourceId, int casterActorId,
|
|
|
|
|
float magnitude, float remainingTime = -1, float totalTime = -1)
|
|
|
|
|
{
|
|
|
|
|
if (magnitude <= 0)
|
|
|
|
@ -206,8 +207,8 @@ namespace MWMechanics
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
virtual void visit (MWMechanics::EffectKey key,
|
|
|
|
|
const std::string& sourceName, const std::string& sourceId, int casterActorId,
|
|
|
|
|
virtual void visit (MWMechanics::EffectKey key, int effectIndex,
|
|
|
|
|
const std::string& sourceName, const std::string& sourceId, int casterActorId,
|
|
|
|
|
float magnitude, float remainingTime = -1, float totalTime = -1)
|
|
|
|
|
{
|
|
|
|
|
if (key.mId != ESM::MagicEffect::Corprus)
|
|
|
|
@ -231,8 +232,8 @@ namespace MWMechanics
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void visit (MWMechanics::EffectKey key,
|
|
|
|
|
const std::string& sourceName, const std::string& sourceId, int casterActorId,
|
|
|
|
|
virtual void visit (MWMechanics::EffectKey key, int effectIndex,
|
|
|
|
|
const std::string& sourceName, const std::string& sourceId, int casterActorId,
|
|
|
|
|
float magnitude, float remainingTime = -1, float totalTime = -1)
|
|
|
|
|
{
|
|
|
|
|
if (mTrapped)
|
|
|
|
@ -894,7 +895,7 @@ namespace MWMechanics
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void visit (MWMechanics::EffectKey key,
|
|
|
|
|
virtual void visit (MWMechanics::EffectKey key, int /*effectIndex*/,
|
|
|
|
|
const std::string& /*sourceName*/, const std::string& /*sourceId*/, int /*casterActorId*/,
|
|
|
|
|
float magnitude, float remainingTime = -1, float /*totalTime*/ = -1)
|
|
|
|
|
{
|
|
|
|
@ -1196,6 +1197,7 @@ namespace MWMechanics
|
|
|
|
|
{
|
|
|
|
|
UpdateSummonedCreatures updateSummonedCreatures(ptr);
|
|
|
|
|
creatureStats.getActiveSpells().visitEffectSources(updateSummonedCreatures);
|
|
|
|
|
creatureStats.getSpells().visitEffectSources(updateSummonedCreatures);
|
|
|
|
|
if (ptr.getClass().hasInventoryStore(ptr))
|
|
|
|
|
ptr.getClass().getInventoryStore(ptr).visitEffectSources(updateSummonedCreatures);
|
|
|
|
|
updateSummonedCreatures.process(mTimerDisposeSummonsCorpses == 0.f);
|
|
|
|
|