quests and queststate work
This commit is contained in:
parent
94b460bbc8
commit
445ae1387c
27 changed files with 3815 additions and 179 deletions
|
|
@ -78,6 +78,18 @@ public class GameStateSnapshot
|
|||
// Quest flags (from ServerData → PlayerServerData)
|
||||
public List<QuestSnapshot>? QuestFlags;
|
||||
|
||||
// Quest states (from AreaInstance → sub-object → vector)
|
||||
public List<QuestStateEntry>? QuestStates;
|
||||
|
||||
// UI tree — root pointer only; tree is read on-demand
|
||||
public nint GameUiPtr;
|
||||
|
||||
// Quest linked lists (all-quests + tracked merged)
|
||||
public List<QuestLinkedEntry>? QuestLinkedList;
|
||||
|
||||
// Quest groups from UI element tree
|
||||
public List<UiQuestGroup>? UiQuestGroups;
|
||||
|
||||
// Camera
|
||||
public Matrix4x4? CameraMatrix;
|
||||
|
||||
|
|
|
|||
24
src/Roboto.Memory/Snapshots/QuestLinkedEntry.cs
Normal file
24
src/Roboto.Memory/Snapshots/QuestLinkedEntry.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
namespace Roboto.Memory;
|
||||
|
||||
/// <summary>
|
||||
/// A quest entry from the GameUi linked lists.
|
||||
/// All-quests list (GameUi+0x358) provides Id/Name/Act/StateId.
|
||||
/// Tracked-quests list ([6][1]+0x318) adds ObjectiveText.
|
||||
/// </summary>
|
||||
public sealed class QuestLinkedEntry
|
||||
{
|
||||
/// <summary>Internal quest ID from Quest.dat row, e.g. "TreeOfSouls".</summary>
|
||||
public string? InternalId { get; init; }
|
||||
/// <summary>Display name from Quest.dat row, e.g. "Secrets in the Dark".</summary>
|
||||
public string? DisplayName { get; init; }
|
||||
/// <summary>Act number from Quest.dat row.</summary>
|
||||
public int Act { get; init; }
|
||||
/// <summary>State: 0=done, -1(0xFFFFFFFF)=locked, positive=in-progress step.</summary>
|
||||
public int StateId { get; init; }
|
||||
/// <summary>True if this quest appears in the tracked-quests list.</summary>
|
||||
public bool IsTracked { get; init; }
|
||||
/// <summary>Objective text from the tracked quest's runtime state object (std::wstring at +0x34).</summary>
|
||||
public string? ObjectiveText { get; init; }
|
||||
/// <summary>Raw Quest.dat row pointer — used as key for merging tracked info.</summary>
|
||||
public nint QuestDatPtr { get; init; }
|
||||
}
|
||||
13
src/Roboto.Memory/Snapshots/QuestStateEntry.cs
Normal file
13
src/Roboto.Memory/Snapshots/QuestStateEntry.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
namespace Roboto.Memory;
|
||||
|
||||
/// <summary>
|
||||
/// A quest state entry from the AreaInstance quest state container.
|
||||
/// 12-byte struct: {int QuestId, int State, int Flags}.
|
||||
/// Discovered via ScanQuestStateContainers at AI+0x900 → obj → +0x240 vector.
|
||||
/// </summary>
|
||||
public sealed class QuestStateEntry
|
||||
{
|
||||
public int QuestId { get; init; }
|
||||
public int State { get; init; }
|
||||
public int Flags { get; init; }
|
||||
}
|
||||
17
src/Roboto.Memory/Snapshots/UIElementNode.cs
Normal file
17
src/Roboto.Memory/Snapshots/UIElementNode.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
namespace Roboto.Memory;
|
||||
|
||||
/// <summary>
|
||||
/// Lightweight snapshot of a single UIElement from the game's UI tree.
|
||||
/// Built by UIElements RemoteObject during cold tick reads.
|
||||
/// </summary>
|
||||
public sealed class UIElementNode
|
||||
{
|
||||
public nint Address { get; init; }
|
||||
public string? StringId { get; init; }
|
||||
public string? Text { get; init; }
|
||||
public bool IsVisible { get; init; }
|
||||
public float Width { get; init; }
|
||||
public float Height { get; init; }
|
||||
public int ChildCount { get; init; }
|
||||
public List<UIElementNode>? Children { get; init; }
|
||||
}
|
||||
22
src/Roboto.Memory/Snapshots/UiQuestEntry.cs
Normal file
22
src/Roboto.Memory/Snapshots/UiQuestEntry.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
namespace Roboto.Memory;
|
||||
|
||||
/// <summary>
|
||||
/// A quest group from the UI element tree (one per quest_display).
|
||||
/// Contains the quest title and current objective steps.
|
||||
/// </summary>
|
||||
public sealed class UiQuestGroup
|
||||
{
|
||||
/// <summary>Quest title from title_layout → title_label (e.g. "Treacherous Ground").</summary>
|
||||
public string? Title { get; set; }
|
||||
/// <summary>Current quest objective steps.</summary>
|
||||
public List<UiQuestStep> Steps { get; set; } = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A single quest objective from quest_info_entry → quest_info.
|
||||
/// </summary>
|
||||
public sealed class UiQuestStep
|
||||
{
|
||||
/// <summary>Objective text (e.g. "Search Clearfell for the entrance to the Mud Burrow").</summary>
|
||||
public string? Text { get; set; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue