Further work out dialogue endpoint
This commit is contained in:
+109220
-109220
File diff suppressed because it is too large
Load Diff
@@ -165,6 +165,6 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
public ValueTask<string> GetDialogue(string url, object request, MongoId sessionID)
|
||||
{
|
||||
return new ValueTask<string>(httpResponseUtil.NoBody(databaseService.GetTemplates().Dialogue));
|
||||
return new ValueTask<string>(httpResponseUtil.GetUnclearedBody(databaseService.GetTemplates().Dialogue));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using SPTarkov.Server.Core.Models.Common;
|
||||
|
||||
namespace SPTarkov.Server.Core.Models.Eft.Common.Tables;
|
||||
|
||||
public record TraderDialogs
|
||||
{
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, object> ExtensionData { get; init; } = [];
|
||||
|
||||
[JsonPropertyName("elements")]
|
||||
public required List<TraderDialogElements> Elements;
|
||||
}
|
||||
|
||||
public record TraderDialogElements
|
||||
{
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, object> ExtensionData { get; init; } = [];
|
||||
|
||||
[JsonPropertyName("CanBeFirstDialogue")]
|
||||
public bool CanBeFirstDialog { get; set; } = true;
|
||||
|
||||
[JsonPropertyName("Id")]
|
||||
public required MongoId Id { get; set; }
|
||||
|
||||
[JsonPropertyName("MainVariable")]
|
||||
public required MongoId MainVariable { get; set; }
|
||||
|
||||
[JsonPropertyName("Trader")]
|
||||
public required MongoId MainTrader { get; set; }
|
||||
|
||||
[JsonPropertyName("SubTraders")]
|
||||
public required List<MongoId> SubTraders { get; set; }
|
||||
|
||||
//Todo: Still needs fixing up
|
||||
[JsonPropertyName("Lines")]
|
||||
public required List<object> Lines { get; set; }
|
||||
|
||||
[JsonPropertyName("StartPoints")]
|
||||
public required Dictionary<MongoId, int> StartPoints { get; set; }
|
||||
|
||||
[JsonPropertyName("localization")]
|
||||
public required Dictionary<string, Dictionary<string, string>> LocalizationDictionary { get; set; }
|
||||
}
|
||||
@@ -35,7 +35,7 @@ public record Templates
|
||||
public required Dictionary<MongoId, CustomizationItem> Customization { get; init; }
|
||||
|
||||
[JsonPropertyName("dialogue")]
|
||||
public required object Dialogue { get; init; }
|
||||
public required TraderDialogs Dialogue { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The profile templates listed in the launcher on profile creation, split by account type (e.g. Standard) then side (e.g. bear/usec)
|
||||
|
||||
Reference in New Issue
Block a user