fix: Round 54 priority dequeue, onComplete callback, prerequisiteObjectiveId validation, localizationTable guard, FailQuest timestamp, remove empty ValidateBranchDialogueKeys

- DialogueManager.EndDialogue: dequeue by max-priority index instead of FIFO index-0
- DialogueManager.EndDialogue: fire _onCompleteCallback on normal end (was only in ForceEnd)
- NpcSO.OnValidate: auto-restore localizationTable to 'UI' if cleared
- QuestSO.ValidateObjectiveIds: validate prerequisiteObjectiveId references exist in same quest
- QuestSO.OnValidate: remove call to empty ValidateBranchDialogueKeys stub + remove the stub itself
- QuestManager.DispatchEvent toFail loop: write _completedAtUtc timestamp on quest failure

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-05-25 07:20:55 +08:00
parent da2948dff8
commit 943178cbc1
4 changed files with 26 additions and 9 deletions

View File

@@ -68,6 +68,9 @@ namespace BaseGames.Dialogue
private void OnValidate()
{
if (string.IsNullOrEmpty(localizationTable))
localizationTable = "UI";
if (string.IsNullOrWhiteSpace(npcId))
{
UnityEditor.EditorUtility.SetDirty(this);