add support card giveall command

NOTE: need to delete old database because im moving support card to different column
This commit is contained in:
Naruse
2026-04-28 23:08:23 +08:00
parent 069ee6aa2a
commit 5f0de1a9f0
8 changed files with 127 additions and 27 deletions

View File

@@ -17,6 +17,9 @@ public class InventoryData : BaseDatabaseDataHelper
[SugarColumn(IsJson = true)]
public Dictionary<uint, GameSkinInfo> Skins { get; set; } = []; // Key: UniqueId
[SugarColumn(IsJson = true)]
public Dictionary<uint, GameSupportCardInfo> SupportCards { get; set; } = []; // Key: UniqueId
}
public class BaseGameItemInfo
@@ -72,7 +75,8 @@ public class GameWeaponInfo : GrowableItemInfo
};
return proto;
}
}public class GameSkinInfo : BaseGameItemInfo
}
public class GameSkinInfo : BaseGameItemInfo
{
public uint SkinType { get; set; }
public override Item ToProto()
@@ -87,4 +91,27 @@ public class GameWeaponInfo : GrowableItemInfo
proto.Slots[11] = SkinType;
return proto;
}
}
public class GameSupportCardInfo : BaseGameItemInfo
{
public uint AffixId { get; set; }
public override Item ToProto()
{
var proto = new Item
{
Id = UniqueId,
Template = TemplateId,
Count = ItemCount,
Flag = (uint)Flag,
Enhance = new Enhance
{
Level = Level,
Exp = Exp
}
};
proto.Slots[1] = AffixId;
return proto;
}
}

View File

@@ -35,6 +35,8 @@ public class ServerTextCHS
/// </summary>
public class WordTextCHS
{
public string SupportCard => "支援卡";
public string Weapon => "武器";
public string Rank => "星魂";
public string Avatar => "角色";
public string Material => "材料";
@@ -232,11 +234,12 @@ public class GirlTextCHS
/// </summary>
public class GiveAllTextCHS
{
public string Desc => "给玩家所有物品\n" +
"备注: -1 表全部";
public string Usage => "用法: /giveall weapon <detail/-1> -p<particular> -l<level>";
public string WeaponNotFound => "找不到武器!";
public string WeaponAdded => "已添加 {0} 把武器给玩家";
public string Desc => "给玩家所有物品\n" +
"注意:-1 表全部";
public string Usage => "用法/giveall weapon <detail/-1> -p<特定> -l<等级>\n" +
"用法:/giveall card <detail/-1> -p<特定> -l<等级>";
public string NotFound => "未找到 {0}";
public string GiveAllItems => "已向玩家添加 {0} 个 {1}";
}
#endregion

View File

@@ -35,6 +35,8 @@ public class ServerTextCHT
/// </summary>
public class WordTextCHT
{
public string SupportCard => "支援卡";
public string Weapon => "武器";
public string Rank => "星魂";
public string Avatar => "角色";
public string Material => "材料";
@@ -232,11 +234,12 @@ public class GirlTextCHT
/// </summary>
public class GiveAllTextCHT
{
public string Desc => "給玩家所有物品\n" +
"備註: -1 表全部";
public string Usage => "用法: /giveall weapon <detail/-1> -p<particular> -l<level>";
public string WeaponNotFound => "找不到武器!";
public string WeaponAdded => "已添加 {0} 把武器給玩家";
public string Desc => "給玩家所有物品\n" +
"注意:-1 表全部";
public string Usage => "用法/giveall weapon <detail/-1> -p<特定> -l<等級>\n" +
"用法:/giveall card <detail/-1> -p<特定> -l<等級>";
public string NotFound => "未找到 {0}";
public string GiveAllItems => "已向玩家添加 {0} 個 {1}";
}
#endregion

View File

@@ -38,7 +38,7 @@ public class WordTextEN
public string Star => "Star";
public string Valk => "Valkyrie";
public string Material => "Material";
public string Stigmata => "Stigmata";
public string SupportCard => "Support Card";
public string Weapon => "Weapon";
public string Banner => "Gacha";
public string Activity => "Activity";
@@ -203,9 +203,10 @@ 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>";
public string WeaponNotFound => "Weapon not found!";
public string WeaponAdded => "Added {0} weapon(s) to player!";
public string Usage => "Usage: /giveall weapon <detail/-1> -p<particular> -l<level>\n" +
"Usage: /giveall card <detail/-1> -p<particular> -l<level>";
public string NotFound => "{0} not found!";
public string GiveAllItems => "Added {0} {1} to player!";
}
#endregion