add weapon skin & command for it

This commit is contained in:
Naruse
2026-04-28 23:48:14 +08:00
parent 5f0de1a9f0
commit 8d6e0d7638
9 changed files with 138 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace MikuSB.Data.Excel;
[ResourceEntity("weapon_skin.json")]
public class WeaponSkinExcel : ExcelResource
{
public uint Genre { get; set; }
public uint Detail { get; set; }
public uint Particular { get; set; }
public uint Level { get; set; }
public string I18n { get; set; } = "";
public override uint GetId()
{
return (uint)I18n.GetHashCode();
}
public override void Loaded()
{
GameData.WeaponSkinData.Add(GetId(), this);
}
}

View File

@@ -19,6 +19,7 @@ public static class GameData
public static Dictionary<uint, SpineExcel> SpineData { get; private set; } = [];
public static Dictionary<uint, NodeConditionExcel> NodeConditionData { get; private set; } = [];
public static List<SupportCardExcel> SupportCardData { get; private set; } = [];
public static Dictionary<uint, WeaponSkinExcel> WeaponSkinData { get; private set; } = [];
}
public static class GameResourceTemplateId

View File

@@ -23,6 +23,7 @@ public class CharacterInfo
public int Trust { get; set; }
public uint WeaponUniqueId { get; set; }
public uint SkinId { get; set; }
public uint WeaponSkinId { get; set; }
public ItemFlagEnum Flag { get; set; } = ItemFlagEnum.FLAG_READED;
public uint Expiration { get; set; }
[SugarColumn(IsJson = true)] public List<uint> UnlockedSkin { get; set; } = [];
@@ -57,6 +58,7 @@ public class CharacterInfo
proto.Slots[4] = WeaponUniqueId;
proto.Slots[5] = SkinId;
proto.Slots[6] = WeaponSkinId;
foreach (var (slot, uid) in SupportSlots)
proto.Slots[slot] = uid;

View File

@@ -35,6 +35,7 @@ public class ServerTextCHS
/// </summary>
public class WordTextCHS
{
public string WeaponSkin => "武器皮肤";
public string SupportCard => "支援卡";
public string Weapon => "武器";
public string Rank => "星魂";
@@ -236,8 +237,9 @@ public class GiveAllTextCHS
{
public string Desc => "给予玩家所有物品\n" +
"注意:-1 表示全部";
public string Usage => "用法:/giveall weapon <detail/-1> -p<特定> -l<等>\n" +
"用法:/giveall card <detail/-1> -p<特定> -l<等级>";
public string Usage => "用法:/giveall weapon <detail/-1> -p<特定> -l<等>\n" +
"用法:/giveall weaponskin <detail/-1> -p<特定>\n" +
"用法:/giveall card <detail/-1> -p<特定> -l<等級>";
public string NotFound => "未找到 {0}";
public string GiveAllItems => "已向玩家添加 {0} 个 {1}";
}

View File

@@ -35,6 +35,7 @@ public class ServerTextCHT
/// </summary>
public class WordTextCHT
{
public string WeaponSkin => "武器外觀";
public string SupportCard => "支援卡";
public string Weapon => "武器";
public string Rank => "星魂";
@@ -237,6 +238,7 @@ public class GiveAllTextCHT
public string Desc => "給予玩家所有物品\n" +
"注意:-1 表示全部";
public string Usage => "用法:/giveall weapon <detail/-1> -p<特定> -l<等級>\n" +
"用法:/giveall weaponskin <detail/-1> -p<特定>\n" +
"用法:/giveall card <detail/-1> -p<特定> -l<等級>";
public string NotFound => "未找到 {0}";
public string GiveAllItems => "已向玩家添加 {0} 個 {1}";

View File

@@ -35,7 +35,7 @@ public class ServerTextEN
/// </summary>
public class WordTextEN
{
public string Star => "Star";
public string WeaponSkin => "Weapon Skin";
public string Valk => "Valkyrie";
public string Material => "Material";
public string SupportCard => "Support Card";
@@ -204,6 +204,7 @@ public class GiveAllTextEN
public string Desc => "Give all items to player\n"+
"Note: -1 means all";
public string Usage => "Usage: /giveall weapon <detail/-1> -p<particular> -l<level>\n" +
"Usage: /giveall weaponskin <detail/-1> -p<particular>\n" +
"Usage: /giveall card <detail/-1> -p<particular> -l<level>";
public string NotFound => "{0} not found!";
public string GiveAllItems => "Added {0} {1} to player!";