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
|
||||
{
|
||||
found->second = dialogue;
|
||||
found->second.mIsDeleted = dialogue.mIsDeleted;
|
||||
found->second.mType = dialogue.mType;
|
||||
}
|
||||
|
||||
mLastAddedRecord = dialogue;
|
||||
|
|
|
@ -32,6 +32,7 @@ namespace ESM
|
|||
int32_t empty;
|
||||
esm.getT(empty); // Skip an empty DATA
|
||||
mIsDeleted = readDeleSubRecord(esm);
|
||||
mType = Unknown;
|
||||
}
|
||||
else
|
||||
esm.fail("Unknown sub record size");
|
||||
|
@ -54,6 +55,7 @@ namespace ESM
|
|||
void Dialogue::blank()
|
||||
{
|
||||
mInfo.clear();
|
||||
mIsDeleted = false;
|
||||
}
|
||||
|
||||
void Dialogue::readInfo(ESMReader &esm, bool merge)
|
||||
|
|
|
@ -30,7 +30,8 @@ struct Dialogue
|
|||
Voice = 1,
|
||||
Greeting = 2,
|
||||
Persuasion = 3,
|
||||
Journal = 4
|
||||
Journal = 4,
|
||||
Unknown = -1 // Used for deleted dialogues
|
||||
};
|
||||
|
||||
std::string mId;
|
||||
|
|
|
@ -17,6 +17,7 @@ namespace ESM
|
|||
{
|
||||
mQuestStatus = QS_None;
|
||||
mFactionLess = false;
|
||||
mIsDeleted = false;
|
||||
|
||||
mPrev = esm.getHNString("PNAM");
|
||||
mNext = esm.getHNString("NNAM");
|
||||
|
@ -142,6 +143,7 @@ namespace ESM
|
|||
{
|
||||
esm.writeHNCString("PNAM", mPrev);
|
||||
esm.writeHNCString("NNAM", mNext);
|
||||
|
||||
if (mIsDeleted)
|
||||
{
|
||||
esm.writeHNCString("NAME", mResponse);
|
||||
|
@ -200,5 +202,6 @@ namespace ESM
|
|||
mResultScript.clear();
|
||||
mFactionLess = false;
|
||||
mQuestStatus = QS_None;
|
||||
mIsDeleted = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue