# Quests (global)

`client.Quests` (`QuestsService`) — the player's global quest list, distinct
from scenario `OnQuest` nodes (`QuestEffect`, see
[scenarios.md](scenarios.md)). Verified against the bundled
`Rudder.Core.dll`. There is no sample scene for this feature.

```csharp
var quests = await client.Quests.ListAsync();
var claim = await client.Quests.ClaimAsync(quest.Id);
var completedIds = await client.Quests.ReportProgressAsync("kills", 1);
```

API:

- `Task<IReadOnlyList<Quest>> ListAsync(CancellationToken = default)`
- `Task<ClaimQuestResponse> ClaimAsync(string questId, CancellationToken = default)`
- `Task<IReadOnlyList<string>> ReportProgressAsync(string metric, long amount, CancellationToken = default)` — returns the ids of quests completed by this report.

Models:

- `Quest` — `Id`, `Name`, `Status`, `Objectives`
  (`List<QuestObjectiveProgress>`), `Rewards` (`List<Reward>`).
- `QuestObjectiveProgress` — `ObjectiveId`, `Metric`, `Current` (`long?`),
  `Target` (`long?`), `Completed` (`bool?`).
- `Reward` — `Currency`, `ItemId`, `Amount` (`long?`).
- `ClaimQuestResponse` — `Success` (`bool?`), `AlreadyClaimed` (`bool?`),
  `Granted` (`List<Reward>`), `Error`.

Store purchases already report metrics automatically; the metric strings are
built by `QuestMetrics.PurchaseOffer(offerId)` → `purchase.offer:<offerId>`
and `QuestMetrics.PurchaseItem(itemId)` → `purchase.item:<itemId>`
(`RudderSdk.Core.QuestMetrics`, static).
