mirror of
https://github.com/rafi1212122/BLHX.Server.git
synced 2025-12-13 06:54:51 +01:00
battle, ship boom boom
This commit is contained in:
@@ -16,6 +16,9 @@ public static class Data
|
||||
[LoadData("ship_skin_template.json", LoadDataType.ShareCfg)]
|
||||
public static Dictionary<int, ShipSkinTemplate> ShipSkinTemplate { get; private set; } = null!;
|
||||
|
||||
[LoadData("battle_cost_template.json", LoadDataType.ShareCfg)]
|
||||
public static Dictionary<uint, BattleCostTemplate> BattleCostTemplate { get; private set; } = null!;
|
||||
|
||||
[LoadData("chapter_template.json", LoadDataType.ShareCfgData)]
|
||||
public static Dictionary<int, ChapterTemplate> ChapterTemplate { get; private set; } = null!;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Text.Json;
|
||||
using BLHX.Server.Common.Utils;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace BLHX.Server.Common.Data;
|
||||
@@ -19,7 +20,7 @@ public static partial class JSON
|
||||
}
|
||||
|
||||
string text = File.ReadAllText(path);
|
||||
if (typeof(T).IsGenericType && typeof(T).GetGenericTypeDefinition() == typeof(Dictionary<,>) && typeof(T).GetGenericArguments()[0] == typeof(int))
|
||||
if (typeof(T).IsGenericType && typeof(T).GetGenericTypeDefinition() == typeof(Dictionary<,>) && typeof(T).GetGenericArguments()[0].IsTypeNumeric())
|
||||
{
|
||||
text = DictKeyAll().Replace(text, "");
|
||||
}
|
||||
|
||||
34
BLHX.Server.Common/Data/Model/BattleCostTemplate.cs
Normal file
34
BLHX.Server.Common/Data/Model/BattleCostTemplate.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BLHX.Server.Common.Data
|
||||
{
|
||||
public class BattleCostTemplate
|
||||
{
|
||||
[JsonPropertyName("attack_count")]
|
||||
public uint AttackCount { get; set; }
|
||||
|
||||
[JsonPropertyName("cat_exp_award")]
|
||||
public uint CatExpAward { get; set; }
|
||||
|
||||
[JsonPropertyName("end_sink_cost")]
|
||||
public uint EndSinkCost { get; set; }
|
||||
|
||||
[JsonPropertyName("enter_energy_cost")]
|
||||
public uint EnterEnergyCost { get; set; }
|
||||
|
||||
[JsonPropertyName("global_buff_effected")]
|
||||
public uint GlobalBuffEffected { get; set; }
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public uint Id { get; set; }
|
||||
|
||||
[JsonPropertyName("oil_cost")]
|
||||
public uint OilCost { get; set; }
|
||||
|
||||
[JsonPropertyName("ship_exp_award")]
|
||||
public uint ShipExpAward { get; set; }
|
||||
|
||||
[JsonPropertyName("user_exp_award")]
|
||||
public uint UserExpAward { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user