battle, ship boom boom

This commit is contained in:
rfi
2024-02-26 11:03:56 +07:00
parent 3046a7d20e
commit a6f4897c29
8 changed files with 424 additions and 4 deletions

View File

@@ -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, "");
}