mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-20 19:39:41 +00:00
parent
2cc1b52baf
commit
fd89fa415a
1 changed files with 13 additions and 13 deletions
|
@ -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
|
||||
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
|
||||
int creature = !ptr.getClass().isNpc();
|
||||
if (creature && ptr.get<ESM::Creature>()->mBase->mData.mType == ESM::Creature::Humanoid)
|
||||
|
|
Loading…
Reference in a new issue