1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 03:53:52 +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; return mModified;
} }
T getModifier() const
{
return mModified-mBase;
}
/// Set base and modified to \a value. /// Set base and modified to \a value.
void set (const T& value) void set (const T& value)
{ {
@ -65,10 +70,9 @@ namespace MWMechanics
mBase += diff; mBase += diff;
} }
/// Change modified relatively. void setModifier (const T& modifier)
void modify (const T& diff)
{ {
mModified += diff; mModified = mBase + modifier;
} }
}; };