forked from mirror/openmw-tes3mp
conversion from 'const float' to 'int', possible loss of data conversion from 'double' to 'int', possible loss of data conversion from 'float' to 'int', possible loss of data
34 lines
No EOL
860 B
C++
34 lines
No EOL
860 B
C++
|
|
#include "stat.hpp"
|
|
|
|
void MWMechanics::AttributeValue::writeState (ESM::StatState<int>& state) const
|
|
{
|
|
state.mBase = mBase;
|
|
state.mMod = mModifier;
|
|
state.mDamage = mDamage;
|
|
}
|
|
|
|
void MWMechanics::AttributeValue::readState (const ESM::StatState<int>& state)
|
|
{
|
|
mBase = state.mBase;
|
|
mModifier = state.mMod;
|
|
mDamage = state.mDamage;
|
|
}
|
|
|
|
void MWMechanics::AttributeValue::setModifiers(float fortify, float drain, float absorb)
|
|
{
|
|
mFortified = static_cast<int>(fortify);
|
|
mModifier = mFortified - static_cast<int>(drain + absorb);
|
|
}
|
|
|
|
void MWMechanics::SkillValue::writeState (ESM::StatState<int>& state) const
|
|
{
|
|
AttributeValue::writeState (state);
|
|
state.mProgress = mProgress;
|
|
}
|
|
|
|
void MWMechanics::SkillValue::readState (const ESM::StatState<int>& state)
|
|
{
|
|
AttributeValue::readState (state);
|
|
mProgress = state.mProgress;
|
|
} |