mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-11 12:04:29 +00:00
Revert shared addJournalEntry
This commit is contained in:
parent
34194f9c08
commit
4b98520266
1 changed files with 11 additions and 16 deletions
|
|
@ -22,20 +22,6 @@
|
||||||
|
|
||||||
namespace MWScript
|
namespace MWScript
|
||||||
{
|
{
|
||||||
static void addJournalEntry(ESM::RefId quest, int index, MWWorld::Ptr ptr)
|
|
||||||
{
|
|
||||||
// Invoking Journal with a non-existing index is allowed, and triggers no errors. Seriously? :(
|
|
||||||
try
|
|
||||||
{
|
|
||||||
MWBase::Environment::get().getJournal()->addEntry(quest, index, ptr);
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
if (MWBase::Environment::get().getJournal()->getJournalIndex(quest) < index)
|
|
||||||
MWBase::Environment::get().getJournal()->setJournalIndex(quest, index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Dialogue
|
namespace Dialogue
|
||||||
{
|
{
|
||||||
template <class R>
|
template <class R>
|
||||||
|
|
@ -54,7 +40,16 @@ namespace MWScript
|
||||||
Interpreter::Type_Integer index = runtime[0].mInteger;
|
Interpreter::Type_Integer index = runtime[0].mInteger;
|
||||||
runtime.pop();
|
runtime.pop();
|
||||||
|
|
||||||
addJournalEntry(quest, index, ptr);
|
// Invoking Journal with a non-existing index is allowed, and triggers no errors. Seriously? :(
|
||||||
|
try
|
||||||
|
{
|
||||||
|
MWBase::Environment::get().getJournal()->addEntry(quest, index, ptr);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
if (MWBase::Environment::get().getJournal()->getJournalIndex(quest) < index)
|
||||||
|
MWBase::Environment::get().getJournal()->setJournalIndex(quest, index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -105,7 +100,7 @@ namespace MWScript
|
||||||
const std::list<ESM::DialInfo> orderedInfo = it->mInfoOrder.getOrderedInfo();
|
const std::list<ESM::DialInfo> orderedInfo = it->mInfoOrder.getOrderedInfo();
|
||||||
for (auto info = orderedInfo.begin(); info != orderedInfo.end(); ++info)
|
for (auto info = orderedInfo.begin(); info != orderedInfo.end(); ++info)
|
||||||
{
|
{
|
||||||
addJournalEntry(quest, info->mData.mJournalIndex, ptr);
|
MWBase::Environment::get().getJournal()->addEntry(quest, info->mData.mJournalIndex, ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (type == ESM::Dialogue::Type::Topic)
|
else if (type == ESM::Dialogue::Type::Topic)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue