신규 데이터 테이블 추가

This commit is contained in:
김판돌 2024-02-27 21:52:16 +09:00
parent e0a9deee35
commit 5a5918950a
4 changed files with 192 additions and 0 deletions

View File

@ -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<long, ConsumableItemData> consumableItemData;
public string sheetName = "ConsumableItemData";
public ConsumableItemData getConsumableItemData(long key)
{
return consumableItemData[key];
}
public List<ConsumableItemData> getConsumableItemData()
{
return consumableItemData.Values.ToList();
}
public void init(sheet data)
{
this.consumableItemData = new Dictionary<long, ConsumableItemData>();
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);
}
}
}
}

View File

@ -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<long, RandomRewardData> randomRewardData;
public string sheetName = "RandomRewardData";
public RandomRewardData getRandomRewardData(long key)
{
return randomRewardData[key];
}
public List<RandomRewardData> getRandomRewardData()
{
return randomRewardData.Values.ToList();
}
public void init(sheet data)
{
this.randomRewardData = new Dictionary<long, RandomRewardData>();
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);
}
}
}
}

52
Server/SQL/RewardData.cs Normal file
View File

@ -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<long, RewardData> rewardData;
public string sheetName = "RewardData";
public RewardData getRewardData(long key)
{
return rewardData[key];
}
public List<RewardData> getRewardData()
{
return rewardData.Values.ToList();
}
public void init(sheet data)
{
this.rewardData = new Dictionary<long, RewardData>();
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);
}
}
}
}

View File

@ -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<long, ShopItemData> shopItemData;
public string sheetName = "ShopItemData";
public ShopItemData getShopItemData(long key)
{
return shopItemData[key];
}
public List<ShopItemData> getShopItemData()
{
return shopItemData.Values.ToList();
}
public void init(sheet data)
{
this.shopItemData = new Dictionary<long, ShopItemData>();
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);
}
}
}
}