mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-10-21 19:53:29 +08:00
Implement ShopEditor
This commit is contained in:
@@ -72,5 +72,13 @@ namespace GrasscutterTools.Game
|
||||
public string[] Lines { get; }
|
||||
|
||||
public static int ToId(string line) => int.Parse(line.Substring(0, line.IndexOf(':')).Trim());
|
||||
|
||||
public static bool TryToId(string line, out int id)
|
||||
{
|
||||
id = 0;
|
||||
var sp = line.IndexOf(':');
|
||||
if (sp == -1) return false;
|
||||
return int.TryParse(line.Substring(0, sp).Trim(), out id);
|
||||
}
|
||||
}
|
||||
}
|
@@ -22,6 +22,12 @@ namespace GrasscutterTools.Game.Shop
|
||||
{
|
||||
public struct ItemParamData
|
||||
{
|
||||
public ItemParamData(int id, int count)
|
||||
{
|
||||
Id = id;
|
||||
Count = count;
|
||||
}
|
||||
|
||||
[JsonProperty("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
|
@@ -30,6 +30,9 @@ namespace GrasscutterTools.Game.Shop
|
||||
[JsonProperty("goodsItem")]
|
||||
public ItemParamData GoodsItem { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消耗摩拉
|
||||
/// </summary>
|
||||
[JsonProperty("scoin")]
|
||||
public int SCoin { get; set; }
|
||||
|
||||
@@ -55,11 +58,18 @@ namespace GrasscutterTools.Game.Shop
|
||||
public int MaxLevel { get; set; } = 61;
|
||||
|
||||
[JsonProperty("preGoodsIdList")]
|
||||
public List<int> PreGoodsIdList { get; set; } = new List<int>();
|
||||
public List<int> PreGoodsIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消耗创世结晶
|
||||
/// </summary>
|
||||
[JsonProperty("mcoin")]
|
||||
public int MCoin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消耗原石
|
||||
/// </summary>
|
||||
|
||||
[JsonProperty("hcoin")]
|
||||
public int HCoin { get; set; }
|
||||
|
||||
|
Reference in New Issue
Block a user