mirror of
https://github.com/MikuLeaks/MikuSB.git
synced 2026-06-04 15:03:57 +00:00
add support card giveall command
NOTE: need to delete old database because im moving support card to different column
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user