Save state is handled correctly now.

This commit is contained in:
Jeffrey Haines 2014-04-14 18:11:04 -04:00
parent a274b48f2f
commit e2fab228f9
2 changed files with 9 additions and 0 deletions

View file

@ -452,6 +452,8 @@ void MWMechanics::NpcStats::writeState (ESM::NpcStats& state) const
mWerewolfSkill[i].writeState (state.mSkills[i].mWerewolf);
}
state.mCrimeId = mCrimeId;
state.mBounty = mBounty;
for (std::set<std::string>::const_iterator iter (mExpelled.begin());
@ -504,6 +506,7 @@ void MWMechanics::NpcStats::readState (const ESM::NpcStats& state)
mWerewolfSkill[i].readState (state.mSkills[i].mWerewolf);
}
mCrimeId = state.mCrimeId;
mBounty = state.mBounty;
mReputation = state.mReputation;
mWerewolfKills = state.mWerewolfKills;

View file

@ -196,6 +196,9 @@ namespace MWWorld
mPlayer.save (player.mObject);
player.mCellId = mCellStore->getCell()->getCellId();
player.mCurrentCrimeId = mCurrentCrimeId;
player.mPayedCrimeId = mPayedCrimeId;
player.mBirthsign = mSign;
player.mLastKnownExteriorPosition[0] = mLastKnownExteriorPosition.x;
@ -241,6 +244,9 @@ namespace MWWorld
!world.getStore().get<ESM::BirthSign>().search (player.mBirthsign))
throw std::runtime_error ("invalid player state record (birthsign)");
mCurrentCrimeId = player.mCurrentCrimeId;
mPayedCrimeId = player.mPayedCrimeId;
mSign = player.mBirthsign;
mLastKnownExteriorPosition.x = player.mLastKnownExteriorPosition[0];