mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-06-08 23:19:14 +08:00
Clean up all
Remvoe TextBoxXP
This commit is contained in:
parent
d169de9a9e
commit
c7898401ce
@ -1,186 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
|
|
||||||
namespace GrasscutterTools.Controls
|
|
||||||
{
|
|
||||||
[ToolboxItem(true)]
|
|
||||||
public class TextBoxXP : TextBox
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获得当前进程,以便重绘控件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="hWnd"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[DllImport("user32.dll")]
|
|
||||||
private static extern IntPtr GetWindowDC(IntPtr hWnd);
|
|
||||||
|
|
||||||
[DllImport("user32.dll")]
|
|
||||||
private static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
|
|
||||||
|
|
||||||
private const int EM_SETCUEBANNER = 0x1501;
|
|
||||||
|
|
||||||
[DllImport("user32.dll", CharSet = CharSet.Auto)]
|
|
||||||
private static extern Int32 SendMessage
|
|
||||||
(IntPtr hWnd, int msg, int wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 水印文本
|
|
||||||
/// </summary>
|
|
||||||
private string _Watermark = "";
|
|
||||||
|
|
||||||
private float maximum;
|
|
||||||
private float minimum;
|
|
||||||
|
|
||||||
#region 属性
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否启用热点效果
|
|
||||||
/// </summary>
|
|
||||||
[Category("外观")]
|
|
||||||
[Browsable(true)]
|
|
||||||
[Localizable(true)]
|
|
||||||
[Description("获取或设置输入框水印文本")]
|
|
||||||
[DefaultValue("")]
|
|
||||||
public string Watermark
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this._Watermark;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
this._Watermark = value;
|
|
||||||
SendMessage(Handle, EM_SETCUEBANNER, 0, _Watermark);
|
|
||||||
this.Invalidate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否只能输入数字
|
|
||||||
/// </summary>
|
|
||||||
[Category("行为")]
|
|
||||||
[Browsable(true)]
|
|
||||||
[Description("获取或设置TextBox是否只允许输入数字")]
|
|
||||||
[DefaultValue(false)]
|
|
||||||
public bool DigitOnly { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 转为数值
|
|
||||||
/// </summary>
|
|
||||||
public float Number
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (float.TryParse(Text, out float value))
|
|
||||||
return value;
|
|
||||||
else
|
|
||||||
return 0f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Category("数据")]
|
|
||||||
[Browsable(true)]
|
|
||||||
[DefaultValue(0)]
|
|
||||||
[Description("指示小数点后位数")]
|
|
||||||
public int DecimalPlaces { get; set; }
|
|
||||||
|
|
||||||
[Category("数据")]
|
|
||||||
[Description("获取或设置限制的最大值")]
|
|
||||||
public float Maximum
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return maximum;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
maximum = value;
|
|
||||||
if (minimum > maximum)
|
|
||||||
{
|
|
||||||
minimum = maximum;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Category("数据")]
|
|
||||||
[Browsable(true)]
|
|
||||||
[Description("获取或设置限制的最小值")]
|
|
||||||
public float Minimum
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return minimum;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
minimum = value;
|
|
||||||
if (minimum > maximum)
|
|
||||||
{
|
|
||||||
maximum = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion 属性
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public TextBoxXP()
|
|
||||||
: base()
|
|
||||||
{
|
|
||||||
//BorderStyle = BorderStyle.FixedSingle;
|
|
||||||
//Font = Styles.StaticResources.DefaultFont;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnKeyPress(KeyPressEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnKeyPress(e);
|
|
||||||
// 如果只允许输入数字,则判断输入是否为退格或者数字
|
|
||||||
if (DigitOnly)
|
|
||||||
{
|
|
||||||
//IsNumber:指定字符串中位于指定位置的字符是否属于数字类别
|
|
||||||
//IsPunctuation:指定字符串中位于指定位置的字符是否属于标点符号类别
|
|
||||||
//IsControl:指定字符串中位于指定位置的字符是否属于控制字符类别
|
|
||||||
if (!Char.IsNumber(e.KeyChar) && !Char.IsPunctuation(e.KeyChar) && !Char.IsControl(e.KeyChar))
|
|
||||||
{
|
|
||||||
e.Handled = true; //获取或设置一个值,指示是否处理过System.Windows.Forms.Control.KeyPress事件
|
|
||||||
}
|
|
||||||
else if (Char.IsPunctuation(e.KeyChar) && DecimalPlaces > 0)
|
|
||||||
{
|
|
||||||
if (e.KeyChar == '.')
|
|
||||||
{
|
|
||||||
if (Text.LastIndexOf('.') != -1)
|
|
||||||
{
|
|
||||||
e.Handled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
e.Handled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnLeave(EventArgs e)
|
|
||||||
{
|
|
||||||
base.OnLeave(e);
|
|
||||||
|
|
||||||
if (DigitOnly)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrWhiteSpace(Text))
|
|
||||||
{
|
|
||||||
if (Number > Maximum)
|
|
||||||
Text = Maximum.ToString("F" + DecimalPlaces);
|
|
||||||
if (Number < Minimum)
|
|
||||||
Text = Minimum.ToString("F" + DecimalPlaces);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using GrasscutterTools.DispatchServer.Model;
|
using GrasscutterTools.DispatchServer.Model;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.DispatchServer.Model
|
namespace GrasscutterTools.DispatchServer.Model
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@ -485,7 +486,6 @@ namespace GrasscutterTools.Forms
|
|||||||
dropList[i] = data;
|
dropList[i] = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion - 掉落物列表 -
|
#endregion - 掉落物列表 -
|
||||||
|
|
||||||
#region - 物品列表 -
|
#region - 物品列表 -
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -99,25 +100,25 @@ namespace GrasscutterTools.Forms
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
NUDGachaType.Value = banner.GachaType;
|
NUDGachaType.Value = banner.GachaType;
|
||||||
NUDScheduleId.Value = banner.ScheduleId;
|
NUDScheduleId.Value = banner.ScheduleId;
|
||||||
CmbBannerType.SelectedIndex = (int)banner.BannerType;
|
CmbBannerType.SelectedIndex = (int)banner.BannerType;
|
||||||
if (string.IsNullOrEmpty(banner.TitlePath) || !int.TryParse(banner.TitlePath.Substring("UI_GACHA_SHOW_PANEL_A".Length, 3), out int prefabId))
|
if (string.IsNullOrEmpty(banner.TitlePath) || !int.TryParse(banner.TitlePath.Substring("UI_GACHA_SHOW_PANEL_A".Length, 3), out int prefabId))
|
||||||
CmbPrefab.SelectedIndex = -1;
|
CmbPrefab.SelectedIndex = -1;
|
||||||
else
|
else
|
||||||
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;
|
NUDBeginTime.Value = banner.BeginTime;
|
||||||
NUDEndTime.Value = banner.EndTime;
|
NUDEndTime.Value = banner.EndTime;
|
||||||
NUDSortId.Value = banner.SortId;
|
NUDSortId.Value = banner.SortId;
|
||||||
TxtRateUpItems1.Text = string.Join(", ", banner.RateUpItems1);
|
TxtRateUpItems1.Text = string.Join(", ", banner.RateUpItems1);
|
||||||
TxtRateUpItems2.Text = string.Join(", ", banner.RateUpItems2);
|
TxtRateUpItems2.Text = string.Join(", ", banner.RateUpItems2);
|
||||||
NUDBaseYellowWeight.Value = banner.BaseYellowWeight * 0.01M;
|
NUDBaseYellowWeight.Value = banner.BaseYellowWeight * 0.01M;
|
||||||
NUDBasePurpleWeight.Value = banner.BasePurpleWeight * 0.01M;
|
NUDBasePurpleWeight.Value = banner.BasePurpleWeight * 0.01M;
|
||||||
NUDEventChance.Value = banner.EventChance;
|
NUDEventChance.Value = banner.EventChance;
|
||||||
NUDSoftPity.Value = banner.SoftPity;
|
NUDSoftPity.Value = banner.SoftPity;
|
||||||
NUDHardPity.Value = banner.HardPity;
|
NUDHardPity.Value = banner.HardPity;
|
||||||
InitRateUpItems(banner);
|
InitRateUpItems(banner);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@ -155,23 +156,23 @@ namespace GrasscutterTools.Forms
|
|||||||
var prefabId = GameData.GachaBannerPrefabs.Ids[CmbPrefab.SelectedIndex];
|
var prefabId = GameData.GachaBannerPrefabs.Ids[CmbPrefab.SelectedIndex];
|
||||||
GachaBanner banner = new GachaBanner
|
GachaBanner banner = new GachaBanner
|
||||||
{
|
{
|
||||||
GachaType = (int)NUDGachaType.Value,
|
GachaType = (int)NUDGachaType.Value,
|
||||||
ScheduleId = (int)NUDScheduleId.Value,
|
ScheduleId = (int)NUDScheduleId.Value,
|
||||||
BannerType = (BannerType)CmbBannerType.SelectedIndex,
|
BannerType = (BannerType)CmbBannerType.SelectedIndex,
|
||||||
PrefabPath = $"GachaShowPanel_A{prefabId:000}",
|
PrefabPath = $"GachaShowPanel_A{prefabId:000}",
|
||||||
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)NUDBeginTime.Value,
|
||||||
EndTime = (int)NUDEndTime.Value,
|
EndTime = (int)NUDEndTime.Value,
|
||||||
SortId = (int)NUDSortId.Value,
|
SortId = (int)NUDSortId.Value,
|
||||||
RateUpItems1 = yellowIds,
|
RateUpItems1 = yellowIds,
|
||||||
RateUpItems2 = purpleIds,
|
RateUpItems2 = purpleIds,
|
||||||
BaseYellowWeight = (int)(NUDBaseYellowWeight.Value * 100),
|
BaseYellowWeight = (int)(NUDBaseYellowWeight.Value * 100),
|
||||||
BasePurpleWeight = (int)(NUDBasePurpleWeight.Value * 100),
|
BasePurpleWeight = (int)(NUDBasePurpleWeight.Value * 100),
|
||||||
EventChance = (int)NUDEventChance.Value,
|
EventChance = (int)NUDEventChance.Value,
|
||||||
SoftPity = (int)NUDSoftPity.Value,
|
SoftPity = (int)NUDSoftPity.Value,
|
||||||
HardPity = (int)NUDHardPity.Value
|
HardPity = (int)NUDHardPity.Value
|
||||||
};
|
};
|
||||||
return banner;
|
return banner;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ using System.Collections.Generic;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Windows.Forms.DataVisualization.Charting;
|
|
||||||
|
|
||||||
using GrasscutterTools.Game;
|
using GrasscutterTools.Game;
|
||||||
using GrasscutterTools.Game.Gacha;
|
using GrasscutterTools.Game.Gacha;
|
||||||
@ -301,7 +300,7 @@ namespace GrasscutterTools.Forms
|
|||||||
{
|
{
|
||||||
var json = JsonConvert.SerializeObject(banner);
|
var json = JsonConvert.SerializeObject(banner);
|
||||||
json = json.Replace(",\"", ",\r\n \"").Insert(1, "\r\n ");
|
json = json.Replace(",\"", ",\r\n \"").Insert(1, "\r\n ");
|
||||||
TxtJson.Text = json.Insert(json.Length-1, "\r\n");
|
TxtJson.Text = json.Insert(json.Length - 1, "\r\n");
|
||||||
ShowBanner(banner);
|
ShowBanner(banner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,10 +24,8 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Windows.Forms.DataVisualization.Charting;
|
|
||||||
|
|
||||||
using GrasscutterTools.Game;
|
using GrasscutterTools.Game;
|
||||||
using GrasscutterTools.Game.Drop;
|
|
||||||
using GrasscutterTools.Game.Gacha;
|
using GrasscutterTools.Game.Gacha;
|
||||||
using GrasscutterTools.Properties;
|
using GrasscutterTools.Properties;
|
||||||
|
|
||||||
@ -44,7 +42,7 @@ namespace GrasscutterTools.Forms
|
|||||||
|
|
||||||
private List<GachaBanner3> Banners;
|
private List<GachaBanner3> Banners;
|
||||||
|
|
||||||
#endregion
|
#endregion - 成员 -
|
||||||
|
|
||||||
#region - 构造与窗体事件 -
|
#region - 构造与窗体事件 -
|
||||||
|
|
||||||
@ -105,11 +103,10 @@ namespace GrasscutterTools.Forms
|
|||||||
new FormGachaBannerEditor().ShowDialog();
|
new FormGachaBannerEditor().ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion - 构造与窗体事件 -
|
||||||
|
|
||||||
#region - Banners.json 文件相关 -
|
#region - Banners.json 文件相关 -
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载按钮点击时触发
|
/// 加载按钮点击时触发
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -174,7 +171,7 @@ namespace GrasscutterTools.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion - Banners.json 文件相关 -
|
||||||
|
|
||||||
#region - 卡池列表 -
|
#region - 卡池列表 -
|
||||||
|
|
||||||
@ -254,7 +251,7 @@ namespace GrasscutterTools.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion - 卡池列表 -
|
||||||
|
|
||||||
#region - 卡池 -
|
#region - 卡池 -
|
||||||
|
|
||||||
@ -497,8 +494,6 @@ namespace GrasscutterTools.Forms
|
|||||||
return banner;
|
return banner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion - 卡池参数 -
|
#endregion - 卡池参数 -
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -163,7 +163,6 @@ namespace GrasscutterTools.Forms
|
|||||||
}
|
}
|
||||||
throw firstEx;
|
throw firstEx;
|
||||||
|
|
||||||
|
|
||||||
//{
|
//{
|
||||||
// try
|
// try
|
||||||
// {
|
// {
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.GOOD
|
namespace GrasscutterTools.GOOD
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.GOOD
|
namespace GrasscutterTools.GOOD
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
@ -55,10 +56,8 @@ namespace GrasscutterTools.GOOD
|
|||||||
Weapons = ToGOODMap(weapons);
|
Weapons = ToGOODMap(weapons);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static Dictionary<string, int> ArtifactCats { get; private set; }
|
public static Dictionary<string, int> ArtifactCats { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
public static Dictionary<string, int> ArtifactSlotMap = new Dictionary<string, int> {
|
public static Dictionary<string, int> ArtifactSlotMap = new Dictionary<string, int> {
|
||||||
{"goblet", 1}, {"plume", 2}, {"circlet", 3}, {"flower", 4}, {"sands", 5}
|
{"goblet", 1}, {"plume", 2}, {"circlet", 3}, {"flower", 4}, {"sands", 5}
|
||||||
};
|
};
|
||||||
@ -103,6 +102,5 @@ namespace GrasscutterTools.GOOD
|
|||||||
public static Dictionary<string, int> Avatars { get; private set; }
|
public static Dictionary<string, int> Avatars { get; private set; }
|
||||||
|
|
||||||
public static Dictionary<string, int> Weapons { get; private set; }
|
public static Dictionary<string, int> Weapons { get; private set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -16,7 +16,9 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.GOOD
|
namespace GrasscutterTools.GOOD
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game
|
namespace GrasscutterTools.Game
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Drop
|
namespace GrasscutterTools.Game.Drop
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Gacha
|
namespace GrasscutterTools.Game.Gacha
|
||||||
{
|
{
|
||||||
public enum BannerType
|
public enum BannerType
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Converters;
|
using Newtonsoft.Json.Converters;
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
@ -215,7 +216,6 @@ namespace GrasscutterTools.Game.Gacha
|
|||||||
[JsonProperty("bannerType"), JsonConverter(typeof(StringEnumConverter)), DefaultValue(BannerType.STANDARD)]
|
[JsonProperty("bannerType"), JsonConverter(typeof(StringEnumConverter)), DefaultValue(BannerType.STANDARD)]
|
||||||
public BannerType BannerType { get; set; } = BannerType.STANDARD;
|
public BannerType BannerType { get; set; } = BannerType.STANDARD;
|
||||||
|
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"[{GachaType}|{ScheduleId}] 5*:[{string.Join(",", RateUpItems5.Select(GetName))}] 4*:[{string.Join(",", RateUpItems4.Select(GetName))}]";
|
return $"[{GachaType}|{ScheduleId}] 5*:[{string.Join(",", RateUpItems5.Select(GetName))}] 4*:[{string.Join(",", RateUpItems4.Select(GetName))}]";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Grasscutter Tools
|
* Grasscutter Tools
|
||||||
* Copyright (C) 2022 jie65535
|
* Copyright (C) 2022 jie65535
|
||||||
@ -19,6 +19,7 @@ using System.Text;
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
namespace GrasscutterTools.Game
|
namespace GrasscutterTools.Game
|
||||||
{
|
{
|
||||||
public class GameCommand
|
public class GameCommand
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using GrasscutterTools.Properties;
|
using GrasscutterTools.Properties;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game
|
namespace GrasscutterTools.Game
|
||||||
@ -43,7 +44,6 @@ namespace GrasscutterTools.Game
|
|||||||
ShopType = new ItemMap(Resources.ShopType);
|
ShopType = new ItemMap(Resources.ShopType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static ItemMap Artifacts { get; private set; }
|
public static ItemMap Artifacts { get; private set; }
|
||||||
|
|
||||||
public static ItemMap ArtifactCats { get; private set; }
|
public static ItemMap ArtifactCats { get; private set; }
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
@ -37,7 +38,7 @@ namespace GrasscutterTools.Game
|
|||||||
if (categoryLineEndIndex == -1)
|
if (categoryLineEndIndex == -1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
var category = idNamePairs.Substring(categoryLineStartIndex+2, categoryLineEndIndex - categoryLineStartIndex - 3).Trim();
|
var category = idNamePairs.Substring(categoryLineStartIndex + 2, categoryLineEndIndex - categoryLineStartIndex - 3).Trim();
|
||||||
|
|
||||||
var nextStartIndex = idNamePairs.IndexOf("//", categoryLineEndIndex);
|
var nextStartIndex = idNamePairs.IndexOf("//", categoryLineEndIndex);
|
||||||
if (nextStartIndex == -1)
|
if (nextStartIndex == -1)
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Mail
|
namespace GrasscutterTools.Game.Mail
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Player
|
namespace GrasscutterTools.Game.Player
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using GrasscutterTools.Properties;
|
using GrasscutterTools.Properties;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Shop
|
namespace GrasscutterTools.Game.Shop
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -29,28 +30,27 @@ namespace GrasscutterTools.Game.Shop
|
|||||||
{
|
{
|
||||||
public ShopInfo()
|
public ShopInfo()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShopInfo(ShopGoodsData sgd)
|
public ShopInfo(ShopGoodsData sgd)
|
||||||
{
|
{
|
||||||
GoodsId = sgd.GoodsId;
|
GoodsId = sgd.GoodsId;
|
||||||
GoodsItem = new ItemParamData(sgd.ItemId, sgd.ItemCount);
|
GoodsItem = new ItemParamData(sgd.ItemId, sgd.ItemCount);
|
||||||
SCoin = sgd.CostScoin;
|
SCoin = sgd.CostScoin;
|
||||||
MCoin = sgd.CostMcion;
|
MCoin = sgd.CostMcion;
|
||||||
HCoin = sgd.CostHcoin;
|
HCoin = sgd.CostHcoin;
|
||||||
BuyLimit = sgd.BuyLimit;
|
BuyLimit = sgd.BuyLimit;
|
||||||
|
|
||||||
MinLevel = sgd.MinPlayerLevel;
|
MinLevel = sgd.MinPlayerLevel;
|
||||||
MaxLevel = sgd.MaxPlayerLevel;
|
MaxLevel = sgd.MaxPlayerLevel;
|
||||||
CostItemList = sgd.CostItems.Where(it => it.Id != 0).ToList();
|
CostItemList = sgd.CostItems.Where(it => it.Id != 0).ToList();
|
||||||
SecondarySheetId = sgd.SubTabId;
|
SecondarySheetId = sgd.SubTabId;
|
||||||
RefreshType = sgd.RefreshType;
|
RefreshType = sgd.RefreshType;
|
||||||
ShopRefreshParam = sgd.RefreshParam;
|
ShopRefreshParam = sgd.RefreshParam;
|
||||||
if (sgd.BeginTime != null && sgd.EndTime != null)
|
if (sgd.BeginTime != null && sgd.EndTime != null)
|
||||||
{
|
{
|
||||||
BeginTime = (int)new DateTimeOffset(sgd.BeginTime.Value).ToUnixTimeSeconds();
|
BeginTime = (int)new DateTimeOffset(sgd.BeginTime.Value).ToUnixTimeSeconds();
|
||||||
EndTime = (int)new DateTimeOffset(sgd.EndTime.Value).ToUnixTimeSeconds();
|
EndTime = (int)new DateTimeOffset(sgd.EndTime.Value).ToUnixTimeSeconds();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,7 +115,6 @@ namespace GrasscutterTools.Game.Shop
|
|||||||
[JsonProperty("shopRefreshParam")]
|
[JsonProperty("shopRefreshParam")]
|
||||||
public int ShopRefreshParam { get; set; }
|
public int ShopRefreshParam { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"{GoodsId}:{GameData.Items[GoodsItem.Id]} x{GoodsItem.Count}";
|
return $"{GoodsId}:{GameData.Items[GoodsItem.Id]} x{GoodsItem.Count}";
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Shop
|
namespace GrasscutterTools.Game.Shop
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -85,9 +85,6 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Controls\TextBoxXP.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="DispatchServer\DispatchServerAPI.cs" />
|
<Compile Include="DispatchServer\DispatchServerAPI.cs" />
|
||||||
<Compile Include="DispatchServer\Model\ServerStatus.cs" />
|
<Compile Include="DispatchServer\Model\ServerStatus.cs" />
|
||||||
<Compile Include="Forms\FormDropEditor.cs">
|
<Compile Include="Forms\FormDropEditor.cs">
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
@ -63,25 +63,28 @@ namespace GrasscutterTools.Pages
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Func<string> GetCommand { get; set; }
|
public Func<string> GetCommand { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion - 命令相关 -
|
||||||
|
|
||||||
#region - 生命周期事件 -
|
#region - 生命周期事件 -
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载时触发(修改语言时会再次触发)
|
/// 加载时触发(修改语言时会再次触发)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void OnLoad() { }
|
public virtual void OnLoad()
|
||||||
|
{ }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 进入页面时触发(可触发多次)
|
/// 进入页面时触发(可触发多次)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void OnEnter() { }
|
public virtual void OnEnter()
|
||||||
|
{ }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 关闭时触发(用于保存页面数据)
|
/// 关闭时触发(用于保存页面数据)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void OnClosed() { }
|
public virtual void OnClosed()
|
||||||
|
{ }
|
||||||
|
|
||||||
#endregion
|
#endregion - 生命周期事件 -
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -22,6 +22,7 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
using GrasscutterTools.Game;
|
using GrasscutterTools.Game;
|
||||||
|
|
||||||
using GrasscutterTools.Properties;
|
using GrasscutterTools.Properties;
|
||||||
@ -40,7 +41,6 @@ namespace GrasscutterTools.Pages
|
|||||||
InitGiveItemRecord();
|
InitGiveItemRecord();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 初始化游戏物品列表
|
/// 初始化游戏物品列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -185,6 +185,5 @@ namespace GrasscutterTools.Pages
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion -- 物品记录 --
|
#endregion -- 物品记录 --
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -18,14 +18,6 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
using GrasscutterTools.Game;
|
using GrasscutterTools.Game;
|
||||||
using GrasscutterTools.Utils;
|
using GrasscutterTools.Utils;
|
||||||
@ -39,7 +31,6 @@ namespace GrasscutterTools.Pages
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected override void OnLoad(EventArgs e)
|
protected override void OnLoad(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnLoad(e);
|
base.OnLoad(e);
|
||||||
|
@ -85,7 +85,6 @@ namespace GrasscutterTools.Pages
|
|||||||
|
|
||||||
#region - 检查更新 Check update -
|
#region - 检查更新 Check update -
|
||||||
|
|
||||||
|
|
||||||
private ReleaseAPI.ReleaseInfo LastestInfo = null;
|
private ReleaseAPI.ReleaseInfo LastestInfo = null;
|
||||||
private Version lastestVersion = null;
|
private Version lastestVersion = null;
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -16,13 +16,14 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace GrasscutterTools.Utils
|
namespace GrasscutterTools.Utils
|
||||||
{
|
{
|
||||||
class SubstatSumEquality : IEqualityComparer<List<KeyValuePair<int, double>>>
|
internal class SubstatSumEquality : IEqualityComparer<List<KeyValuePair<int, double>>>
|
||||||
{
|
{
|
||||||
public bool Equals(List<KeyValuePair<int, double>> left, List<KeyValuePair<int, double>> right)
|
public bool Equals(List<KeyValuePair<int, double>> left, List<KeyValuePair<int, double>> right)
|
||||||
{
|
{
|
||||||
@ -48,7 +49,7 @@ namespace GrasscutterTools.Utils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ArtifactUtils
|
internal class ArtifactUtils
|
||||||
{
|
{
|
||||||
public static Dictionary<string, double[][]> substats_rolls = new Dictionary<string, double[][]>
|
public static Dictionary<string, double[][]> substats_rolls = new Dictionary<string, double[][]>
|
||||||
{
|
{
|
||||||
@ -179,6 +180,7 @@ namespace GrasscutterTools.Utils
|
|||||||
// Default, should never happen
|
// Default, should never happen
|
||||||
return last_stat_list;
|
return last_stat_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void InitSubstats()
|
private static void InitSubstats()
|
||||||
{
|
{
|
||||||
substats_dict = new Dictionary<string, Dictionary<int, List<KeyValuePair<double, int[]>>>>();
|
substats_dict = new Dictionary<string, Dictionary<int, List<KeyValuePair<double, int[]>>>>();
|
||||||
@ -193,7 +195,7 @@ namespace GrasscutterTools.Utils
|
|||||||
substat_options.Add(new KeyValuePair<int, double>(0, 0));
|
substat_options.Add(new KeyValuePair<int, double>(0, 0));
|
||||||
for (int substat_index = 0; substat_index < substats_rolls[stat_name][rarity_index].Length; substat_index++)
|
for (int substat_index = 0; substat_index < substats_rolls[stat_name][rarity_index].Length; substat_index++)
|
||||||
{
|
{
|
||||||
substat_options.Add(new KeyValuePair<int, double>(substat_index+1, substats_rolls[stat_name][rarity_index][substat_index]));
|
substat_options.Add(new KeyValuePair<int, double>(substat_index + 1, substats_rolls[stat_name][rarity_index][substat_index]));
|
||||||
}
|
}
|
||||||
|
|
||||||
var substat_sum_data = (from s1 in substat_options from s2 in substat_options from s3 in substat_options from s4 in substat_options from s5 in substat_options from s6 in substat_options select new { s1, s2, s3, s4, s5, s6 })
|
var substat_sum_data = (from s1 in substat_options from s2 in substat_options from s3 in substat_options from s4 in substat_options from s5 in substat_options from s6 in substat_options select new { s1, s2, s3, s4, s5, s6 })
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
@ -45,7 +45,6 @@ namespace GrasscutterTools.Utils
|
|||||||
listBox.EndUpdate();
|
listBox.EndUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 使用浏览器打开网址
|
/// 使用浏览器打开网址
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -63,11 +62,10 @@ namespace GrasscutterTools.Utils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 提示气泡对象
|
/// 提示气泡对象
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly static ToolTip TTip = new ToolTip();
|
private static readonly ToolTip TTip = new ToolTip();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 在指定控件上显示提示气泡
|
/// 在指定控件上显示提示气泡
|
||||||
|
Loading…
Reference in New Issue
Block a user