Add Shop models

This commit is contained in:
2022-10-30 22:10:35 +08:00
parent d79b50527e
commit 086c4da557
14 changed files with 541 additions and 45 deletions

View File

@@ -16,8 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
**/
using System.Collections.Generic;
using GrasscutterTools.Properties;
namespace GrasscutterTools.Game
@@ -40,6 +38,7 @@ namespace GrasscutterTools.Game
WeaponColors = new ItemMap(Resources.WeaponColor);
GachaBannerPrefabs = new ItemMap(Resources.GachaBennerPrefab);
Quests = new ItemMap(Resources.Quest);
ShopType = new ItemMap(Resources.ShopType);
}
@@ -70,5 +69,7 @@ namespace GrasscutterTools.Game
public static ItemMap GachaBannerPrefabs { get; private set; }
public static ItemMap Quests { get; private set; }
public static ItemMap ShopType { get; private set; }
}
}

View File

@@ -0,0 +1,13 @@
using Newtonsoft.Json;
namespace GrasscutterTools.Game.Shop
{
public struct ItemParamData
{
[JsonProperty("id")]
public int Id { get; set; }
[JsonProperty("count")]
public int Count { get; set; }
}
}

View File

@@ -0,0 +1,55 @@
using System.Collections.Generic;
using Newtonsoft.Json;
namespace GrasscutterTools.Game.Shop
{
public class ShopInfo
{
[JsonProperty("goodsId")]
public int GoodsId { get; set; }
[JsonProperty("goodsItem")]
public ItemParamData GoodsItem { get; set; }
[JsonProperty("scoin")]
public int SCoin { get; set; }
[JsonProperty("costItemList")]
public List<ItemParamData> CostItemList { get; set; }
[JsonProperty("boughtNum")]
public int BoughtNum { get; set; }
[JsonProperty("buyLimit")]
public int BuyLimit { get; set; }
[JsonProperty("beginTime")]
public int BeginTime { get; set; }
[JsonProperty("endTime")]
public int EndTime { get; set; } = 1924992000;
[JsonProperty("minLevel")]
public int MinLevel { get; set; }
[JsonProperty("maxLevel")]
public int MaxLevel { get; set; } = 61;
[JsonProperty("preGoodsIdList")]
public List<int> PreGoodsIdList { get; set; } = new List<int>();
[JsonProperty("mcoin")]
public int MCoin { get; set; }
[JsonProperty("hcoin")]
public int HCoin { get; set; }
[JsonProperty("disableType")]
public int DisableType { get; set; }
[JsonProperty("secondarySheetId")]
public int SecondarySheetId { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using System.Collections.Generic;
using Newtonsoft.Json;
namespace GrasscutterTools.Game.Shop
{
public class ShopTable
{
[JsonProperty("shopId")]
public int ShopType { get; set; }
[JsonProperty("items")]
public List<ShopInfo> Items { get; set; }
}
}