From 5a5918950ad3247fa23a8a96a56f1b53577d1d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=8C=90=EB=8F=8C?= Date: Tue, 27 Feb 2024 21:52:16 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8B=A0=EA=B7=9C=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=ED=85=8C=EC=9D=B4=EB=B8=94=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/SQL/ConsumableItemData.cs | 49 ++++++++++++++++++++++++++++++ Server/SQL/RandomRewardData.cs | 42 ++++++++++++++++++++++++++ Server/SQL/RewardData.cs | 52 ++++++++++++++++++++++++++++++++ Server/SQL/ShopItemData.cs | 49 ++++++++++++++++++++++++++++++ 4 files changed, 192 insertions(+) create mode 100644 Server/SQL/ConsumableItemData.cs create mode 100644 Server/SQL/RandomRewardData.cs create mode 100644 Server/SQL/RewardData.cs create mode 100644 Server/SQL/ShopItemData.cs diff --git a/Server/SQL/ConsumableItemData.cs b/Server/SQL/ConsumableItemData.cs new file mode 100644 index 0000000..6996dd5 --- /dev/null +++ b/Server/SQL/ConsumableItemData.cs @@ -0,0 +1,49 @@ +using Server.Git; +using System.ComponentModel.DataAnnotations; + +namespace Server.SQL +{ + public class ConsumableItemData + { + [Key] + public long index { get; set; } + public string name { get; set; } + public eItemType item_type { get; set; } + public string reward { get; set; } + } + + public enum eItemType + { + exp = 1, + package, + random + } + + public class ConsumableItemDataExcel + { + private Dictionary consumableItemData; + + public string sheetName = "ConsumableItemData"; + + public ConsumableItemData getConsumableItemData(long key) + { + return consumableItemData[key]; + } + + public List getConsumableItemData() + { + return consumableItemData.Values.ToList(); + } + public void init(sheet data) + { + this.consumableItemData = new Dictionary(); + foreach (var item in data.dicViewer) + { + //ConsumableItemData ConsumableItemData = new ConsumableItemData(); + //ConsumableItemData.index = item.Key; + //ConsumableItemData.part = (int)item.Value["part"]; + //this.ConsumableItemData.Add(item.Key, ConsumableItemData); + } + } + } +} diff --git a/Server/SQL/RandomRewardData.cs b/Server/SQL/RandomRewardData.cs new file mode 100644 index 0000000..71a0b59 --- /dev/null +++ b/Server/SQL/RandomRewardData.cs @@ -0,0 +1,42 @@ +using Server.Git; +using System.ComponentModel.DataAnnotations; + +namespace Server.SQL +{ + public class RandomRewardData + { + [Key] + public long index { get; set; } + public int group { get; set; } + public long reward { get; set; } + public int prob { get; set; } + } + + public class RandomRewardDataExcel + { + private Dictionary randomRewardData; + + public string sheetName = "RandomRewardData"; + + public RandomRewardData getRandomRewardData(long key) + { + return randomRewardData[key]; + } + + public List getRandomRewardData() + { + return randomRewardData.Values.ToList(); + } + public void init(sheet data) + { + this.randomRewardData = new Dictionary(); + foreach (var item in data.dicViewer) + { + //RandomRewardData RandomRewardData = new RandomRewardData(); + //RandomRewardData.index = item.Key; + //RandomRewardData.part = (int)item.Value["part"]; + //this.RandomRewardData.Add(item.Key, RandomRewardData); + } + } + } +} diff --git a/Server/SQL/RewardData.cs b/Server/SQL/RewardData.cs new file mode 100644 index 0000000..3ccf279 --- /dev/null +++ b/Server/SQL/RewardData.cs @@ -0,0 +1,52 @@ +using Server.Git; +using System.ComponentModel.DataAnnotations; + +namespace Server.SQL +{ + public class RewardData + { + [Key] + public long index { get; set; } + public eBuyType buy_type { get; set; } + public long return_item { get; set; } + } + + public enum eRewardItemType + { + gold = 1, + freecash, + paycash, + character, + equipment, + consumable, + etc + } + + public class RewardDataExcel + { + private Dictionary rewardData; + + public string sheetName = "RewardData"; + + public RewardData getRewardData(long key) + { + return rewardData[key]; + } + + public List getRewardData() + { + return rewardData.Values.ToList(); + } + public void init(sheet data) + { + this.rewardData = new Dictionary(); + foreach (var item in data.dicViewer) + { + //RewardData RewardData = new RewardData(); + //RewardData.index = item.Key; + //RewardData.part = (int)item.Value["part"]; + //this.RewardData.Add(item.Key, RewardData); + } + } + } +} diff --git a/Server/SQL/ShopItemData.cs b/Server/SQL/ShopItemData.cs new file mode 100644 index 0000000..f1ba7d9 --- /dev/null +++ b/Server/SQL/ShopItemData.cs @@ -0,0 +1,49 @@ +using Server.Git; +using System.ComponentModel.DataAnnotations; + +namespace Server.SQL +{ + public class ShopItemData + { + [Key] + public long index { get; set; } + public eBuyType buy_type { get; set; } + public int buy { get; set; } + public long reward { get; set; } + } + + public enum eBuyType + { + gold = 1, + cash, + money + } + + public class ShopItemDataExcel + { + private Dictionary shopItemData; + + public string sheetName = "ShopItemData"; + + public ShopItemData getShopItemData(long key) + { + return shopItemData[key]; + } + + public List getShopItemData() + { + return shopItemData.Values.ToList(); + } + public void init(sheet data) + { + this.shopItemData = new Dictionary(); + foreach (var item in data.dicViewer) + { + //ShopItemData ShopItemData = new ShopItemData(); + //ShopItemData.index = item.Key; + //ShopItemData.part = (int)item.Value["part"]; + //this.ShopItemData.Add(item.Key, ShopItemData); + } + } + } +}