Return To NPC and watches
Posted: Wed Dec 11, 2024 9:25 am
Hi there,
I hit what appeared to be a bug recently - I wanted to view the state of a quest in the watches tab. However, the quest did not show up when I added all quests there; and trying to add a specific quest didn't show the quest in question in the list. I eventually figured out it was because the quest was in state 'return to NPC' at the time when the 'watchable quests' list was generated. I fixed this in Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Dialogue Editor/DialogueEditorWindowWatchSection.cs as follows:
- List<string> questNames = new List<string>(QuestLog.GetAllQuests(QuestState.Abandoned | QuestState.Active | QuestState.Failure | QuestState.Success | QuestState.Grantable | QuestState.Unassigned));
+ List<string> questNames = new List<string>(QuestLog.GetAllQuests(QuestState.Abandoned | QuestState.Active | QuestState.Failure | QuestState.Success | QuestState.Grantable | QuestState.ReturnToNPC | QuestState.Unassigned));
This seems to fix it at least... but is there a good reason why that state was omitted there? And thinking about it, perhaps GetAllQuests((QuestState)-1) would be a better fix for future proofing reasons.
If this is not a bug, and there is a good reason to omit the state there, I wonder if you could explain a little or point me towards some documentation that would enlighten me! Thanks,
Andy
I hit what appeared to be a bug recently - I wanted to view the state of a quest in the watches tab. However, the quest did not show up when I added all quests there; and trying to add a specific quest didn't show the quest in question in the list. I eventually figured out it was because the quest was in state 'return to NPC' at the time when the 'watchable quests' list was generated. I fixed this in Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Dialogue Editor/DialogueEditorWindowWatchSection.cs as follows:
- List<string> questNames = new List<string>(QuestLog.GetAllQuests(QuestState.Abandoned | QuestState.Active | QuestState.Failure | QuestState.Success | QuestState.Grantable | QuestState.Unassigned));
+ List<string> questNames = new List<string>(QuestLog.GetAllQuests(QuestState.Abandoned | QuestState.Active | QuestState.Failure | QuestState.Success | QuestState.Grantable | QuestState.ReturnToNPC | QuestState.Unassigned));
This seems to fix it at least... but is there a good reason why that state was omitted there? And thinking about it, perhaps GetAllQuests((QuestState)-1) would be a better fix for future proofing reasons.
If this is not a bug, and there is a good reason to omit the state there, I wonder if you could explain a little or point me towards some documentation that would enlighten me! Thanks,
Andy