You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
577 B
C++
34 lines
577 B
C++
#include "loadcont.hpp"
|
|
|
|
namespace ESM
|
|
{
|
|
|
|
void InventoryList::load(ESMReader &esm)
|
|
{
|
|
ContItem ci;
|
|
while (esm.isNextSub("NPCO"))
|
|
{
|
|
esm.getHT(ci, 36);
|
|
list.push_back(ci);
|
|
}
|
|
}
|
|
|
|
void Container::load(ESMReader &esm)
|
|
{
|
|
model = esm.getHNString("MODL");
|
|
name = esm.getHNOString("FNAM");
|
|
esm.getHNT(weight, "CNDT", 4);
|
|
esm.getHNT(flags, "FLAG", 4);
|
|
|
|
if (flags & 0xf4)
|
|
esm.fail("Unknown flags");
|
|
if (!(flags & 0x8))
|
|
esm.fail("Flag 8 not set");
|
|
|
|
script = esm.getHNOString("SCRI");
|
|
|
|
inventory.load(esm);
|
|
}
|
|
|
|
}
|