forked from teamnwah/openmw-tes3coop
ESSImport: read stolen items (not converted yet)
This commit is contained in:
parent
25ff45d819
commit
1375a4e4bb
2 changed files with 30 additions and 4 deletions
|
@ -321,6 +321,30 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Stolen items
|
||||||
|
class ConvertSTLN : public Converter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void read(ESM::ESMReader &esm)
|
||||||
|
{
|
||||||
|
std::string itemid = esm.getHNString("NAME");
|
||||||
|
|
||||||
|
while (esm.isNextSub("ONAM"))
|
||||||
|
{
|
||||||
|
std::string ownerid = esm.getHString();
|
||||||
|
mStolenItems.insert(std::make_pair(itemid, ownerid));
|
||||||
|
}
|
||||||
|
while (esm.isNextSub("FNAM"))
|
||||||
|
{
|
||||||
|
std::string factionid = esm.getHString();
|
||||||
|
mFactionStolenItems.insert(std::make_pair(itemid, factionid));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
std::multimap<std::string, std::string> mStolenItems;
|
||||||
|
std::multimap<std::string, std::string> mFactionStolenItems;
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -195,6 +195,7 @@ namespace ESSImport
|
||||||
const unsigned int recPCDT = ESM::FourCC<'P','C','D','T'>::value;
|
const unsigned int recPCDT = ESM::FourCC<'P','C','D','T'>::value;
|
||||||
const unsigned int recFMAP = ESM::FourCC<'F','M','A','P'>::value;
|
const unsigned int recFMAP = ESM::FourCC<'F','M','A','P'>::value;
|
||||||
const unsigned int recKLST = ESM::FourCC<'K','L','S','T'>::value;
|
const unsigned int recKLST = ESM::FourCC<'K','L','S','T'>::value;
|
||||||
|
const unsigned int recSTLN = ESM::FourCC<'S','T','L','N'>::value;
|
||||||
|
|
||||||
std::map<unsigned int, boost::shared_ptr<Converter> > converters;
|
std::map<unsigned int, boost::shared_ptr<Converter> > converters;
|
||||||
converters[ESM::REC_GLOB] = boost::shared_ptr<Converter>(new ConvertGlobal());
|
converters[ESM::REC_GLOB] = boost::shared_ptr<Converter>(new ConvertGlobal());
|
||||||
|
@ -206,6 +207,7 @@ namespace ESSImport
|
||||||
converters[recPCDT ] = boost::shared_ptr<Converter>(new ConvertPCDT());
|
converters[recPCDT ] = boost::shared_ptr<Converter>(new ConvertPCDT());
|
||||||
converters[recFMAP ] = boost::shared_ptr<Converter>(new ConvertFMAP());
|
converters[recFMAP ] = boost::shared_ptr<Converter>(new ConvertFMAP());
|
||||||
converters[recKLST ] = boost::shared_ptr<Converter>(new ConvertKLST());
|
converters[recKLST ] = boost::shared_ptr<Converter>(new ConvertKLST());
|
||||||
|
converters[recSTLN ] = boost::shared_ptr<Converter>(new ConvertSTLN());
|
||||||
converters[ESM::REC_CELL] = boost::shared_ptr<Converter>(new ConvertCell());
|
converters[ESM::REC_CELL] = boost::shared_ptr<Converter>(new ConvertCell());
|
||||||
converters[ESM::REC_ALCH] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Potion>());
|
converters[ESM::REC_ALCH] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Potion>());
|
||||||
converters[ESM::REC_CLAS] = boost::shared_ptr<Converter>(new ConvertClass());
|
converters[ESM::REC_CLAS] = boost::shared_ptr<Converter>(new ConvertClass());
|
||||||
|
|
Loading…
Reference in a new issue