1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +00:00

Some RefId == ESM::RefId::StringRefId('constString') still existed

This commit is contained in:
florent.teppe 2022-11-13 11:57:51 +01:00
parent e7deffb376
commit b61d5d8123
2 changed files with 7 additions and 7 deletions

View File

@ -164,13 +164,13 @@ namespace ESSImport
bool isDeleted = false; bool isDeleted = false;
global.load(esm, isDeleted); global.load(esm, isDeleted);
if (global.mId == ESM::RefId::stringRefId("gamehour")) if (global.mId == "gamehour")
mContext->mHour = global.mValue.getFloat(); mContext->mHour = global.mValue.getFloat();
if (global.mId == ESM::RefId::stringRefId("day")) if (global.mId == "day")
mContext->mDay = global.mValue.getInteger(); mContext->mDay = global.mValue.getInteger();
if (global.mId == ESM::RefId::stringRefId("month")) if (global.mId == "month")
mContext->mMonth = global.mValue.getInteger(); mContext->mMonth = global.mValue.getInteger();
if (global.mId == ESM::RefId::stringRefId("year")) if (global.mId == "year")
mContext->mYear = global.mValue.getInteger(); mContext->mYear = global.mValue.getInteger();
mRecords[global.mId] = global; mRecords[global.mId] = global;
} }
@ -185,7 +185,7 @@ namespace ESSImport
bool isDeleted = false; bool isDeleted = false;
class_.load(esm, isDeleted); class_.load(esm, isDeleted);
if (class_.mId == ESM::RefId::stringRefId("NEWCLASSID_CHARGEN")) if (class_.mId == "NEWCLASSID_CHARGEN")
mContext->mCustomPlayerClassName = class_.mName; mContext->mCustomPlayerClassName = class_.mName;
mRecords[class_.mId] = class_; mRecords[class_.mId] = class_;
@ -216,7 +216,7 @@ namespace ESSImport
auto id = ESM::RefId::stringRefId(esm.getHNString("NAME")); auto id = ESM::RefId::stringRefId(esm.getHNString("NAME"));
NPCC npcc; NPCC npcc;
npcc.load(esm); npcc.load(esm);
if (id == ESM::RefId::stringRefId("PlayerSaveGame")) if (id == "PlayerSaveGame")
{ {
convertNPCC(npcc, mContext->mPlayer.mObject); convertNPCC(npcc, mContext->mPlayer.mObject);
} }

View File

@ -33,7 +33,7 @@ namespace
{ {
return { ' ', false }; return { ' ', false };
} }
bool isId(const ESM::RefId& name) const override { return name == ESM::RefId::stringRefId("player"); } bool isId(const ESM::RefId& name) const override { return name == "player"; }
}; };
class TestErrorHandler : public Compiler::ErrorHandler class TestErrorHandler : public Compiler::ErrorHandler