|
|
@ -11,6 +11,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
namespace MWMechanics
|
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
int CreatureStats::sActorId = 0;
|
|
|
|
|
|
|
|
|
|
|
|
CreatureStats::CreatureStats()
|
|
|
|
CreatureStats::CreatureStats()
|
|
|
|
: mLevel (0), mDead (false), mDied (false), mFriendlyHits (0),
|
|
|
|
: mLevel (0), mDead (false), mDied (false), mFriendlyHits (0),
|
|
|
|
mTalkedTo (false), mAlarmed (false),
|
|
|
|
mTalkedTo (false), mAlarmed (false),
|
|
|
@ -18,7 +20,8 @@ namespace MWMechanics
|
|
|
|
mAttackingOrSpell(false),
|
|
|
|
mAttackingOrSpell(false),
|
|
|
|
mIsWerewolf(false),
|
|
|
|
mIsWerewolf(false),
|
|
|
|
mFallHeight(0), mRecalcDynamicStats(false), mKnockdown(false), mKnockdownOneFrame(false), mKnockdownOverOneFrame(false), mHitRecovery(false), mBlock(false),
|
|
|
|
mFallHeight(0), mRecalcDynamicStats(false), mKnockdown(false), mKnockdownOneFrame(false), mKnockdownOverOneFrame(false), mHitRecovery(false), mBlock(false),
|
|
|
|
mMovementFlags(0), mDrawState (DrawState_Nothing), mAttackStrength(0.f)
|
|
|
|
mMovementFlags(0), mDrawState (DrawState_Nothing), mAttackStrength(0.f),
|
|
|
|
|
|
|
|
mActorId (-1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for (int i=0; i<4; ++i)
|
|
|
|
for (int i=0; i<4; ++i)
|
|
|
|
mAiSettings[i] = 0;
|
|
|
|
mAiSettings[i] = 0;
|
|
|
@ -516,4 +519,17 @@ namespace MWMechanics
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return mGoldPool;
|
|
|
|
return mGoldPool;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int CreatureStats::getActorId()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (mActorId==-1)
|
|
|
|
|
|
|
|
mActorId = sActorId++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return mActorId;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool CreatureStats::matchesActorId (int id) const
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return mActorId!=-1 && id==mActorId;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|