thewar_server/Server/SQL/RewardData.cs

53 lines
1.2 KiB
C#

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);
}
}
}
}