mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-29 07:00:46 -04:00
Fix saving when only topic info was modified (topic itself unchanged)
(cherry picked from commit 78c735adc609dda06954746b31cea4289a7060ad)
This commit is contained in:
parent
245357c9b2
commit
894f3a9418
@ -133,11 +133,22 @@ void CSMDoc::WriteDialogueCollectionStage::perform (int stage, Messages& message
|
|||||||
if (state==CSMWorld::RecordBase::State_Modified ||
|
if (state==CSMWorld::RecordBase::State_Modified ||
|
||||||
state==CSMWorld::RecordBase::State_ModifiedOnly ||
|
state==CSMWorld::RecordBase::State_ModifiedOnly ||
|
||||||
infoModified)
|
infoModified)
|
||||||
|
{
|
||||||
|
if (infoModified && state != CSMWorld::RecordBase::State_Modified
|
||||||
|
&& state != CSMWorld::RecordBase::State_ModifiedOnly)
|
||||||
|
{
|
||||||
|
mState.getWriter().startRecord (topic.mBase.sRecordId);
|
||||||
|
mState.getWriter().writeHNCString ("NAME", topic.mBase.mId);
|
||||||
|
topic.mBase.save (mState.getWriter());
|
||||||
|
mState.getWriter().endRecord (topic.mBase.sRecordId);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
mState.getWriter().startRecord (topic.mModified.sRecordId);
|
mState.getWriter().startRecord (topic.mModified.sRecordId);
|
||||||
mState.getWriter().writeHNCString ("NAME", topic.mModified.mId);
|
mState.getWriter().writeHNCString ("NAME", topic.mModified.mId);
|
||||||
topic.mModified.save (mState.getWriter());
|
topic.mModified.save (mState.getWriter());
|
||||||
mState.getWriter().endRecord (topic.mModified.sRecordId);
|
mState.getWriter().endRecord (topic.mModified.sRecordId);
|
||||||
|
}
|
||||||
|
|
||||||
// write modified selected info records
|
// write modified selected info records
|
||||||
for (CSMWorld::InfoCollection::RecordConstIterator iter (range.first); iter!=range.second;
|
for (CSMWorld::InfoCollection::RecordConstIterator iter (range.first); iter!=range.second;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user