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:
parent
fe86ce5a2c
commit
25a5657d80
1 changed files with 7 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue