feat(svc): IArenaTwoPickService + response DTOs + GetTopAsync
6 response DTOs, IArenaTwoPickService interface + ArenaTwoPickException, ArenaTwoPickService skeleton with GetTopAsync implemented and stubs for Tasks 13-15. 3 NUnit tests for GetTopAsync all pass. DI: AddScoped.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses.ArenaTwoPick;
|
||||
|
||||
/// <summary>
|
||||
/// What the battle controller needs from the service to build the standard battle-finish
|
||||
/// envelope (class XP delta + post-state, spot points before/add/after, battle_result echo).
|
||||
/// Achieved-info is built by the controller from IMissionAssembler.
|
||||
/// </summary>
|
||||
public class BattleFinishResultDto
|
||||
{
|
||||
public int BattleResult { get; set; }
|
||||
public int GetClassExperience { get; set; }
|
||||
public int ClassExperience { get; set; }
|
||||
public int ClassLevel { get; set; }
|
||||
public int BeforeSpotPoint { get; set; }
|
||||
public int AddSpotPoint { get; set; }
|
||||
public int AfterSpotPoint { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common.ArenaTwoPick;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses.ArenaTwoPick;
|
||||
|
||||
[MessagePackObject]
|
||||
public class CardChooseResponseDto
|
||||
{
|
||||
[JsonPropertyName("deck_info")] [Key("deck_info")]
|
||||
public DeckInfoDto DeckInfo { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("candidate_card_list")] [Key("candidate_card_list")]
|
||||
public List<CandidatePairDto>? CandidateCardList { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common.ArenaTwoPick;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses.ArenaTwoPick;
|
||||
|
||||
[MessagePackObject]
|
||||
public class ClassChooseResponseDto
|
||||
{
|
||||
[JsonPropertyName("class_info")] [Key("class_info")]
|
||||
public ClassInfoDto ClassInfo { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("deck_info")] [Key("deck_info")]
|
||||
public DeckInfoDto DeckInfo { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("candidate_card_list")] [Key("candidate_card_list")]
|
||||
public List<CandidatePairDto> CandidateCardList { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common.ArenaTwoPick;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses.ArenaTwoPick;
|
||||
|
||||
[MessagePackObject]
|
||||
public class EntryResponseDto
|
||||
{
|
||||
[JsonPropertyName("entry_info")] [Key("entry_info")]
|
||||
public EntryInfoDto EntryInfo { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("reward_list")] [Key("reward_list")]
|
||||
public List<RewardEntryDto> RewardList { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("candidate_class_ids")] [Key("candidate_class_ids")]
|
||||
public List<int> CandidateClassIds { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("battle_results")] [Key("battle_results")]
|
||||
public BattleResultsDto BattleResults { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common.ArenaTwoPick;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses.ArenaTwoPick;
|
||||
|
||||
[MessagePackObject]
|
||||
public class FinishResponseDto
|
||||
{
|
||||
/// <summary>Per-grant deltas — drives "+N received" popup.</summary>
|
||||
[JsonPropertyName("rewards")] [Key("rewards")]
|
||||
public List<RewardEntryDto> Rewards { get; set; } = new();
|
||||
|
||||
/// <summary>Post-state totals — drives PlayerStaticData.UpdateHaveUserGoodsNumByJsonData.</summary>
|
||||
[JsonPropertyName("reward_list")] [Key("reward_list")]
|
||||
public List<RewardEntryDto> RewardList { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common.ArenaTwoPick;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses.ArenaTwoPick;
|
||||
|
||||
[MessagePackObject]
|
||||
public class TopResponseDto
|
||||
{
|
||||
[JsonPropertyName("entry_info")] [JsonIgnore(Condition = JsonIgnoreCondition.Never)] [Key("entry_info")]
|
||||
public EntryInfoDto? EntryInfo { get; set; }
|
||||
|
||||
[JsonPropertyName("battle_results")] [Key("battle_results")]
|
||||
public BattleResultsDto? BattleResults { get; set; }
|
||||
|
||||
[JsonPropertyName("class_info")] [Key("class_info")]
|
||||
public ClassInfoDto? ClassInfo { get; set; }
|
||||
|
||||
[JsonPropertyName("deck_info")] [Key("deck_info")]
|
||||
public DeckInfoDto? DeckInfo { get; set; }
|
||||
|
||||
[JsonPropertyName("leader_skin_id")] [JsonConverter(typeof(StringifiedLongConverter))] [Key("leader_skin_id")]
|
||||
public long? LeaderSkinId { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user