forked from mirror/openmw-tes3mp
Some fixes for ESM Dialogues and Infos
This commit is contained in:
parent
7ecb54a776
commit
e0983c815c
4 changed files with 9 additions and 2 deletions
|
@ -371,7 +371,8 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
found->second = dialogue;
|
found->second.mIsDeleted = dialogue.mIsDeleted;
|
||||||
|
found->second.mType = dialogue.mType;
|
||||||
}
|
}
|
||||||
|
|
||||||
mLastAddedRecord = dialogue;
|
mLastAddedRecord = dialogue;
|
||||||
|
|
|
@ -32,6 +32,7 @@ namespace ESM
|
||||||
int32_t empty;
|
int32_t empty;
|
||||||
esm.getT(empty); // Skip an empty DATA
|
esm.getT(empty); // Skip an empty DATA
|
||||||
mIsDeleted = readDeleSubRecord(esm);
|
mIsDeleted = readDeleSubRecord(esm);
|
||||||
|
mType = Unknown;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
esm.fail("Unknown sub record size");
|
esm.fail("Unknown sub record size");
|
||||||
|
@ -54,6 +55,7 @@ namespace ESM
|
||||||
void Dialogue::blank()
|
void Dialogue::blank()
|
||||||
{
|
{
|
||||||
mInfo.clear();
|
mInfo.clear();
|
||||||
|
mIsDeleted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dialogue::readInfo(ESMReader &esm, bool merge)
|
void Dialogue::readInfo(ESMReader &esm, bool merge)
|
||||||
|
|
|
@ -30,7 +30,8 @@ struct Dialogue
|
||||||
Voice = 1,
|
Voice = 1,
|
||||||
Greeting = 2,
|
Greeting = 2,
|
||||||
Persuasion = 3,
|
Persuasion = 3,
|
||||||
Journal = 4
|
Journal = 4,
|
||||||
|
Unknown = -1 // Used for deleted dialogues
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string mId;
|
std::string mId;
|
||||||
|
|
|
@ -17,6 +17,7 @@ namespace ESM
|
||||||
{
|
{
|
||||||
mQuestStatus = QS_None;
|
mQuestStatus = QS_None;
|
||||||
mFactionLess = false;
|
mFactionLess = false;
|
||||||
|
mIsDeleted = false;
|
||||||
|
|
||||||
mPrev = esm.getHNString("PNAM");
|
mPrev = esm.getHNString("PNAM");
|
||||||
mNext = esm.getHNString("NNAM");
|
mNext = esm.getHNString("NNAM");
|
||||||
|
@ -142,6 +143,7 @@ namespace ESM
|
||||||
{
|
{
|
||||||
esm.writeHNCString("PNAM", mPrev);
|
esm.writeHNCString("PNAM", mPrev);
|
||||||
esm.writeHNCString("NNAM", mNext);
|
esm.writeHNCString("NNAM", mNext);
|
||||||
|
|
||||||
if (mIsDeleted)
|
if (mIsDeleted)
|
||||||
{
|
{
|
||||||
esm.writeHNCString("NAME", mResponse);
|
esm.writeHNCString("NAME", mResponse);
|
||||||
|
@ -200,5 +202,6 @@ namespace ESM
|
||||||
mResultScript.clear();
|
mResultScript.clear();
|
||||||
mFactionLess = false;
|
mFactionLess = false;
|
||||||
mQuestStatus = QS_None;
|
mQuestStatus = QS_None;
|
||||||
|
mIsDeleted = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue