mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 04:45:32 +00:00
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
|
||||
|
|
|
@ -195,6 +195,7 @@ namespace ESSImport
|
|||
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 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;
|
||||
converters[ESM::REC_GLOB] = boost::shared_ptr<Converter>(new ConvertGlobal());
|
||||
|
@ -202,10 +203,11 @@ namespace ESSImport
|
|||
converters[ESM::REC_NPC_] = boost::shared_ptr<Converter>(new ConvertNPC());
|
||||
converters[ESM::REC_NPCC] = boost::shared_ptr<Converter>(new ConvertNPCC());
|
||||
converters[ESM::REC_CREC] = boost::shared_ptr<Converter>(new ConvertCREC());
|
||||
converters[recREFR] = boost::shared_ptr<Converter>(new ConvertREFR());
|
||||
converters[recPCDT] = boost::shared_ptr<Converter>(new ConvertPCDT());
|
||||
converters[recFMAP] = boost::shared_ptr<Converter>(new ConvertFMAP());
|
||||
converters[recKLST] = boost::shared_ptr<Converter>(new ConvertKLST());
|
||||
converters[recREFR ] = boost::shared_ptr<Converter>(new ConvertREFR());
|
||||
converters[recPCDT ] = boost::shared_ptr<Converter>(new ConvertPCDT());
|
||||
converters[recFMAP ] = boost::shared_ptr<Converter>(new ConvertFMAP());
|
||||
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_ALCH] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Potion>());
|
||||
converters[ESM::REC_CLAS] = boost::shared_ptr<Converter>(new ConvertClass());
|
||||
|
|
Loading…
Reference in a new issue