|
|
@ -54,6 +54,8 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
void setContext(Context& context) { mContext = &context; }
|
|
|
|
void setContext(Context& context) { mContext = &context; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// @note The load method of ESM records accept the deleted flag as a parameter.
|
|
|
|
|
|
|
|
/// I don't know can the DELE sub-record appear in saved games, so the deleted flag will be ignored.
|
|
|
|
virtual void read(ESM::ESMReader& esm)
|
|
|
|
virtual void read(ESM::ESMReader& esm)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -79,7 +81,9 @@ public:
|
|
|
|
virtual void read(ESM::ESMReader& esm)
|
|
|
|
virtual void read(ESM::ESMReader& esm)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
T record;
|
|
|
|
T record;
|
|
|
|
record.load(esm);
|
|
|
|
bool isDeleted = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
record.load(esm, isDeleted);
|
|
|
|
mRecords[record.mId] = record;
|
|
|
|
mRecords[record.mId] = record;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -103,7 +107,9 @@ public:
|
|
|
|
virtual void read(ESM::ESMReader &esm)
|
|
|
|
virtual void read(ESM::ESMReader &esm)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ESM::NPC npc;
|
|
|
|
ESM::NPC npc;
|
|
|
|
npc.load(esm);
|
|
|
|
bool isDeleted = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
npc.load(esm, isDeleted);
|
|
|
|
if (npc.mId != "player")
|
|
|
|
if (npc.mId != "player")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Handles changes to the NPC struct, but since there is no index here
|
|
|
|
// Handles changes to the NPC struct, but since there is no index here
|
|
|
@ -139,7 +145,9 @@ public:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// See comment in ConvertNPC
|
|
|
|
// See comment in ConvertNPC
|
|
|
|
ESM::Creature creature;
|
|
|
|
ESM::Creature creature;
|
|
|
|
creature.load(esm);
|
|
|
|
bool isDeleted = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
creature.load(esm, isDeleted);
|
|
|
|
mContext->mCreatures[Misc::StringUtils::lowerCase(creature.mId)] = creature;
|
|
|
|
mContext->mCreatures[Misc::StringUtils::lowerCase(creature.mId)] = creature;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -154,7 +162,9 @@ public:
|
|
|
|
virtual void read(ESM::ESMReader &esm)
|
|
|
|
virtual void read(ESM::ESMReader &esm)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ESM::Global global;
|
|
|
|
ESM::Global global;
|
|
|
|
global.load(esm);
|
|
|
|
bool isDeleted = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
global.load(esm, isDeleted);
|
|
|
|
if (Misc::StringUtils::ciEqual(global.mId, "gamehour"))
|
|
|
|
if (Misc::StringUtils::ciEqual(global.mId, "gamehour"))
|
|
|
|
mContext->mHour = global.mValue.getFloat();
|
|
|
|
mContext->mHour = global.mValue.getFloat();
|
|
|
|
if (Misc::StringUtils::ciEqual(global.mId, "day"))
|
|
|
|
if (Misc::StringUtils::ciEqual(global.mId, "day"))
|
|
|
@ -173,8 +183,9 @@ public:
|
|
|
|
virtual void read(ESM::ESMReader &esm)
|
|
|
|
virtual void read(ESM::ESMReader &esm)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ESM::Class class_;
|
|
|
|
ESM::Class class_;
|
|
|
|
class_.load(esm);
|
|
|
|
bool isDeleted = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class_.load(esm, isDeleted);
|
|
|
|
if (class_.mId == "NEWCLASSID_CHARGEN")
|
|
|
|
if (class_.mId == "NEWCLASSID_CHARGEN")
|
|
|
|
mContext->mCustomPlayerClassName = class_.mName;
|
|
|
|
mContext->mCustomPlayerClassName = class_.mName;
|
|
|
|
|
|
|
|
|
|
|
@ -188,7 +199,9 @@ public:
|
|
|
|
virtual void read(ESM::ESMReader &esm)
|
|
|
|
virtual void read(ESM::ESMReader &esm)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ESM::Book book;
|
|
|
|
ESM::Book book;
|
|
|
|
book.load(esm);
|
|
|
|
bool isDeleted = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
book.load(esm, isDeleted);
|
|
|
|
if (book.mData.mSkillID == -1)
|
|
|
|
if (book.mData.mSkillID == -1)
|
|
|
|
mContext->mPlayer.mObject.mNpcStats.mUsedIds.push_back(Misc::StringUtils::lowerCase(book.mId));
|
|
|
|
mContext->mPlayer.mObject.mNpcStats.mUsedIds.push_back(Misc::StringUtils::lowerCase(book.mId));
|
|
|
|
|
|
|
|
|
|
|
@ -365,7 +378,9 @@ public:
|
|
|
|
virtual void read(ESM::ESMReader& esm)
|
|
|
|
virtual void read(ESM::ESMReader& esm)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ESM::Faction faction;
|
|
|
|
ESM::Faction faction;
|
|
|
|
faction.load(esm);
|
|
|
|
bool isDeleted = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
faction.load(esm, isDeleted);
|
|
|
|
std::string id = Misc::StringUtils::toLower(faction.mId);
|
|
|
|
std::string id = Misc::StringUtils::toLower(faction.mId);
|
|
|
|
|
|
|
|
|
|
|
|
for (std::map<std::string, int>::const_iterator it = faction.mReactions.begin(); it != faction.mReactions.end(); ++it)
|
|
|
|
for (std::map<std::string, int>::const_iterator it = faction.mReactions.begin(); it != faction.mReactions.end(); ++it)
|
|
|
|