Repeatable quest changes
This commit is contained in:
@@ -297,8 +297,6 @@ public class RepeatableQuestController
|
||||
|
||||
private QuestTypePool GenerateQuestPool(RepeatableQuestConfig repeatableConfig, int? pmcLevel)
|
||||
{
|
||||
_logger.Error("BYPASSED GenerateQuestPool");
|
||||
return new();
|
||||
var questPool = CreateBaseQuestPool(repeatableConfig);
|
||||
|
||||
// Get the allowed locations based on the PMC's level
|
||||
|
||||
@@ -40,8 +40,8 @@ public class RepeatableQuestHelper
|
||||
|
||||
public ProbabilityObjectArray<K, V>
|
||||
ProbabilityObjectArray<K, V>(
|
||||
List<ProbabilityObject<K, V>> configArrayInput
|
||||
) // TODO: ProbabilityObjectArray<K, V> for return type , param type was List<ProbabilityObject<K, V>>
|
||||
List<ProbabilityObject<K, V>>? configArrayInput
|
||||
)
|
||||
{
|
||||
var configArray = _cloner.Clone(configArrayInput);
|
||||
var probabilityArray = new ProbabilityObjectArray<K, V>(_mathUtil, _cloner, configArray);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Common;
|
||||
using Core.Models.Enums;
|
||||
using Core.Utils.Collections;
|
||||
using Core.Utils.Json.Converters;
|
||||
|
||||
namespace Core.Models.Spt.Config;
|
||||
@@ -344,10 +345,8 @@ public record BaseQuestConfig
|
||||
public List<string>? PossibleSkillRewards { get; set; }
|
||||
}
|
||||
|
||||
public record Target : ProbabilityObject
|
||||
public class Target : ProbabilityObject<string, BossInfo>
|
||||
{
|
||||
[JsonPropertyName("data")]
|
||||
public BossInfo? Data { get; set; }
|
||||
}
|
||||
|
||||
public record BossInfo
|
||||
@@ -359,26 +358,10 @@ public record BossInfo
|
||||
public bool? IsPmc { get; set; }
|
||||
}
|
||||
|
||||
public record BodyPart : ProbabilityObject
|
||||
public class BodyPart : ProbabilityObject<string, List<string>>
|
||||
{
|
||||
[JsonPropertyName("data")]
|
||||
public List<string>? Data { get; set; }
|
||||
}
|
||||
|
||||
public record WeaponRequirement : ProbabilityObject
|
||||
public class WeaponRequirement : ProbabilityObject<string, List<string>>
|
||||
{
|
||||
[JsonPropertyName("data")]
|
||||
public List<string>? Data { get; set; }
|
||||
}
|
||||
|
||||
public record ProbabilityObject
|
||||
{
|
||||
[JsonPropertyName("key")]
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonPropertyName("relativeProbability")]
|
||||
public double? RelativeProbability { get; set; }
|
||||
|
||||
[JsonPropertyName("data")]
|
||||
public object? Data { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Core.Utils.Cloners;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Core.Utils.Collections;
|
||||
|
||||
@@ -214,8 +215,15 @@ public class ProbabilityObjectArray<K, V> : List<ProbabilityObject<K, V?>>
|
||||
*/
|
||||
public class ProbabilityObject<K, V>
|
||||
{
|
||||
public ProbabilityObject()
|
||||
{ }
|
||||
[JsonPropertyName("key")]
|
||||
public K Key { get; }
|
||||
|
||||
[JsonPropertyName("relativeProbability")]
|
||||
public double RelativeProbability { get; }
|
||||
|
||||
[JsonPropertyName("data")]
|
||||
public V? Data { get; }
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user