From b1ac1f5a804b5b5f3fdda7bed4a122f725f7c1ad Mon Sep 17 00:00:00 2001 From: jie65535 Date: Fri, 20 May 2022 18:09:16 +0800 Subject: [PATCH] Show Weights --- .../Forms/FormGachaBannerEditor2.Designer.cs | 230 +++-- .../Forms/FormGachaBannerEditor2.cs | 159 +++- .../Forms/FormGachaBannerEditor2.resx | 831 +++++++++++++++--- .../Game/Gacha/GachaBanner2.cs | 2 +- 4 files changed, 992 insertions(+), 230 deletions(-) diff --git a/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.Designer.cs b/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.Designer.cs index 65aea50..9b88dad 100644 --- a/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.Designer.cs +++ b/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.Designer.cs @@ -29,11 +29,16 @@ namespace GrasscutterTools.Forms /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); + this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormGachaBannerEditor2)); + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea5 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Series series17 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series18 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series19 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series20 = new System.Windows.Forms.DataVisualization.Charting.Series(); this.GrpBannerValues = new System.Windows.Forms.GroupBox(); + this.DTPEndTime = new System.Windows.Forms.DateTimePicker(); + this.DTPBeginTime = new System.Windows.Forms.DateTimePicker(); this.CmbPrefab = new System.Windows.Forms.ComboBox(); this.LblEventChance4Tip = new System.Windows.Forms.Label(); this.LblEventChance5Tip = new System.Windows.Forms.Label(); @@ -59,22 +64,26 @@ namespace GrasscutterTools.Forms this.LblPrefabPath = new System.Windows.Forms.Label(); this.RbCostItem223 = new System.Windows.Forms.RadioButton(); this.GrpPurplePool = new System.Windows.Forms.GroupBox(); + this.ListFallbackItems = new System.Windows.Forms.ListView(); + this.ColFallbackId = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.ColFallbackName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.GrpYellowPool = new System.Windows.Forms.GroupBox(); + this.ListUpItems = new System.Windows.Forms.ListView(); + this.ColUpId = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.ColUpName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.GrpJson = new System.Windows.Forms.GroupBox(); this.BtnGen = new System.Windows.Forms.Button(); this.TxtJson = new System.Windows.Forms.TextBox(); this.BtnParse = new System.Windows.Forms.Button(); - this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.ChartWeights = new System.Windows.Forms.DataVisualization.Charting.Chart(); this.GrpWeights = new System.Windows.Forms.GroupBox(); - this.DTPBeginTime = new System.Windows.Forms.DateTimePicker(); - this.DTPEndTime = new System.Windows.Forms.DateTimePicker(); this.ListBannerWeights = new System.Windows.Forms.ListView(); - this.ListUpItems = new System.Windows.Forms.ListView(); - this.ListFallbackItems = new System.Windows.Forms.ListView(); - this.ColUpId = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.ColUpName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.ColFallbackId = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.ColFallbackName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.ColCount = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.ColWeight = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.MenuCUD = new System.Windows.Forms.ContextMenuStrip(this.components); + this.MenuItemAdd = new System.Windows.Forms.ToolStripMenuItem(); + this.MenuItemRemove = new System.Windows.Forms.ToolStripMenuItem(); + this.MenuItemEdit = new System.Windows.Forms.ToolStripMenuItem(); this.GrpBannerValues.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.NUDEventChance4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDEventChance5)).BeginInit(); @@ -84,8 +93,9 @@ namespace GrasscutterTools.Forms this.GrpPurplePool.SuspendLayout(); this.GrpYellowPool.SuspendLayout(); this.GrpJson.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.ChartWeights)).BeginInit(); this.GrpWeights.SuspendLayout(); + this.MenuCUD.SuspendLayout(); this.SuspendLayout(); // // GrpBannerValues @@ -120,6 +130,20 @@ namespace GrasscutterTools.Forms this.GrpBannerValues.Name = "GrpBannerValues"; this.GrpBannerValues.TabStop = false; // + // DTPEndTime + // + resources.ApplyResources(this.DTPEndTime, "DTPEndTime"); + this.DTPEndTime.MaxDate = new System.DateTime(2038, 1, 19, 0, 0, 0, 0); + this.DTPEndTime.MinDate = new System.DateTime(1970, 1, 1, 0, 0, 0, 0); + this.DTPEndTime.Name = "DTPEndTime"; + // + // DTPBeginTime + // + resources.ApplyResources(this.DTPBeginTime, "DTPBeginTime"); + this.DTPBeginTime.MaxDate = new System.DateTime(2038, 1, 19, 0, 0, 0, 0); + this.DTPBeginTime.MinDate = new System.DateTime(1970, 1, 1, 0, 0, 0, 0); + this.DTPBeginTime.Name = "DTPBeginTime"; + // // CmbPrefab // this.CmbPrefab.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -305,6 +329,34 @@ namespace GrasscutterTools.Forms this.GrpPurplePool.Name = "GrpPurplePool"; this.GrpPurplePool.TabStop = false; // + // ListFallbackItems + // + this.ListFallbackItems.CheckBoxes = true; + this.ListFallbackItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.ColFallbackId, + this.ColFallbackName}); + resources.ApplyResources(this.ListFallbackItems, "ListFallbackItems"); + this.ListFallbackItems.FullRowSelect = true; + this.ListFallbackItems.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] { + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListFallbackItems.Groups"))), + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListFallbackItems.Groups1"))), + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListFallbackItems.Groups2"))), + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListFallbackItems.Groups3"))), + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListFallbackItems.Groups4"))), + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListFallbackItems.Groups5")))}); + this.ListFallbackItems.HideSelection = false; + this.ListFallbackItems.Name = "ListFallbackItems"; + this.ListFallbackItems.UseCompatibleStateImageBehavior = false; + this.ListFallbackItems.View = System.Windows.Forms.View.Details; + // + // ColFallbackId + // + resources.ApplyResources(this.ColFallbackId, "ColFallbackId"); + // + // ColFallbackName + // + resources.ApplyResources(this.ColFallbackName, "ColFallbackName"); + // // GrpYellowPool // resources.ApplyResources(this.GrpYellowPool, "GrpYellowPool"); @@ -312,6 +364,32 @@ namespace GrasscutterTools.Forms this.GrpYellowPool.Name = "GrpYellowPool"; this.GrpYellowPool.TabStop = false; // + // ListUpItems + // + this.ListUpItems.CheckBoxes = true; + this.ListUpItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.ColUpId, + this.ColUpName}); + resources.ApplyResources(this.ListUpItems, "ListUpItems"); + this.ListUpItems.FullRowSelect = true; + this.ListUpItems.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] { + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListUpItems.Groups"))), + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListUpItems.Groups1"))), + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListUpItems.Groups2"))), + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListUpItems.Groups3")))}); + this.ListUpItems.HideSelection = false; + this.ListUpItems.Name = "ListUpItems"; + this.ListUpItems.UseCompatibleStateImageBehavior = false; + this.ListUpItems.View = System.Windows.Forms.View.Details; + // + // ColUpId + // + resources.ApplyResources(this.ColUpId, "ColUpId"); + // + // ColUpName + // + resources.ApplyResources(this.ColUpName, "ColUpName"); + // // GrpJson // resources.ApplyResources(this.GrpJson, "GrpJson"); @@ -340,90 +418,93 @@ namespace GrasscutterTools.Forms this.BtnParse.UseVisualStyleBackColor = true; this.BtnParse.Click += new System.EventHandler(this.BtnParse_Click); // - // chart1 + // ChartWeights // - chartArea1.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea1); - legend1.Name = "Legend1"; - this.chart1.Legends.Add(legend1); - resources.ApplyResources(this.chart1, "chart1"); - this.chart1.Name = "chart1"; - series1.ChartArea = "ChartArea1"; - series1.Legend = "Legend1"; - series1.Name = "Series1"; - this.chart1.Series.Add(series1); + chartArea5.AxisX.MajorGrid.LineColor = System.Drawing.Color.Gainsboro; + chartArea5.AxisY.MajorGrid.LineColor = System.Drawing.Color.Gainsboro; + chartArea5.Name = "ChartArea1"; + this.ChartWeights.ChartAreas.Add(chartArea5); + resources.ApplyResources(this.ChartWeights, "ChartWeights"); + this.ChartWeights.Name = "ChartWeights"; + series17.ChartArea = "ChartArea1"; + series17.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series17.Name = "SeriesWeight5"; + series18.ChartArea = "ChartArea1"; + series18.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series18.Name = "SeriesWeight4"; + series19.ChartArea = "ChartArea1"; + series19.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series19.Name = "SeriesPoolBalanceWeight5"; + series20.ChartArea = "ChartArea1"; + series20.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series20.Name = "SeriesPoolBalanceWeight4"; + this.ChartWeights.Series.Add(series17); + this.ChartWeights.Series.Add(series18); + this.ChartWeights.Series.Add(series19); + this.ChartWeights.Series.Add(series20); // // GrpWeights // resources.ApplyResources(this.GrpWeights, "GrpWeights"); this.GrpWeights.Controls.Add(this.ListBannerWeights); - this.GrpWeights.Controls.Add(this.chart1); + this.GrpWeights.Controls.Add(this.ChartWeights); this.GrpWeights.Name = "GrpWeights"; this.GrpWeights.TabStop = false; // - // DTPBeginTime - // - resources.ApplyResources(this.DTPBeginTime, "DTPBeginTime"); - this.DTPBeginTime.MaxDate = new System.DateTime(2038, 1, 19, 0, 0, 0, 0); - this.DTPBeginTime.MinDate = new System.DateTime(1970, 1, 1, 0, 0, 0, 0); - this.DTPBeginTime.Name = "DTPBeginTime"; - // - // DTPEndTime - // - resources.ApplyResources(this.DTPEndTime, "DTPEndTime"); - this.DTPEndTime.MaxDate = new System.DateTime(2038, 1, 19, 0, 0, 0, 0); - this.DTPEndTime.MinDate = new System.DateTime(1970, 1, 1, 0, 0, 0, 0); - this.DTPEndTime.Name = "DTPEndTime"; - // // ListBannerWeights // + this.ListBannerWeights.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.ColCount, + this.ColWeight}); + this.ListBannerWeights.ContextMenuStrip = this.MenuCUD; + this.ListBannerWeights.FullRowSelect = true; + this.ListBannerWeights.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] { + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListBannerWeights.Groups"))), + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListBannerWeights.Groups1"))), + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListBannerWeights.Groups2"))), + ((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListBannerWeights.Groups3")))}); this.ListBannerWeights.HideSelection = false; resources.ApplyResources(this.ListBannerWeights, "ListBannerWeights"); + this.ListBannerWeights.MultiSelect = false; this.ListBannerWeights.Name = "ListBannerWeights"; this.ListBannerWeights.UseCompatibleStateImageBehavior = false; this.ListBannerWeights.View = System.Windows.Forms.View.Details; + this.ListBannerWeights.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.ListBannerWeights_MouseDoubleClick); // - // ListUpItems + // ColCount // - this.ListUpItems.CheckBoxes = true; - this.ListUpItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.ColUpId, - this.ColUpName}); - resources.ApplyResources(this.ListUpItems, "ListUpItems"); - this.ListUpItems.FullRowSelect = true; - this.ListUpItems.HideSelection = false; - this.ListUpItems.Name = "ListUpItems"; - this.ListUpItems.UseCompatibleStateImageBehavior = false; - this.ListUpItems.View = System.Windows.Forms.View.Details; + resources.ApplyResources(this.ColCount, "ColCount"); // - // ListFallbackItems + // ColWeight // - this.ListFallbackItems.CheckBoxes = true; - this.ListFallbackItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.ColFallbackId, - this.ColFallbackName}); - resources.ApplyResources(this.ListFallbackItems, "ListFallbackItems"); - this.ListFallbackItems.FullRowSelect = true; - this.ListFallbackItems.HideSelection = false; - this.ListFallbackItems.Name = "ListFallbackItems"; - this.ListFallbackItems.UseCompatibleStateImageBehavior = false; - this.ListFallbackItems.View = System.Windows.Forms.View.Details; + resources.ApplyResources(this.ColWeight, "ColWeight"); // - // ColUpId + // MenuCUD // - resources.ApplyResources(this.ColUpId, "ColUpId"); + this.MenuCUD.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.MenuItemEdit, + this.MenuItemAdd, + this.MenuItemRemove}); + this.MenuCUD.Name = "MenuCUD"; + resources.ApplyResources(this.MenuCUD, "MenuCUD"); // - // ColUpName + // MenuItemAdd // - resources.ApplyResources(this.ColUpName, "ColUpName"); + this.MenuItemAdd.Name = "MenuItemAdd"; + resources.ApplyResources(this.MenuItemAdd, "MenuItemAdd"); + this.MenuItemAdd.Click += new System.EventHandler(this.MenuItemAdd_Click); // - // ColFallbackId + // MenuItemRemove // - resources.ApplyResources(this.ColFallbackId, "ColFallbackId"); + this.MenuItemRemove.Name = "MenuItemRemove"; + resources.ApplyResources(this.MenuItemRemove, "MenuItemRemove"); + this.MenuItemRemove.Click += new System.EventHandler(this.MenuItemRemove_Click); // - // ColFallbackName + // MenuItemEdit // - resources.ApplyResources(this.ColFallbackName, "ColFallbackName"); + this.MenuItemEdit.Name = "MenuItemEdit"; + resources.ApplyResources(this.MenuItemEdit, "MenuItemEdit"); + this.MenuItemEdit.Click += new System.EventHandler(this.MenuItemEdit_Click); // // FormGachaBannerEditor2 // @@ -447,8 +528,9 @@ namespace GrasscutterTools.Forms this.GrpYellowPool.ResumeLayout(false); this.GrpJson.ResumeLayout(false); this.GrpJson.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.ChartWeights)).EndInit(); this.GrpWeights.ResumeLayout(false); + this.MenuCUD.ResumeLayout(false); this.ResumeLayout(false); } @@ -485,7 +567,7 @@ namespace GrasscutterTools.Forms private System.Windows.Forms.Label LblEventChance4; private System.Windows.Forms.Label LblEventChance4Tip; private System.Windows.Forms.NumericUpDown NUDEventChance4; - private System.Windows.Forms.DataVisualization.Charting.Chart chart1; + private System.Windows.Forms.DataVisualization.Charting.Chart ChartWeights; private System.Windows.Forms.GroupBox GrpWeights; private System.Windows.Forms.DateTimePicker DTPEndTime; private System.Windows.Forms.DateTimePicker DTPBeginTime; @@ -496,5 +578,11 @@ namespace GrasscutterTools.Forms private System.Windows.Forms.ColumnHeader ColFallbackName; private System.Windows.Forms.ColumnHeader ColUpId; private System.Windows.Forms.ColumnHeader ColUpName; + private System.Windows.Forms.ColumnHeader ColCount; + private System.Windows.Forms.ColumnHeader ColWeight; + private System.Windows.Forms.ContextMenuStrip MenuCUD; + private System.Windows.Forms.ToolStripMenuItem MenuItemEdit; + private System.Windows.Forms.ToolStripMenuItem MenuItemAdd; + private System.Windows.Forms.ToolStripMenuItem MenuItemRemove; } } \ No newline at end of file diff --git a/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.cs b/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.cs index c8927cc..ab9f72e 100644 --- a/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.cs +++ b/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.cs @@ -37,8 +37,6 @@ namespace GrasscutterTools.Forms /// public partial class FormGachaBannerEditor2 : Form { - #region - 初始化 - - public FormGachaBannerEditor2() { InitializeComponent(); @@ -58,17 +56,17 @@ namespace GrasscutterTools.Forms CmbPrefab.Items.AddRange(GameData.GachaBannerPrefabs.Names); } + #region - 卡池 - private void InitCheckedListBoxs() { - var c = new Dictionary(); ListFallbackItems.BeginUpdate(); - var a5 = ListFallbackItems.Groups.Add("a5", "5星角色"); - var a4 = ListFallbackItems.Groups.Add("a4", "4星角色"); - var a3 = ListFallbackItems.Groups.Add("a3", "3星角色"); - var w5 = ListFallbackItems.Groups.Add("w5", "5星武器"); - var w4 = ListFallbackItems.Groups.Add("w4", "4星武器"); - var w3 = ListFallbackItems.Groups.Add("w3", "3星武器"); + var a5 = ListFallbackItems.Groups["GroupA5"]; + var a4 = ListFallbackItems.Groups["GroupA4"]; + var a3 = ListFallbackItems.Groups["GroupA3"]; + var w5 = ListFallbackItems.Groups["GroupW5"]; + var w4 = ListFallbackItems.Groups["GroupW4"]; + var w3 = ListFallbackItems.Groups["GroupW3"]; var avatars = GetAvatarsByColor("yellow") .Select(it => new ListViewItem(new string[] { it.Item1.ToString(), it.Item2 }, a5) { ForeColor = Color.OrangeRed }) .Concat(GetAvatarsByColor("purple") @@ -81,14 +79,15 @@ namespace GrasscutterTools.Forms .Select(it => new ListViewItem(new string[] { it.Item1.ToString(), it.Item2 }, w4) { ForeColor = Color.Purple })) .Concat(GetWeaponsByColor("blue") .Select(it => new ListViewItem(new string[] { it.Item1.ToString(), it.Item2 }, w3) { ForeColor = Color.Blue })); + ListFallbackItems.Items.Clear(); ListFallbackItems.Items.AddRange(avatars.Concat(weapons).ToArray()); ListUpItems.BeginUpdate(); - var ua5 = ListUpItems.Groups.Add("ua5", "5星角色"); - var ua4 = ListUpItems.Groups.Add("ua4", "4星角色"); - var uw5 = ListUpItems.Groups.Add("uw5", "5星武器"); - var uw4 = ListUpItems.Groups.Add("uw4", "4星武器"); + var ua5 = ListUpItems.Groups["GroupUpA5"]; + var ua4 = ListUpItems.Groups["GroupUpA4"]; + var uw5 = ListUpItems.Groups["GroupUpW5"]; + var uw4 = ListUpItems.Groups["GroupUpW4"]; var upAvatars = GetAvatarsByColor("yellow") .Select(it => new ListViewItem(new string[] { it.Item1.ToString(), it.Item2 }, ua5) { ForeColor = Color.OrangeRed }) .Concat(GetAvatarsByColor("purple") @@ -97,6 +96,7 @@ namespace GrasscutterTools.Forms .Select(it => new ListViewItem(new string[] { it.Item1.ToString(), it.Item2 }, uw5) { ForeColor = Color.OrangeRed }) .Concat(GetWeaponsByColor("purple") .Select(it => new ListViewItem(new string[] { it.Item1.ToString(), it.Item2 }, uw4) { ForeColor = Color.Purple })); + ListUpItems.Items.Clear(); ListUpItems.Items.AddRange(upAvatars.Concat(upWeapons).ToArray()); ListFallbackItems.EndUpdate(); @@ -147,9 +147,92 @@ namespace GrasscutterTools.Forms item.Checked = Array.IndexOf(u, int.Parse(item.Text)) >= 0; } - #endregion - 初始化 - + private IEnumerable GetCheckedItems(ListView list, ListViewGroup group) + { + foreach (ListViewItem item in list.CheckedItems) + if (item.Group == group) + yield return int.Parse(item.Text); + } - #region - UI - + #endregion + + #region - 权重 - + + private void InitWeights(GachaBanner2 banner) + { + var w5 = ListBannerWeights.Groups["GroupWeight5"]; + var w4 = ListBannerWeights.Groups["GroupWeight4"]; + var pw5 = ListBannerWeights.Groups["GroupPoolWeight5"]; + var pw4 = ListBannerWeights.Groups["GroupPoolWeight4"]; + var t = SelectWeights(banner.Weights5).Select(it => new ListViewItem(it, w5)) + .Concat(SelectWeights(banner.Weights4).Select(it => new ListViewItem(it, w4))) + .Concat(SelectWeights(banner.PoolBalanceWeights5).Select(it => new ListViewItem(it, pw5))) + .Concat(SelectWeights(banner.PoolBalanceWeights4).Select(it => new ListViewItem(it, pw4))); + ListBannerWeights.BeginUpdate(); + ListBannerWeights.Items.Clear(); + ListBannerWeights.Items.AddRange(t.ToArray()); + ListBannerWeights.EndUpdate(); + } + + private IEnumerable SelectWeights(int[,] weights) + { + for (int i = 0; i < weights.GetLength(0); i++) + yield return new string[] { weights[i, 0].ToString(), weights[i, 1].ToString() }; + } + + private int[,] GetWeights(ListViewGroup group) + { + var weights = new int[group.Items.Count, 2]; + int i = 0; + foreach (ListViewItem item in group.Items) + { + weights[i, 0] = int.Parse(item.SubItems[0].Text); + weights[i, 1] = int.Parse(item.SubItems[1].Text); + i++; + } + return weights; + } + + private void ListBannerWeights_MouseDoubleClick(object sender, MouseEventArgs e) + { + if (ListBannerWeights.SelectedItems.Count != 1) + return; + MessageBox.Show("TODO"); + } + + private void MenuItemEdit_Click(object sender, EventArgs e) + { + if (ListBannerWeights.SelectedItems.Count != 1) + { + MessageBox.Show("请先选择目标", Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + MessageBox.Show("TODO"); + } + + private void MenuItemAdd_Click(object sender, EventArgs e) + { + if (ListBannerWeights.SelectedItems.Count != 1) + { + MessageBox.Show("请先选择目标", Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + MessageBox.Show("TODO"); + } + + private void MenuItemRemove_Click(object sender, EventArgs e) + { + if (ListBannerWeights.SelectedItems.Count != 1) + { + MessageBox.Show("请先选择目标", Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + MessageBox.Show("TODO"); + } + + #endregion + + #region - 序列化 - private void ShowBanner(GachaBanner2 banner) { @@ -170,6 +253,7 @@ namespace GrasscutterTools.Forms NUDEventChance5.Value = banner.EventChance5; NUDEventChance4.Value = banner.EventChance4; InitItems(banner); + InitWeights(banner); } catch (Exception ex) { @@ -195,26 +279,34 @@ namespace GrasscutterTools.Forms var prefabId = GameData.GachaBannerPrefabs.Ids[CmbPrefab.SelectedIndex]; var banner = new GachaBanner2 { - GachaType = (int)NUDGachaType.Value, - ScheduleId = (int)NUDScheduleId.Value, - BannerType = (BannerType)CmbBannerType.SelectedIndex, - PrefabPath = $"GachaShowPanel_A{prefabId:000}", - PreviewPrefabPath = $"UI_Tab_GachaShowPanel_A{prefabId:000}", - TitlePath = $"UI_GACHA_SHOW_PANEL_A{prefabId:000}_TITLE", - CostItem = RbCostItem224.Checked ? 224 : 223, - BeginTime = (int)new DateTimeOffset(DTPBeginTime.Value).ToUnixTimeSeconds(), - EndTime = (int)new DateTimeOffset(DTPEndTime.Value).ToUnixTimeSeconds(), - SortId = (int)NUDSortId.Value, - EventChance5 = (int)NUDEventChance5.Value, - EventChance4 = (int)NUDEventChance4.Value, - }; + GachaType = (int)NUDGachaType.Value, + ScheduleId = (int)NUDScheduleId.Value, + BannerType = (BannerType)CmbBannerType.SelectedIndex, + PrefabPath = $"GachaShowPanel_A{prefabId:000}", + PreviewPrefabPath = $"UI_Tab_GachaShowPanel_A{prefabId:000}", + TitlePath = $"UI_GACHA_SHOW_PANEL_A{prefabId:000}_TITLE", + CostItem = RbCostItem224.Checked ? 224 : 223, + BeginTime = (int)new DateTimeOffset(DTPBeginTime.Value).ToUnixTimeSeconds(), + EndTime = (int)new DateTimeOffset(DTPEndTime.Value).ToUnixTimeSeconds(), + SortId = (int)NUDSortId.Value, + EventChance5 = (int)NUDEventChance5.Value, + EventChance4 = (int)NUDEventChance4.Value, + FallbackItems3 = GetCheckedItems(ListFallbackItems, ListFallbackItems.Groups["GroupA3"]) + .Concat(GetCheckedItems(ListFallbackItems, ListFallbackItems.Groups["GroupW3"])) + .ToArray(), + FallbackItems4Pool1 = GetCheckedItems(ListFallbackItems, ListFallbackItems.Groups["GroupA4"]).ToArray(), + FallbackItems4Pool2 = GetCheckedItems(ListFallbackItems, ListFallbackItems.Groups["GroupW4"]).ToArray(), + FallbackItems5Pool1 = GetCheckedItems(ListFallbackItems, ListFallbackItems.Groups["GroupA5"]).ToArray(), + FallbackItems5Pool2 = GetCheckedItems(ListFallbackItems, ListFallbackItems.Groups["GroupW5"]).ToArray(), + + Weights4 = GetWeights(ListBannerWeights.Groups["GroupWeight4"]), + Weights5 = GetWeights(ListBannerWeights.Groups["GroupWeight5"]), + PoolBalanceWeights4 = GetWeights(ListBannerWeights.Groups["GroupPoolWeight4"]), + PoolBalanceWeights5 = GetWeights(ListBannerWeights.Groups["GroupPoolWeight5"]), + }; return banner; } - #endregion - UI - - - #region - 事件 - - private void BtnGen_Click(object sender, EventArgs e) { var banner = ParseBanner(); @@ -236,6 +328,7 @@ namespace GrasscutterTools.Forms } } - #endregion - 事件 - + #endregion + } } \ No newline at end of file diff --git a/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.resx b/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.resx index be90562..c6168c3 100644 --- a/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.resx +++ b/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.resx @@ -117,14 +117,350 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + DTPEndTime + + + System.Windows.Forms.DateTimePicker, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 0 + + + DTPBeginTime + + + System.Windows.Forms.DateTimePicker, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 1 + + + CmbPrefab + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 2 + + + LblEventChance4Tip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 3 + + + LblEventChance5Tip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 4 + + + NUDEventChance4 + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 5 + + + NUDEventChance5 + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 6 + + + LblGachaType + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 7 + + + LblEventChance4 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 8 + + + LblEventChance5 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 9 + + + LblSortId + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 10 + + + NUDGachaType + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 11 + + + NUDSortId + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 12 + + + LblGachaTypeTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 13 + + + LblEndTime + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 14 + + + LblScheduleId + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 15 + + + LblBeginTime + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 16 + + + NUDScheduleId + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 17 + + + LblScheduleIdTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 18 + + + CmbBannerType + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 19 + + + LblSortIdTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 20 + + + LblBannerType + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 21 + + + RbCostItem224 + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 22 + + + LblCostItem + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 23 + + + LblPrefabPath + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 24 + + + RbCostItem223 + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpBannerValues + + + 25 + + + 12, 12 + + + 440, 268 + + + + 44 + + + 卡池参数 + + + GrpBannerValues + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + 302, 173 110, 23 - 7 @@ -783,57 +1119,9 @@ 25 - - 12, 12 - - - 440, 268 - - - 44 - - - 卡池参数 - - - GrpBannerValues - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - Top, Bottom, Left, Right - - ID - - - 65 - - - Name - - - 110 - - - Fill - - - 3, 19 - - - 204, 283 - - - 0 - ListFallbackItems @@ -868,35 +1156,107 @@ $this - 2 + 3 + + + Fill + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACJTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0dyb3VwBAAAAAZIZWFkZXIPSGVhZGVyQWxpZ25tZW50A1Rh + ZwROYW1lAQQCAShTeXN0ZW0uV2luZG93cy5Gb3Jtcy5Ib3Jpem9udGFsQWxpZ25tZW50AgAAAAIAAAAG + AwAAAAo15pif6KeS6ImyBfz///8oU3lzdGVtLldpbmRvd3MuRm9ybXMuSG9yaXpvbnRhbEFsaWdubWVu + dAEAAAAHdmFsdWVfXwAIAgAAAAAAAAAKBgUAAAAHR3JvdXBBNQs= + + + + + AAEAAAD/////AQAA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y5Gb3Jtcy5Ib3Jpem9udGFsQWxpZ25tZW50AgAAAAIAAAAG + AwAAAAoz5pif6KeS6ImyBfz///8oU3lzdGVtLldpbmRvd3MuRm9ybXMuSG9yaXpvbnRhbEFsaWdubWVu + dAEAAAAHdmFsdWVfXwAIAgAAAAAAAAAKBgUAAAAHR3JvdXBXMws= + + + + 3, 19 + + + 204, 283 + + + 0 + + + ListFallbackItems + + + System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpPurplePool + + + 0 + + + ID + + + 65 + + + Name + + + 110 Top, Left, Right - - ID - - - 65 - - - Name - - - 110 - - - Fill - - - 3, 19 - - - 204, 208 - - - 0 - ListUpItems @@ -931,11 +1291,147 @@ $this - 3 + 4 + + + Fill + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACJTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0dyb3VwBAAAAAZIZWFkZXIPSGVhZGVyQWxpZ25tZW50A1Rh + ZwROYW1lAQQCAShTeXN0ZW0uV2luZG93cy5Gb3Jtcy5Ib3Jpem9udGFsQWxpZ25tZW50AgAAAAIAAAAG + AwAAAAo15pif6KeS6ImyBfz///8oU3lzdGVtLldpbmRvd3MuRm9ybXMuSG9yaXpvbnRhbEFsaWdubWVu + dAEAAAAHdmFsdWVfXwAIAgAAAAAAAAAKBgUAAAAJR3JvdXBVcEE1Cw== + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACJTeXN0 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3Jtcy5Ib3Jpem9udGFsQWxpZ25tZW50AgAAAAIAAAAG + AwAAAAo05pif5q2m5ZmoBfz///8oU3lzdGVtLldpbmRvd3MuRm9ybXMuSG9yaXpvbnRhbEFsaWdubWVu + dAEAAAAHdmFsdWVfXwAIAgAAAAAAAAAKBgUAAAAJR3JvdXBVcFc0Cw== + + + + 3, 19 + + + 204, 208 + + + 0 + + + ListUpItems + + + System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpYellowPool + + + 0 + + + ID + + + 65 + + + Name + + + 110 Top, Bottom, Right + + BtnGen + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpJson + + + 0 + + + TxtJson + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpJson + + + 1 + + + BtnParse + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrpJson + + + 2 + + + 674, 12 + + + 300, 541 + + + 51 + + + Json + + + GrpJson + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + Bottom, Left @@ -972,6 +1468,9 @@ True + + Vertical + 288, 487 @@ -1017,62 +1516,114 @@ 2 - - 674, 12 + + 162, 22 - - 300, 541 + + 272, 239 - - 51 - - - Json - - - GrpJson - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - - - 165, 22 - - - 269, 239 - - + 91 - - chart1 + + Weights - - chart1 + + ChartWeights - + System.Windows.Forms.DataVisualization.Charting.Chart, System.Windows.Forms.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 - + GrpWeights - + 1 Top, Bottom, Left + + 次数 + + + 权重 + + + 17, 17 + + + 180, 22 + + + 编辑点 + + + 180, 22 + + + 添加点 + + + 180, 22 + + + 移除点 + + + 181, 92 + + + MenuCUD + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACJTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0dyb3VwBAAAAAZIZWFkZXIPSGVhZGVyQWxpZ25tZW50A1Rh + ZwROYW1lAQQCAShTeXN0ZW0uV2luZG93cy5Gb3Jtcy5Ib3Jpem9udGFsQWxpZ25tZW50AgAAAAIAAAAG + AwAAAAo15pif5p2D6YeNBfz///8oU3lzdGVtLldpbmRvd3MuRm9ybXMuSG9yaXpvbnRhbEFsaWdubWVu + dAEAAAAHdmFsdWVfXwAIAgAAAAAAAAAKBgUAAAAMR3JvdXBXZWlnaHQ1Cw== + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACJTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0dyb3VwBAAAAAZIZWFkZXIPSGVhZGVyQWxpZ25tZW50A1Rh + ZwROYW1lAQQCAShTeXN0ZW0uV2luZG93cy5Gb3Jtcy5Ib3Jpem9udGFsQWxpZ25tZW50AgAAAAIAAAAG + AwAAAAo05pif5p2D6YeNBfz///8oU3lzdGVtLldpbmRvd3MuRm9ybXMuSG9yaXpvbnRhbEFs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 @@ -1111,7 +1662,7 @@ $this - 0 + 1 True @@ -1134,18 +1685,6 @@ 卡池编辑器 - - ColUpId - - - System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ColUpName - - - System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - ColFallbackId @@ -1158,6 +1697,48 @@ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ColUpId + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ColUpName + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ColCount + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ColWeight + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + MenuItemAdd + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + MenuItemRemove + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + MenuItemEdit + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + FormGachaBannerEditor2 diff --git a/Source/GrasscutterTools/Game/Gacha/GachaBanner2.cs b/Source/GrasscutterTools/Game/Gacha/GachaBanner2.cs index 4a84d69..4381e79 100644 --- a/Source/GrasscutterTools/Game/Gacha/GachaBanner2.cs +++ b/Source/GrasscutterTools/Game/Gacha/GachaBanner2.cs @@ -66,7 +66,7 @@ namespace GrasscutterTools.Game.Gacha /// (提示:请不要随便修改祈愿道具除了蓝球和粉球,有可能会引发bug,比如修改成摩拉抽卡可能导致卡住) /// [JsonProperty("costItem")] - public int CostItem { get; set; } = 223; + public int CostItem { get; set; } = 224; /// /// 开始时间(Unix时间戳)