mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-17 19:20:49 +00:00
parent
2cc1b52baf
commit
fd89fa415a
@ -697,6 +697,19 @@ namespace MWMechanics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// dynamic stats
|
||||||
|
for (int i = 0; i < 3; ++i)
|
||||||
|
{
|
||||||
|
DynamicStat<float> stat = creatureStats.getDynamic(i);
|
||||||
|
stat.setCurrentModifier(effects.get(ESM::MagicEffect::FortifyHealth + i).getMagnitude() -
|
||||||
|
effects.get(ESM::MagicEffect::DrainHealth + i).getMagnitude(),
|
||||||
|
// Magicka can be decreased below zero due to a fortify effect wearing off
|
||||||
|
// Fatigue can be decreased below zero meaning the actor will be knocked out
|
||||||
|
i == 1 || i == 2);
|
||||||
|
|
||||||
|
creatureStats.setDynamic(i, stat);
|
||||||
|
}
|
||||||
|
|
||||||
// attributes
|
// attributes
|
||||||
for(int i = 0;i < ESM::Attribute::Length;++i)
|
for(int i = 0;i < ESM::Attribute::Length;++i)
|
||||||
{
|
{
|
||||||
@ -728,19 +741,6 @@ namespace MWMechanics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// dynamic stats
|
|
||||||
for(int i = 0;i < 3;++i)
|
|
||||||
{
|
|
||||||
DynamicStat<float> stat = creatureStats.getDynamic(i);
|
|
||||||
stat.setCurrentModifier(effects.get(ESM::MagicEffect::FortifyHealth+i).getMagnitude() -
|
|
||||||
effects.get(ESM::MagicEffect::DrainHealth+i).getMagnitude(),
|
|
||||||
// Magicka can be decreased below zero due to a fortify effect wearing off
|
|
||||||
// Fatigue can be decreased below zero meaning the actor will be knocked out
|
|
||||||
i == 1 || i == 2);
|
|
||||||
|
|
||||||
creatureStats.setDynamic(i, stat);
|
|
||||||
}
|
|
||||||
|
|
||||||
// AI setting modifiers
|
// AI setting modifiers
|
||||||
int creature = !ptr.getClass().isNpc();
|
int creature = !ptr.getClass().isNpc();
|
||||||
if (creature && ptr.get<ESM::Creature>()->mBase->mData.mType == ESM::Creature::Humanoid)
|
if (creature && ptr.get<ESM::Creature>()->mBase->mData.mType == ESM::Creature::Humanoid)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user