Show Items

This commit is contained in:
2022-05-20 16:47:10 +08:00
parent 26faaf001e
commit c94bb216ac
4 changed files with 523 additions and 837 deletions

View File

@ -29,15 +29,18 @@ namespace GrasscutterTools.Forms
/// </summary> /// </summary>
private void InitializeComponent() 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();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormGachaBannerEditor2)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormGachaBannerEditor2));
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend3 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
this.GrpBannerValues = new System.Windows.Forms.GroupBox(); this.GrpBannerValues = new System.Windows.Forms.GroupBox();
this.CmbPrefab = new System.Windows.Forms.ComboBox(); this.CmbPrefab = new System.Windows.Forms.ComboBox();
this.LblEventChance4Tip = new System.Windows.Forms.Label();
this.LblEventChance5Tip = new System.Windows.Forms.Label(); this.LblEventChance5Tip = new System.Windows.Forms.Label();
this.NUDEventChance4 = new System.Windows.Forms.NumericUpDown();
this.NUDEventChance5 = new System.Windows.Forms.NumericUpDown(); this.NUDEventChance5 = new System.Windows.Forms.NumericUpDown();
this.LblGachaType = new System.Windows.Forms.Label(); this.LblGachaType = new System.Windows.Forms.Label();
this.LblEventChance4 = new System.Windows.Forms.Label();
this.LblEventChance5 = new System.Windows.Forms.Label(); this.LblEventChance5 = new System.Windows.Forms.Label();
this.LblSortId = new System.Windows.Forms.Label(); this.LblSortId = new System.Windows.Forms.Label();
this.NUDGachaType = new System.Windows.Forms.NumericUpDown(); this.NUDGachaType = new System.Windows.Forms.NumericUpDown();
@ -47,9 +50,7 @@ namespace GrasscutterTools.Forms
this.LblScheduleId = new System.Windows.Forms.Label(); this.LblScheduleId = new System.Windows.Forms.Label();
this.LblBeginTime = new System.Windows.Forms.Label(); this.LblBeginTime = new System.Windows.Forms.Label();
this.NUDScheduleId = new System.Windows.Forms.NumericUpDown(); this.NUDScheduleId = new System.Windows.Forms.NumericUpDown();
this.NUDEndTime = new System.Windows.Forms.NumericUpDown();
this.LblScheduleIdTip = new System.Windows.Forms.Label(); this.LblScheduleIdTip = new System.Windows.Forms.Label();
this.NUDBeginTime = new System.Windows.Forms.NumericUpDown();
this.CmbBannerType = new System.Windows.Forms.ComboBox(); this.CmbBannerType = new System.Windows.Forms.ComboBox();
this.LblSortIdTip = new System.Windows.Forms.Label(); this.LblSortIdTip = new System.Windows.Forms.Label();
this.LblBannerType = new System.Windows.Forms.Label(); this.LblBannerType = new System.Windows.Forms.Label();
@ -63,34 +64,34 @@ namespace GrasscutterTools.Forms
this.BtnGen = new System.Windows.Forms.Button(); this.BtnGen = new System.Windows.Forms.Button();
this.TxtJson = new System.Windows.Forms.TextBox(); this.TxtJson = new System.Windows.Forms.TextBox();
this.BtnParse = new System.Windows.Forms.Button(); this.BtnParse = new System.Windows.Forms.Button();
this.treeView1 = new System.Windows.Forms.TreeView();
this.treeView2 = new System.Windows.Forms.TreeView();
this.LblEventChance4 = new System.Windows.Forms.Label();
this.NUDEventChance4 = new System.Windows.Forms.NumericUpDown();
this.LblEventChance4Tip = new System.Windows.Forms.Label();
this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.GrpWeights = new System.Windows.Forms.GroupBox(); 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.GrpBannerValues.SuspendLayout(); this.GrpBannerValues.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NUDEventChance4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUDEventChance5)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDEventChance5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUDGachaType)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDGachaType)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUDSortId)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDSortId)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUDScheduleId)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDScheduleId)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUDEndTime)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUDBeginTime)).BeginInit();
this.GrpPurplePool.SuspendLayout(); this.GrpPurplePool.SuspendLayout();
this.GrpYellowPool.SuspendLayout(); this.GrpYellowPool.SuspendLayout();
this.GrpJson.SuspendLayout(); this.GrpJson.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NUDEventChance4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
this.tabControl1.SuspendLayout();
this.GrpWeights.SuspendLayout(); this.GrpWeights.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// GrpBannerValues // GrpBannerValues
// //
this.GrpBannerValues.Controls.Add(this.DTPEndTime);
this.GrpBannerValues.Controls.Add(this.DTPBeginTime);
this.GrpBannerValues.Controls.Add(this.CmbPrefab); this.GrpBannerValues.Controls.Add(this.CmbPrefab);
this.GrpBannerValues.Controls.Add(this.LblEventChance4Tip); this.GrpBannerValues.Controls.Add(this.LblEventChance4Tip);
this.GrpBannerValues.Controls.Add(this.LblEventChance5Tip); this.GrpBannerValues.Controls.Add(this.LblEventChance5Tip);
@ -107,9 +108,7 @@ namespace GrasscutterTools.Forms
this.GrpBannerValues.Controls.Add(this.LblScheduleId); this.GrpBannerValues.Controls.Add(this.LblScheduleId);
this.GrpBannerValues.Controls.Add(this.LblBeginTime); this.GrpBannerValues.Controls.Add(this.LblBeginTime);
this.GrpBannerValues.Controls.Add(this.NUDScheduleId); this.GrpBannerValues.Controls.Add(this.NUDScheduleId);
this.GrpBannerValues.Controls.Add(this.NUDEndTime);
this.GrpBannerValues.Controls.Add(this.LblScheduleIdTip); this.GrpBannerValues.Controls.Add(this.LblScheduleIdTip);
this.GrpBannerValues.Controls.Add(this.NUDBeginTime);
this.GrpBannerValues.Controls.Add(this.CmbBannerType); this.GrpBannerValues.Controls.Add(this.CmbBannerType);
this.GrpBannerValues.Controls.Add(this.LblSortIdTip); this.GrpBannerValues.Controls.Add(this.LblSortIdTip);
this.GrpBannerValues.Controls.Add(this.LblBannerType); this.GrpBannerValues.Controls.Add(this.LblBannerType);
@ -128,11 +127,26 @@ namespace GrasscutterTools.Forms
resources.ApplyResources(this.CmbPrefab, "CmbPrefab"); resources.ApplyResources(this.CmbPrefab, "CmbPrefab");
this.CmbPrefab.Name = "CmbPrefab"; this.CmbPrefab.Name = "CmbPrefab";
// //
// LblEventChance4Tip
//
resources.ApplyResources(this.LblEventChance4Tip, "LblEventChance4Tip");
this.LblEventChance4Tip.Name = "LblEventChance4Tip";
//
// LblEventChance5Tip // LblEventChance5Tip
// //
resources.ApplyResources(this.LblEventChance5Tip, "LblEventChance5Tip"); resources.ApplyResources(this.LblEventChance5Tip, "LblEventChance5Tip");
this.LblEventChance5Tip.Name = "LblEventChance5Tip"; this.LblEventChance5Tip.Name = "LblEventChance5Tip";
// //
// NUDEventChance4
//
resources.ApplyResources(this.NUDEventChance4, "NUDEventChance4");
this.NUDEventChance4.Name = "NUDEventChance4";
this.NUDEventChance4.Value = new decimal(new int[] {
50,
0,
0,
0});
//
// NUDEventChance5 // NUDEventChance5
// //
resources.ApplyResources(this.NUDEventChance5, "NUDEventChance5"); resources.ApplyResources(this.NUDEventChance5, "NUDEventChance5");
@ -148,6 +162,11 @@ namespace GrasscutterTools.Forms
resources.ApplyResources(this.LblGachaType, "LblGachaType"); resources.ApplyResources(this.LblGachaType, "LblGachaType");
this.LblGachaType.Name = "LblGachaType"; this.LblGachaType.Name = "LblGachaType";
// //
// LblEventChance4
//
resources.ApplyResources(this.LblEventChance4, "LblEventChance4");
this.LblEventChance4.Name = "LblEventChance4";
//
// LblEventChance5 // LblEventChance5
// //
resources.ApplyResources(this.LblEventChance5, "LblEventChance5"); resources.ApplyResources(this.LblEventChance5, "LblEventChance5");
@ -228,36 +247,11 @@ namespace GrasscutterTools.Forms
0, 0,
0}); 0});
// //
// NUDEndTime
//
resources.ApplyResources(this.NUDEndTime, "NUDEndTime");
this.NUDEndTime.Maximum = new decimal(new int[] {
1924992000,
0,
0,
0});
this.NUDEndTime.Name = "NUDEndTime";
this.NUDEndTime.Value = new decimal(new int[] {
1924992000,
0,
0,
0});
//
// LblScheduleIdTip // LblScheduleIdTip
// //
resources.ApplyResources(this.LblScheduleIdTip, "LblScheduleIdTip"); resources.ApplyResources(this.LblScheduleIdTip, "LblScheduleIdTip");
this.LblScheduleIdTip.Name = "LblScheduleIdTip"; this.LblScheduleIdTip.Name = "LblScheduleIdTip";
// //
// NUDBeginTime
//
resources.ApplyResources(this.NUDBeginTime, "NUDBeginTime");
this.NUDBeginTime.Maximum = new decimal(new int[] {
1924992000,
0,
0,
0});
this.NUDBeginTime.Name = "NUDBeginTime";
//
// CmbBannerType // CmbBannerType
// //
this.CmbBannerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CmbBannerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@ -307,14 +301,14 @@ namespace GrasscutterTools.Forms
// GrpPurplePool // GrpPurplePool
// //
resources.ApplyResources(this.GrpPurplePool, "GrpPurplePool"); resources.ApplyResources(this.GrpPurplePool, "GrpPurplePool");
this.GrpPurplePool.Controls.Add(this.treeView1); this.GrpPurplePool.Controls.Add(this.ListFallbackItems);
this.GrpPurplePool.Name = "GrpPurplePool"; this.GrpPurplePool.Name = "GrpPurplePool";
this.GrpPurplePool.TabStop = false; this.GrpPurplePool.TabStop = false;
// //
// GrpYellowPool // GrpYellowPool
// //
resources.ApplyResources(this.GrpYellowPool, "GrpYellowPool"); resources.ApplyResources(this.GrpYellowPool, "GrpYellowPool");
this.GrpYellowPool.Controls.Add(this.treeView2); this.GrpYellowPool.Controls.Add(this.ListUpItems);
this.GrpYellowPool.Name = "GrpYellowPool"; this.GrpYellowPool.Name = "GrpYellowPool";
this.GrpYellowPool.TabStop = false; this.GrpYellowPool.TabStop = false;
// //
@ -346,77 +340,91 @@ namespace GrasscutterTools.Forms
this.BtnParse.UseVisualStyleBackColor = true; this.BtnParse.UseVisualStyleBackColor = true;
this.BtnParse.Click += new System.EventHandler(this.BtnParse_Click); this.BtnParse.Click += new System.EventHandler(this.BtnParse_Click);
// //
// treeView1
//
resources.ApplyResources(this.treeView1, "treeView1");
this.treeView1.Name = "treeView1";
//
// treeView2
//
resources.ApplyResources(this.treeView2, "treeView2");
this.treeView2.Name = "treeView2";
//
// LblEventChance4
//
resources.ApplyResources(this.LblEventChance4, "LblEventChance4");
this.LblEventChance4.Name = "LblEventChance4";
//
// NUDEventChance4
//
resources.ApplyResources(this.NUDEventChance4, "NUDEventChance4");
this.NUDEventChance4.Name = "NUDEventChance4";
this.NUDEventChance4.Value = new decimal(new int[] {
50,
0,
0,
0});
//
// LblEventChance4Tip
//
resources.ApplyResources(this.LblEventChance4Tip, "LblEventChance4Tip");
this.LblEventChance4Tip.Name = "LblEventChance4Tip";
//
// chart1 // chart1
// //
chartArea3.Name = "ChartArea1"; chartArea1.Name = "ChartArea1";
this.chart1.ChartAreas.Add(chartArea3); this.chart1.ChartAreas.Add(chartArea1);
legend3.Name = "Legend1"; legend1.Name = "Legend1";
this.chart1.Legends.Add(legend3); this.chart1.Legends.Add(legend1);
resources.ApplyResources(this.chart1, "chart1"); resources.ApplyResources(this.chart1, "chart1");
this.chart1.Name = "chart1"; this.chart1.Name = "chart1";
series3.ChartArea = "ChartArea1"; series1.ChartArea = "ChartArea1";
series3.Legend = "Legend1"; series1.Legend = "Legend1";
series3.Name = "Series1"; series1.Name = "Series1";
this.chart1.Series.Add(series3); this.chart1.Series.Add(series1);
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
//
// tabPage1
//
resources.ApplyResources(this.tabPage1, "tabPage1");
this.tabPage1.Name = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true;
//
// tabPage2
//
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Name = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
// //
// GrpWeights // GrpWeights
// //
resources.ApplyResources(this.GrpWeights, "GrpWeights"); resources.ApplyResources(this.GrpWeights, "GrpWeights");
this.GrpWeights.Controls.Add(this.tabControl1); this.GrpWeights.Controls.Add(this.ListBannerWeights);
this.GrpWeights.Controls.Add(this.chart1); this.GrpWeights.Controls.Add(this.chart1);
this.GrpWeights.Name = "GrpWeights"; this.GrpWeights.Name = "GrpWeights";
this.GrpWeights.TabStop = false; 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.HideSelection = false;
resources.ApplyResources(this.ListBannerWeights, "ListBannerWeights");
this.ListBannerWeights.Name = "ListBannerWeights";
this.ListBannerWeights.UseCompatibleStateImageBehavior = false;
this.ListBannerWeights.View = System.Windows.Forms.View.Details;
//
// 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.HideSelection = false;
this.ListUpItems.Name = "ListUpItems";
this.ListUpItems.UseCompatibleStateImageBehavior = false;
this.ListUpItems.View = System.Windows.Forms.View.Details;
//
// 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.HideSelection = false;
this.ListFallbackItems.Name = "ListFallbackItems";
this.ListFallbackItems.UseCompatibleStateImageBehavior = false;
this.ListFallbackItems.View = System.Windows.Forms.View.Details;
//
// ColUpId
//
resources.ApplyResources(this.ColUpId, "ColUpId");
//
// ColUpName
//
resources.ApplyResources(this.ColUpName, "ColUpName");
//
// ColFallbackId
//
resources.ApplyResources(this.ColFallbackId, "ColFallbackId");
//
// ColFallbackName
//
resources.ApplyResources(this.ColFallbackName, "ColFallbackName");
//
// FormGachaBannerEditor2 // FormGachaBannerEditor2
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
@ -430,19 +438,16 @@ namespace GrasscutterTools.Forms
this.Name = "FormGachaBannerEditor2"; this.Name = "FormGachaBannerEditor2";
this.GrpBannerValues.ResumeLayout(false); this.GrpBannerValues.ResumeLayout(false);
this.GrpBannerValues.PerformLayout(); this.GrpBannerValues.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.NUDEventChance4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUDEventChance5)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDEventChance5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUDGachaType)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDGachaType)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUDSortId)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDSortId)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUDScheduleId)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDScheduleId)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUDEndTime)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUDBeginTime)).EndInit();
this.GrpPurplePool.ResumeLayout(false); this.GrpPurplePool.ResumeLayout(false);
this.GrpYellowPool.ResumeLayout(false); this.GrpYellowPool.ResumeLayout(false);
this.GrpJson.ResumeLayout(false); this.GrpJson.ResumeLayout(false);
this.GrpJson.PerformLayout(); this.GrpJson.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.NUDEventChance4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
this.tabControl1.ResumeLayout(false);
this.GrpWeights.ResumeLayout(false); this.GrpWeights.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
@ -462,9 +467,7 @@ namespace GrasscutterTools.Forms
private System.Windows.Forms.Label LblScheduleId; private System.Windows.Forms.Label LblScheduleId;
private System.Windows.Forms.Label LblBeginTime; private System.Windows.Forms.Label LblBeginTime;
private System.Windows.Forms.NumericUpDown NUDScheduleId; private System.Windows.Forms.NumericUpDown NUDScheduleId;
private System.Windows.Forms.NumericUpDown NUDEndTime;
private System.Windows.Forms.Label LblScheduleIdTip; private System.Windows.Forms.Label LblScheduleIdTip;
private System.Windows.Forms.NumericUpDown NUDBeginTime;
private System.Windows.Forms.ComboBox CmbBannerType; private System.Windows.Forms.ComboBox CmbBannerType;
private System.Windows.Forms.Label LblSortIdTip; private System.Windows.Forms.Label LblSortIdTip;
private System.Windows.Forms.Label LblBannerType; private System.Windows.Forms.Label LblBannerType;
@ -480,14 +483,18 @@ namespace GrasscutterTools.Forms
private System.Windows.Forms.Button BtnParse; private System.Windows.Forms.Button BtnParse;
private System.Windows.Forms.ComboBox CmbPrefab; private System.Windows.Forms.ComboBox CmbPrefab;
private System.Windows.Forms.Label LblEventChance4; private System.Windows.Forms.Label LblEventChance4;
private System.Windows.Forms.TreeView treeView1;
private System.Windows.Forms.TreeView treeView2;
private System.Windows.Forms.Label LblEventChance4Tip; private System.Windows.Forms.Label LblEventChance4Tip;
private System.Windows.Forms.NumericUpDown NUDEventChance4; private System.Windows.Forms.NumericUpDown NUDEventChance4;
private System.Windows.Forms.DataVisualization.Charting.Chart chart1; private System.Windows.Forms.DataVisualization.Charting.Chart chart1;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.GroupBox GrpWeights; private System.Windows.Forms.GroupBox GrpWeights;
private System.Windows.Forms.DateTimePicker DTPEndTime;
private System.Windows.Forms.DateTimePicker DTPBeginTime;
private System.Windows.Forms.ListView ListBannerWeights;
private System.Windows.Forms.ListView ListFallbackItems;
private System.Windows.Forms.ListView ListUpItems;
private System.Windows.Forms.ColumnHeader ColFallbackId;
private System.Windows.Forms.ColumnHeader ColFallbackName;
private System.Windows.Forms.ColumnHeader ColUpId;
private System.Windows.Forms.ColumnHeader ColUpName;
} }
} }

View File

@ -19,6 +19,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Drawing;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
@ -46,6 +47,9 @@ namespace GrasscutterTools.Forms
CmbBannerType.SelectedIndex = 0; CmbBannerType.SelectedIndex = 0;
InitBannerPrefab(); InitBannerPrefab();
InitCheckedListBoxs(); InitCheckedListBoxs();
ShowBanner(new GachaBanner2());
} }
private void InitBannerPrefab() private void InitBannerPrefab()
@ -54,40 +58,93 @@ namespace GrasscutterTools.Forms
CmbPrefab.Items.AddRange(GameData.GachaBannerPrefabs.Names); CmbPrefab.Items.AddRange(GameData.GachaBannerPrefabs.Names);
} }
private void InitCheckedListBoxs() private void InitCheckedListBoxs()
{ {
// TODO var c = new Dictionary<string, string>();
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 avatars = GetAvatarsByColor("yellow")
.Select(it => new ListViewItem(new string[] { it.Item1.ToString(), it.Item2 }, a5) { ForeColor = Color.OrangeRed })
.Concat(GetAvatarsByColor("purple")
.Select(it => new ListViewItem(new string[] { it.Item1.ToString(), it.Item2 }, a4) { ForeColor = Color.Purple }))
.Concat(GetAvatarsByColor("blue")
.Select(it => new ListViewItem(new string[] { it.Item1.ToString(), it.Item2 }, a3) { ForeColor = Color.Blue }));
var weapons = GetWeaponsByColor("yellow")
.Select(it => new ListViewItem(new string[] { it.Item1.ToString(), it.Item2 }, w5) { ForeColor = Color.OrangeRed })
.Concat(GetWeaponsByColor("purple")
.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.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 upAvatars = GetAvatarsByColor("yellow")
.Select(it => new ListViewItem(new string[] { it.Item1.ToString(), it.Item2 }, ua5) { ForeColor = Color.OrangeRed })
.Concat(GetAvatarsByColor("purple")
.Select(it => new ListViewItem(new string[] { it.Item1.ToString(), it.Item2 }, ua4) { ForeColor = Color.Purple }));
var upWeapons = GetWeaponsByColor("yellow")
.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.AddRange(upAvatars.Concat(upWeapons).ToArray());
ListFallbackItems.EndUpdate();
ListUpItems.EndUpdate();
} }
//private void InitCheckedListBox(CheckedListBox list, string color) private IEnumerable<(int, string)> GetAvatarsByColor(string color)
//{
// var kvs = new List<string>();
// for (int i = 0; i < GameData.AvatarColors.Count; i++)
// {
// if (GameData.AvatarColors.Names[i] == color)
// {
// var id = GameData.AvatarColors.Ids[i];
// var index = Array.IndexOf(GameData.Avatars.Ids, id % 1000 + 10000000);
// if (index >= 0)
// kvs.Add($"{id}:{GameData.Avatars.Names[index]}");
// }
// }
// for (int i = 0; i < GameData.WeaponColors.Count; i++)
// {
// if (GameData.WeaponColors.Names[i] == color)
// {
// var id = GameData.WeaponColors.Ids[i];
// var index = Array.IndexOf(GameData.Weapons.Ids, id);
// if (index >= 0)
// kvs.Add($"{id}:{GameData.Weapons.Names[index]}");
// }
// }
// list.Items.AddRange(kvs.ToArray());
//}
private void InitRateUpItems(GachaBanner2 banner)
{ {
// TODO for (int i = 0; i < GameData.AvatarColors.Count; i++)
{
if (GameData.AvatarColors.Names[i] == color)
{
var id = GameData.AvatarColors.Ids[i];
var index = Array.IndexOf(GameData.Avatars.Ids, id % 1000 + 10000000);
if (index >= 0)
yield return (id, GameData.Avatars.Names[index]);
}
}
}
private IEnumerable<(int, string)> GetWeaponsByColor(string color)
{
for (int i = 0; i < GameData.WeaponColors.Count; i++)
{
if (GameData.WeaponColors.Names[i] == color)
{
var id = GameData.WeaponColors.Ids[i];
var index = Array.IndexOf(GameData.Weapons.Ids, id);
if (index >= 0)
yield return (id, GameData.Weapons.Names[index]);
}
}
}
private void InitItems(GachaBanner2 banner)
{
var f = banner.FallbackItems3
.Concat(banner.FallbackItems4Pool1)
.Concat(banner.FallbackItems4Pool2)
.Concat(banner.FallbackItems5Pool1)
.Concat(banner.FallbackItems5Pool2)
.ToArray();
foreach (ListViewItem item in ListFallbackItems.Items)
item.Checked = Array.IndexOf(f, int.Parse(item.Text)) >= 0;
var u = banner.RateUpItems4.Concat(banner.RateUpItems5).ToArray();
foreach (ListViewItem item in ListUpItems.Items)
item.Checked = Array.IndexOf(u, int.Parse(item.Text)) >= 0;
} }
#endregion - - #endregion - -
@ -107,12 +164,12 @@ namespace GrasscutterTools.Forms
CmbPrefab.SelectedIndex = Array.IndexOf(GameData.GachaBannerPrefabs.Ids, prefabId); CmbPrefab.SelectedIndex = Array.IndexOf(GameData.GachaBannerPrefabs.Ids, prefabId);
RbCostItem224.Checked = banner.CostItem == 224; RbCostItem224.Checked = banner.CostItem == 224;
RbCostItem223.Checked = banner.CostItem == 223; RbCostItem223.Checked = banner.CostItem == 223;
NUDBeginTime.Value = banner.BeginTime; DTPBeginTime.Value = DateTimeOffset.FromUnixTimeSeconds(banner.BeginTime).DateTime;
NUDEndTime.Value = banner.EndTime; DTPEndTime.Value = DateTimeOffset.FromUnixTimeSeconds(banner.EndTime).DateTime;
NUDSortId.Value = banner.SortId; NUDSortId.Value = banner.SortId;
NUDEventChance5.Value = banner.EventChance5; NUDEventChance5.Value = banner.EventChance5;
NUDEventChance4.Value = banner.EventChance4; NUDEventChance4.Value = banner.EventChance4;
InitRateUpItems(banner); InitItems(banner);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -145,8 +202,8 @@ namespace GrasscutterTools.Forms
PreviewPrefabPath = $"UI_Tab_GachaShowPanel_A{prefabId:000}", PreviewPrefabPath = $"UI_Tab_GachaShowPanel_A{prefabId:000}",
TitlePath = $"UI_GACHA_SHOW_PANEL_A{prefabId:000}_TITLE", TitlePath = $"UI_GACHA_SHOW_PANEL_A{prefabId:000}_TITLE",
CostItem = RbCostItem224.Checked ? 224 : 223, CostItem = RbCostItem224.Checked ? 224 : 223,
BeginTime = (int)NUDBeginTime.Value, BeginTime = (int)new DateTimeOffset(DTPBeginTime.Value).ToUnixTimeSeconds(),
EndTime = (int)NUDEndTime.Value, EndTime = (int)new DateTimeOffset(DTPEndTime.Value).ToUnixTimeSeconds(),
SortId = (int)NUDSortId.Value, SortId = (int)NUDSortId.Value,
EventChance5 = (int)NUDEventChance5.Value, EventChance5 = (int)NUDEventChance5.Value,
EventChance4 = (int)NUDEventChance4.Value, EventChance4 = (int)NUDEventChance4.Value,

File diff suppressed because it is too large Load Diff

View File

@ -33,40 +33,40 @@ namespace GrasscutterTools.Game.Gacha
/// 如果你想添加大量卡池请按照每次增加固定数值的id进行添加比如411412413.... /// 如果你想添加大量卡池请按照每次增加固定数值的id进行添加比如411412413....
/// </summary> /// </summary>
[JsonProperty("gachaType")] [JsonProperty("gachaType")]
public int GachaType { get; set; } public int GachaType { get; set; } = 400;
/// <summary> /// <summary>
/// 这个id需要每个池子不一样如果你想添加大量卡池 /// 这个id需要每个池子不一样如果你想添加大量卡池
/// 请按照每次增加固定数值的id进行添加,比如210022002300.... /// 请按照每次增加固定数值的id进行添加,比如210022002300....
/// </summary> /// </summary>
[JsonProperty("scheduleId")] [JsonProperty("scheduleId")]
public int ScheduleId { get; set; } public int ScheduleId { get; set; } = 800;
/// <summary> /// <summary>
/// 这个是卡池的预制路径id /// 这个是卡池的预制路径id
/// </summary> /// </summary>
[JsonProperty("prefabPath")] [JsonProperty("prefabPath")]
public string PrefabPath { get; set; } public string PrefabPath { get; set; } = "GachaShowPanel_A007";
/// <summary> /// <summary>
/// 这个是抽卡的预览背景路径id /// 这个是抽卡的预览背景路径id
/// </summary> /// </summary>
[JsonProperty("previewPrefabPath")] [JsonProperty("previewPrefabPath")]
public string PreviewPrefabPath { get; set; } public string PreviewPrefabPath { get; set; } = "UI_Tab_GachaShowPanel_A007";
/// <summary> /// <summary>
/// 这个是抽卡的标题路径id有可能与之前两项的id不同 /// 这个是抽卡的标题路径id有可能与之前两项的id不同
/// 一般这3项的id只需保持一致即可就是A0xxxx为同一id /// 一般这3项的id只需保持一致即可就是A0xxxx为同一id
/// </summary> /// </summary>
[JsonProperty("titlePath")] [JsonProperty("titlePath")]
public string TitlePath { get; set; } public string TitlePath { get; set; } = "UI_GACHA_SHOW_PANEL_A007_TITLE";
/// <summary> /// <summary>
/// 这个表示祈愿用的道具224是相遇之缘223是纠缠之缘 - 选择一个作为该卡池的抽卡道具 /// 这个表示祈愿用的道具224是相遇之缘223是纠缠之缘 - 选择一个作为该卡池的抽卡道具
/// (提示请不要随便修改祈愿道具除了蓝球和粉球有可能会引发bug比如修改成摩拉抽卡可能导致卡住) /// (提示请不要随便修改祈愿道具除了蓝球和粉球有可能会引发bug比如修改成摩拉抽卡可能导致卡住)
/// </summary> /// </summary>
[JsonProperty("costItem")] [JsonProperty("costItem")]
public int CostItem { get; set; } public int CostItem { get; set; } = 223;
/// <summary> /// <summary>
/// 开始时间Unix时间戳 /// 开始时间Unix时间戳
@ -84,7 +84,7 @@ namespace GrasscutterTools.Game.Gacha
/// 卡池顺序 /// 卡池顺序
/// </summary> /// </summary>
[JsonProperty("sortId")] [JsonProperty("sortId")]
public int SortId { get; set; } public int SortId { get; set; } = 1000;
/// <summary> /// <summary>
/// 4星的up角色或物品 /// 4星的up角色或物品
@ -102,67 +102,67 @@ namespace GrasscutterTools.Game.Gacha
/// 3星普通池 /// 3星普通池
/// </summary> /// </summary>
[JsonProperty("fallbackItems3")] [JsonProperty("fallbackItems3")]
private int[] FallbackItems3 { get; set; } = { 11301, 11302, 11306, 12301, 12302, 12305, 13303, 14301, 14302, 14304, 15301, 15302, 15304 }; public int[] FallbackItems3 { get; set; } = { 11301, 11302, 11306, 12301, 12302, 12305, 13303, 14301, 14302, 14304, 15301, 15302, 15304 };
/// <summary> /// <summary>
/// 4星普通角色池 /// 4星普通角色池
/// </summary> /// </summary>
[JsonProperty("fallbackItems4Pool1")] [JsonProperty("fallbackItems4Pool1")]
private int[] FallbackItems4Pool1 { get; set; } = { 1014, 1020, 1023, 1024, 1025, 1027, 1031, 1032, 1034, 1036, 1039, 1043, 1044, 1045, 1048, 1053, 1055, 1056, 1064 }; public int[] FallbackItems4Pool1 { get; set; } = { 1014, 1020, 1023, 1024, 1025, 1027, 1031, 1032, 1034, 1036, 1039, 1043, 1044, 1045, 1048, 1053, 1055, 1056, 1064 };
/// <summary> /// <summary>
/// 4星普通武器池 /// 4星普通武器池
/// </summary> /// </summary>
[JsonProperty("fallbackItems4Pool2")] [JsonProperty("fallbackItems4Pool2")]
private int[] FallbackItems4Pool2 { get; set; } = { 11401, 11402, 11403, 11405, 12401, 12402, 12403, 12405, 13401, 13407, 14401, 14402, 14403, 14409, 15401, 15402, 15403, 15405 }; public int[] FallbackItems4Pool2 { get; set; } = { 11401, 11402, 11403, 11405, 12401, 12402, 12403, 12405, 13401, 13407, 14401, 14402, 14403, 14409, 15401, 15402, 15403, 15405 };
/// <summary> /// <summary>
/// 5星普通角色池 /// 5星普通角色池
/// </summary> /// </summary>
[JsonProperty("fallbackItems5Pool1")] [JsonProperty("fallbackItems5Pool1")]
private int[] FallbackItems5Pool1 { get; set; } = { 1003, 1016, 1042, 1035, 1041 }; public int[] FallbackItems5Pool1 { get; set; } = { 1003, 1016, 1042, 1035, 1041 };
/// <summary> /// <summary>
/// 5星普通角色池 /// 5星普通角色池
/// </summary> /// </summary>
[JsonProperty("fallbackItems5Pool2")] [JsonProperty("fallbackItems5Pool2")]
private int[] FallbackItems5Pool2 { get; set; } = { 11501, 11502, 12501, 12502, 13502, 13505, 14501, 14502, 15501, 15502 }; public int[] FallbackItems5Pool2 { get; set; } = { 11501, 11502, 12501, 12502, 13502, 13505, 14501, 14502, 15501, 15502 };
/// <summary> /// <summary>
/// 是否从奖池中移除玩家星座等级6级以上的角色 /// 是否从奖池中移除玩家星座等级6级以上的角色
/// </summary> /// </summary>
[JsonProperty("removeC6FromPool")] [JsonProperty("removeC6FromPool")]
private bool RemoveC6FromPool { get; set; } = false; public bool RemoveC6FromPool { get; set; } = false;
/// <summary> /// <summary>
/// 自动从普通池中移除UP池物品或角色 /// 自动从普通池中移除UP池物品或角色
/// </summary> /// </summary>
[JsonProperty("autoStripRateUpFromFallback")] [JsonProperty("autoStripRateUpFromFallback")]
private bool AutoStripRateUpFromFallback { get; set; } = true; public bool AutoStripRateUpFromFallback { get; set; } = true;
/// <summary> /// <summary>
/// 4星权重 /// 4星权重
/// </summary> /// </summary>
[JsonProperty("weights4")] [JsonProperty("weights4")]
private int[,] Weights4 { get; set; } = { { 1, 510 }, { 8, 510 }, { 10, 10000 } }; public int[,] Weights4 { get; set; } = { { 1, 510 }, { 8, 510 }, { 10, 10000 } };
/// <summary> /// <summary>
/// 5星权重 /// 5星权重
/// </summary> /// </summary>
[JsonProperty("weights5")] [JsonProperty("weights5")]
private int[,] Weights5 { get; set; } = { { 1, 75 }, { 73, 150 }, { 90, 10000 } }; public int[,] Weights5 { get; set; } = { { 1, 75 }, { 73, 150 }, { 90, 10000 } };
/// <summary> /// <summary>
/// 4星平衡奖池权重即中的是武器还是角色 /// 4星平衡奖池权重即中的是武器还是角色
/// </summary> /// </summary>
[JsonProperty("poolBalanceWeights4")] [JsonProperty("poolBalanceWeights4")]
private int[,] PoolBalanceWeights4 { get; set; } = { { 1, 255 }, { 17, 255 }, { 21, 10455 } }; public int[,] PoolBalanceWeights4 { get; set; } = { { 1, 255 }, { 17, 255 }, { 21, 10455 } };
/// <summary> /// <summary>
/// 5星平衡奖池权重即中的是武器还是角色 /// 5星平衡奖池权重即中的是武器还是角色
/// </summary> /// </summary>
[JsonProperty("poolBalanceWeights5")] [JsonProperty("poolBalanceWeights5")]
private int[,] PoolBalanceWeights5 { get; set; } = { { 1, 30 }, { 147, 150 }, { 181, 10230 } }; public int[,] PoolBalanceWeights5 { get; set; } = { { 1, 30 }, { 147, 150 }, { 181, 10230 } };
/// <summary> /// <summary>
/// 4星事件概率抽中后摇1~100随机数如果大于该值则抽中up池 /// 4星事件概率抽中后摇1~100随机数如果大于该值则抽中up池