mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +00:00
Issue #324: Modified the interface for modified stats
This commit is contained in:
parent
fe86ce5a2c
commit
25a5657d80
@ -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…
x
Reference in New Issue
Block a user