forked from liza/Questionable
Skip loading unknown quests (e.g. for CN) shipped with the plugin
This commit is contained in:
parent
22949d0e32
commit
619b5431d5
@ -92,17 +92,24 @@ internal sealed class QuestRegistry
|
|||||||
|
|
||||||
foreach ((ElementId questId, QuestRoot questRoot) in AssemblyQuestLoader.GetQuests())
|
foreach ((ElementId questId, QuestRoot questRoot) in AssemblyQuestLoader.GetQuests())
|
||||||
{
|
{
|
||||||
var questInfo = _questData.GetQuestInfo(questId);
|
try
|
||||||
if (questInfo is LeveInfo leveInfo)
|
|
||||||
_leveData.AddQuestSteps(leveInfo, questRoot);
|
|
||||||
Quest quest = new()
|
|
||||||
{
|
{
|
||||||
Id = questId,
|
var questInfo = _questData.GetQuestInfo(questId);
|
||||||
Root = questRoot,
|
if (questInfo is LeveInfo leveInfo)
|
||||||
Info = questInfo,
|
_leveData.AddQuestSteps(leveInfo, questRoot);
|
||||||
Source = Quest.ESource.Assembly,
|
Quest quest = new()
|
||||||
};
|
{
|
||||||
_quests[quest.Id] = quest;
|
Id = questId,
|
||||||
|
Root = questRoot,
|
||||||
|
Info = questInfo,
|
||||||
|
Source = Quest.ESource.Assembly,
|
||||||
|
};
|
||||||
|
_quests[quest.Id] = quest;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
_logger.LogWarning("Not loading unknown quest {QuestId} from assembly: {Message}", questId, e.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation("Loaded {Count} quests from assembly", _quests.Count);
|
_logger.LogInformation("Loaded {Count} quests from assembly", _quests.Count);
|
||||||
|
Loading…
Reference in New Issue
Block a user