1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +00:00

Issue #324: Modified the interface for modified stats

This commit is contained in:
Marc Zinnschlag 2012-07-09 18:26:00 +02:00
parent fe86ce5a2c
commit 25a5657d80

View file

@ -31,6 +31,11 @@ namespace MWMechanics
return mModified;
}
T getModifier() const
{
return mModified-mBase;
}
/// Set base and modified to \a value.
void set (const T& value)
{
@ -65,10 +70,9 @@ namespace MWMechanics
mBase += diff;
}
/// Change modified relatively.
void modify (const T& diff)
void setModifier (const T& modifier)
{
mModified += diff;
mModified = mBase + modifier;
}
};