feat: Round 52 narrative systems improvements
P1-A: QuestManager.OnLoad Enum.TryParse failure warning (dev builds)
P1-B: SaveData.QuestState ObjectiveCompleted dict; BuildObjectiveCompleted
helper; OnSave/OnLoad wiring (DataVersion 2→3)
P2-A: Quest start/complete timestamps (_startedAtUtc/_completedAtUtc dicts;
StartedAtUtc/CompletedAtUtc in SaveData; AcceptQuest/CompleteQuest/
OnSave/OnLoad wiring)
P2-B: DialogueManager pending queue Queue→List + priority-eviction on full
(lowest-priority item evicted when higher-priority request arrives)
P2-C: NpcSO.localizationTable field; NpcSOEditor uses npc.localizationTable
in TryResolveNameKey, PingLocalizationFile, and button label
P3-A: QuestSO.failConditions[] multi-fail array; Obsolete failCondition;
DispatchEvent updates fail check to any-of-array logic with fallback
P3-B: QuestObjectiveSO.prerequisiteObjectiveId; DispatchEvent gates objective
event routing behind prerequisite completed check
P3-C: IQuestEventPayload interface + StringQuestPayload struct; QuestObjectiveSO
typed TryHandleEvent(IQuestEventPayload) overload; DispatchEvent string
overload delegates to typed IQuestEventPayload overload
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -83,9 +83,14 @@ namespace BaseGames.Quest
|
||||
public RewardSO reward;
|
||||
|
||||
[Header("失败条件(可选)")]
|
||||
[Tooltip("勾选后,failCondition 目标一旦完成,本任务立即失败并触发 EVT_QuestFailed 事件。")]
|
||||
[Tooltip("勾选后,failConditions 中任意一个目标完成,本任务立即失败并触发 EVT_QuestFailed 事件。")]
|
||||
public bool canFail;
|
||||
[Tooltip("失败判定目标。canFail=true 时有效;此目标达成即视为任务失败。")]
|
||||
[Tooltip("失败判定目标列表(任意一个达成即失败)。canFail=true 时有效。\n" +
|
||||
"支持多个失败条件(如「BOSS 在限时内未被击败」OR「关键 NPC 死亡」)。")]
|
||||
public QuestObjectiveSO[] failConditions;
|
||||
[System.Obsolete("已废弃,请改用 failConditions(数组,支持多个失败条件)。保留以兼容现有资产序列化。")]
|
||||
[HideInInspector]
|
||||
[Tooltip("(旧版单一失败条件,已被 failConditions 数组取代。保留以兼容现有资产。)")]
|
||||
public QuestObjectiveSO failCondition;
|
||||
|
||||
[Header("接取/完成对话")]
|
||||
|
||||
Reference in New Issue
Block a user