mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 10:26:39 +00:00 
			
		
		
		
	Changed records are those where DELE is located after NAME sub-record.
And DELE is the last sub-record.
(cherry picked from commit 926c825d0c)
Conflicts:
	components/esm/loadstat.cpp
	components/esm/loadstat.hpp
	components/esm/util.hpp
		
	
			
		
			
				
	
	
		
			39 lines
		
	
	
	
		
			736 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
	
		
			736 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#include "loadstat.hpp"
 | 
						|
 | 
						|
#include "esmreader.hpp"
 | 
						|
#include "esmwriter.hpp"
 | 
						|
#include "defs.hpp"
 | 
						|
#include "util.hpp"
 | 
						|
 | 
						|
namespace ESM
 | 
						|
{
 | 
						|
    unsigned int Static::sRecordId = REC_STAT;
 | 
						|
 | 
						|
    void Static::load(ESMReader &esm)
 | 
						|
    {
 | 
						|
        mId = esm.getHNString("NAME");
 | 
						|
        if (mIsDeleted = readDeleSubRecord(esm))
 | 
						|
        {
 | 
						|
            return;
 | 
						|
        }
 | 
						|
 | 
						|
        mModel = esm.getHNString("MODL");
 | 
						|
    }
 | 
						|
    void Static::save(ESMWriter &esm) const
 | 
						|
    {
 | 
						|
        esm.writeHNCString("NAME", mId);
 | 
						|
        if (mIsDeleted)
 | 
						|
        {
 | 
						|
            writeDeleSubRecord(esm);
 | 
						|
            return;
 | 
						|
        }
 | 
						|
 | 
						|
        esm.writeHNCString("MODL", mModel);
 | 
						|
    }
 | 
						|
 | 
						|
    void Static::blank()
 | 
						|
    {
 | 
						|
        mModel.clear();
 | 
						|
        mIsDeleted = false;
 | 
						|
    }
 | 
						|
}
 |