forked from teamnwah/openmw-tes3coop
The type used for Stat/DynamicStat templates are now stored as a typedef. Added some convenience constructors for initializing Stat/DynamicStat objects.
This commit is contained in:
parent
eec34e9f0e
commit
647129c866
1 changed files with 7 additions and 0 deletions
|
@ -12,8 +12,11 @@ namespace MWMechanics
|
||||||
T mModified;
|
T mModified;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
typedef T Type;
|
||||||
|
|
||||||
Stat() : mBase (0), mModified (0) {}
|
Stat() : mBase (0), mModified (0) {}
|
||||||
|
Stat(T base) : mBase (base), mModified (base) {}
|
||||||
|
Stat(T base, T modified) : mBase (base), mModified (modified) {}
|
||||||
|
|
||||||
const T& getBase() const
|
const T& getBase() const
|
||||||
{
|
{
|
||||||
|
@ -86,8 +89,12 @@ namespace MWMechanics
|
||||||
T mCurrent;
|
T mCurrent;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
typedef T Type;
|
||||||
|
|
||||||
DynamicStat() : mCurrent (0) {}
|
DynamicStat() : mCurrent (0) {}
|
||||||
|
DynamicStat(T current) : mCurrent (current) {}
|
||||||
|
DynamicStat(T base, T modified, T current) : mStatic(base, modified), mCurrent (current) {}
|
||||||
|
DynamicStat(const Stat<T> &stat, T current) : mStatic(stat), mCurrent (current) {}
|
||||||
|
|
||||||
const T& getBase() const
|
const T& getBase() const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue