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

@@ -53,6 +53,21 @@ public class PacketNtfCallScript : BasePacket
SetData(proto);
}
public PacketNtfCallScript(List<GameSupportCardInfo> cards) : base(CmdIds.NtfScript)
{
var proto = new NtfCallScript
{
Api = "",
Arg = "{}",
ExtraSync = new NtfSyncPlayer
{
Items = { cards.Select(x => x.ToProto()) }
}
};
SetData(proto);
}
public PacketNtfCallScript(InventoryData inventory) : base(CmdIds.NtfScript)
{
var proto = new NtfCallScript
@@ -65,6 +80,7 @@ public class PacketNtfCallScript : BasePacket
foreach (var item in inventory.Items.Values) extraSync.Items.Add(item.ToProto());
foreach (var skin in inventory.Skins.Values) extraSync.Items.Add(skin.ToProto());
foreach (var weapon in inventory.Weapons.Values) extraSync.Items.Add(weapon.ToProto());
foreach (var supportCard in inventory.SupportCards.Values) extraSync.Items.Add(supportCard.ToProto());
proto.ExtraSync = extraSync;
SetData(proto);
}