mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 07:23:51 +00:00
Merge pull request #2146 from Capostrophic/quest
Make quest status update handling closer to vanilla (bug #4815)
This commit is contained in:
commit
d2b93fc702
2 changed files with 12 additions and 14 deletions
|
@ -24,6 +24,7 @@
|
||||||
Bug #4803: Stray special characters before begin statement break script compilation
|
Bug #4803: Stray special characters before begin statement break script compilation
|
||||||
Bug #4804: Particle system with the "Has Sizes = false" causes an exception
|
Bug #4804: Particle system with the "Has Sizes = false" causes an exception
|
||||||
Bug #4813: Creatures with known file but no "Sound Gen Creature" assigned use default sounds
|
Bug #4813: Creatures with known file but no "Sound Gen Creature" assigned use default sounds
|
||||||
|
Bug #4815: "Finished" journal entry with lower index doesn't close journal, SetJournalIndex closes journal
|
||||||
Bug #4820: Spell absorption is broken
|
Bug #4820: Spell absorption is broken
|
||||||
Bug #4827: NiUVController is handled incorrectly
|
Bug #4827: NiUVController is handled incorrectly
|
||||||
Bug #4828: Potion looping effects VFX are not shown for NPCs
|
Bug #4828: Potion looping effects VFX are not shown for NPCs
|
||||||
|
|
|
@ -41,19 +41,6 @@ namespace MWDialogue
|
||||||
|
|
||||||
void Quest::setIndex (int index)
|
void Quest::setIndex (int index)
|
||||||
{
|
{
|
||||||
const ESM::Dialogue *dialogue =
|
|
||||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Dialogue>().find (mTopic);
|
|
||||||
|
|
||||||
for (ESM::Dialogue::InfoContainer::const_iterator iter (dialogue->mInfo.begin());
|
|
||||||
iter!=dialogue->mInfo.end(); ++iter)
|
|
||||||
if (iter->mData.mDisposition==index && iter->mQuestStatus!=ESM::DialInfo::QS_Name)
|
|
||||||
{
|
|
||||||
if (iter->mQuestStatus==ESM::DialInfo::QS_Finished)
|
|
||||||
mFinished = true;
|
|
||||||
else if (iter->mQuestStatus==ESM::DialInfo::QS_Restart)
|
|
||||||
mFinished = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The index must be set even if no related journal entry was found
|
// The index must be set even if no related journal entry was found
|
||||||
mIndex = index;
|
mIndex = index;
|
||||||
}
|
}
|
||||||
|
@ -81,8 +68,18 @@ namespace MWDialogue
|
||||||
if (index==-1)
|
if (index==-1)
|
||||||
throw std::runtime_error ("unknown journal entry for topic " + mTopic);
|
throw std::runtime_error ("unknown journal entry for topic " + mTopic);
|
||||||
|
|
||||||
|
for (auto &info : dialogue->mInfo)
|
||||||
|
{
|
||||||
|
if (info.mData.mJournalIndex == index
|
||||||
|
&& (info.mQuestStatus == ESM::DialInfo::QS_Finished || info.mQuestStatus == ESM::DialInfo::QS_Restart))
|
||||||
|
{
|
||||||
|
mFinished = (info.mQuestStatus == ESM::DialInfo::QS_Finished);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (index > mIndex)
|
if (index > mIndex)
|
||||||
setIndex (index);
|
mIndex = index;
|
||||||
|
|
||||||
for (TEntryIter iter (mEntries.begin()); iter!=mEntries.end(); ++iter)
|
for (TEntryIter iter (mEntries.begin()); iter!=mEntries.end(); ++iter)
|
||||||
if (iter->mInfoId==entry.mInfoId)
|
if (iter->mInfoId==entry.mInfoId)
|
||||||
|
|
Loading…
Reference in a new issue