| | |
| | | { |
| | | string[] allPath = new string[]{ |
| | | |
| | | "boss_skill.json", |
| | | "boss.json", |
| | | "geminfo.json", |
| | | "levelup.json", |
| | |
| | | "boxsequence.json", |
| | | "box.json", |
| | | "resource.json", |
| | | "endless_boss.json", |
| | | "endless_buff.json", |
| | | "endless_enemy.json", |
| | | "endless_port.json", |
| | | "donaterule.json", |
| | | "scoreshop.json", |
| | | "donateshop.json", |
| | | "gemcost.json", |
| | | "buffinfo.json", |
| | | "skilllevelinfo.json", |
| | | "arena.json", |
| | | "fuckword.json", |
| | | "notice.json", |
| | | "storearea.json", |
| | | "store.json", |
| | | "goldInfo.json", |
| | |
| | | tablename = tablename.Replace(".json", ""); |
| | | List<tabledata> allData = new List<tabledata>(); |
| | | switch (tablename) { |
| | | |
| | | case "boss_skill": |
| | | //allData.Clear(); |
| | | foreach (JsonData item in data) |
| | | { |
| | | boss_skill tmp = boss_skill.CreateFromJson(item); |
| | | allData.Add(tmp as tabledata); |
| | | } |
| | | JsonDataCenter.allData.Add(tablename, allData); |
| | | break; |
| | | |
| | | |
| | | case "boss": |
| | | //allData.Clear(); |
| | |
| | | break; |
| | | |
| | | |
| | | case "endless_boss": |
| | | //allData.Clear(); |
| | | foreach (JsonData item in data) |
| | | { |
| | | endless_boss tmp = endless_boss.CreateFromJson(item); |
| | | allData.Add(tmp as tabledata); |
| | | } |
| | | JsonDataCenter.allData.Add(tablename, allData); |
| | | break; |
| | | |
| | | |
| | | case "endless_buff": |
| | | //allData.Clear(); |
| | | foreach (JsonData item in data) |
| | |
| | | foreach (JsonData item in data) |
| | | { |
| | | endless_port tmp = endless_port.CreateFromJson(item); |
| | | allData.Add(tmp as tabledata); |
| | | } |
| | | JsonDataCenter.allData.Add(tablename, allData); |
| | | break; |
| | | |
| | | |
| | | case "donaterule": |
| | | //allData.Clear(); |
| | | foreach (JsonData item in data) |
| | | { |
| | | donaterule tmp = donaterule.CreateFromJson(item); |
| | | allData.Add(tmp as tabledata); |
| | | } |
| | | JsonDataCenter.allData.Add(tablename, allData); |
| | | break; |
| | | |
| | | |
| | | case "scoreshop": |
| | | //allData.Clear(); |
| | | foreach (JsonData item in data) |
| | | { |
| | | scoreshop tmp = scoreshop.CreateFromJson(item); |
| | | allData.Add(tmp as tabledata); |
| | | } |
| | | JsonDataCenter.allData.Add(tablename, allData); |
| | | break; |
| | | |
| | | |
| | | case "donateshop": |
| | | //allData.Clear(); |
| | | foreach (JsonData item in data) |
| | | { |
| | | donateshop tmp = donateshop.CreateFromJson(item); |
| | | allData.Add(tmp as tabledata); |
| | | } |
| | | JsonDataCenter.allData.Add(tablename, allData); |
| | |
| | | foreach (JsonData item in data) |
| | | { |
| | | fuckword tmp = fuckword.CreateFromJson(item); |
| | | allData.Add(tmp as tabledata); |
| | | } |
| | | JsonDataCenter.allData.Add(tablename, allData); |
| | | break; |
| | | |
| | | |
| | | case "notice": |
| | | //allData.Clear(); |
| | | foreach (JsonData item in data) |
| | | { |
| | | notice tmp = notice.CreateFromJson(item); |
| | | allData.Add(tmp as tabledata); |
| | | } |
| | | JsonDataCenter.allData.Add(tablename, allData); |
| | |
| | | |
| | | |
| | | |
| | | //! 生成文件 boss_skill(boss技能表).xlsx |
| | | public class boss_skill : tabledata { |
| | | public int getid(){ |
| | | return id; |
| | | } |
| | | |
| | | // id |
| | | public int id; |
| | | |
| | | // 技能名称 |
| | | public string name; |
| | | |
| | | // 技能资源 |
| | | public int image; |
| | | |
| | | // 技能冷却时间 |
| | | public int cool_down; |
| | | |
| | | // 技能目标 |
| | | public List<int> target; |
| | | |
| | | // 技能范围 |
| | | public int tunnel; |
| | | |
| | | // 技能动作 |
| | | public int action; |
| | | |
| | | // 技能效果 |
| | | public List<float> effect; |
| | | |
| | | |
| | | |
| | | public static boss_skill CreateFromJson(JsonData item) |
| | | { |
| | | boss_skill _boss_skill = new boss_skill(); |
| | | |
| | | int index = 0; |
| | | _boss_skill.id = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _boss_skill.name = GameUtils.GetString(item[index++].ToString()); |
| | | _boss_skill.image = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _boss_skill.cool_down = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _boss_skill.target = GameUtils.GetIntList(item[index++]); |
| | | _boss_skill.tunnel = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _boss_skill.action = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _boss_skill.effect = GameUtils.GetFloatList(item[index++]); |
| | | |
| | | return _boss_skill; |
| | | } |
| | | |
| | | } |
| | | |
| | | //! 生成文件 B_BOSS生成表.xlsx |
| | | public class boss : tabledata { |
| | | public int getid(){ |
| | |
| | | |
| | | } |
| | | |
| | | //! 生成文件 endless_boss(无尽模式boss).xlsx |
| | | public class endless_boss : tabledata { |
| | | public int getid(){ |
| | | return id; |
| | | } |
| | | |
| | | // id |
| | | public int id; |
| | | |
| | | // Boss名称 |
| | | public string name; |
| | | |
| | | // BossAI |
| | | public int boss_ai; |
| | | |
| | | // Boss资源图 |
| | | public int image; |
| | | |
| | | // Boss技能组 |
| | | public List<int> skill; |
| | | |
| | | |
| | | |
| | | public static endless_boss CreateFromJson(JsonData item) |
| | | { |
| | | endless_boss _endless_boss = new endless_boss(); |
| | | |
| | | int index = 0; |
| | | _endless_boss.id = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_boss.name = GameUtils.GetString(item[index++].ToString()); |
| | | _endless_boss.boss_ai = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_boss.image = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_boss.skill = GameUtils.GetIntList(item[index++]); |
| | | |
| | | return _endless_boss; |
| | | } |
| | | |
| | | } |
| | | |
| | | //! 生成文件 endless_buff(无尽模式buff).xlsx |
| | | public class endless_buff : tabledata { |
| | | public int getid(){ |
| | |
| | | // 出现关卡上限 |
| | | public int upper_level; |
| | | |
| | | // 对应资源 |
| | | public int image; |
| | | |
| | | // 品质 |
| | | public int rare; |
| | | |
| | | |
| | | |
| | | public static endless_buff CreateFromJson(JsonData item) |
| | |
| | | _endless_buff.brief = GameUtils.GetString(item[index++].ToString()); |
| | | _endless_buff.down_level = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_buff.upper_level = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_buff.image = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_buff.rare = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | |
| | | return _endless_buff; |
| | | } |
| | |
| | | public int type; |
| | | |
| | | // 血量增幅 |
| | | public int hp_rate; |
| | | public float hp_rate; |
| | | |
| | | // 速度增幅 |
| | | public float speed_rate; |
| | |
| | | _endless_enemy.id = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_enemy.name = GameUtils.GetString(item[index++].ToString()); |
| | | _endless_enemy.type = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_enemy.hp_rate = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_enemy.hp_rate = float.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_enemy.speed_rate = float.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_enemy.coin_rate = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_enemy.resource = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | |
| | | |
| | | // 关卡等级 |
| | | public int level; |
| | | |
| | | // Boss名称 |
| | | public string boss_name; |
| | | |
| | | // Boss资源id |
| | | public int resource; |
| | |
| | | // 波次间隔 |
| | | public int cooldown; |
| | | |
| | | // 怪物掉落 |
| | | public reward drop; |
| | | // box:2:1 |
| | | public List<reward> drop; |
| | | |
| | | // 掉落概率 |
| | | public int drop_rate; |
| | | public List<int> drop_rate; |
| | | |
| | | // 法阵图片 |
| | | public int tunel_bg; |
| | | |
| | | |
| | | |
| | |
| | | int index = 0; |
| | | _endless_port.id = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_port.level = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_port.boss_name = GameUtils.GetString(item[index++].ToString()); |
| | | _endless_port.resource = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_port.wave = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_port.tunel = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | |
| | | _endless_port.b_speed = float.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_port.b_coin = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_port.cooldown = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_port.drop = GameUtils.GetReward(item[index++]); |
| | | _endless_port.drop_rate = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _endless_port.drop = GameUtils.GetRewardList(item[index++]); |
| | | _endless_port.drop_rate = GameUtils.GetIntList(item[index++]); |
| | | _endless_port.tunel_bg = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | |
| | | return _endless_port; |
| | | } |
| | | |
| | | } |
| | | |
| | | //! 生成文件 G_donaterule(公会捐赠卡规则).xlsx |
| | | public class donaterule : tabledata { |
| | | public int getid(){ |
| | | return id; |
| | | } |
| | | |
| | | // 标识符 |
| | | public int id; |
| | | |
| | | // 竞技场等级 |
| | | public List<int> ranklevle; |
| | | |
| | | // 发起请求后可获得的卡牌数 |
| | | public List<string> canreward; |
| | | |
| | | // 可捐赠给他人的卡牌数 |
| | | public List<string> candonate; |
| | | |
| | | |
| | | |
| | | public static donaterule CreateFromJson(JsonData item) |
| | | { |
| | | donaterule _donaterule = new donaterule(); |
| | | |
| | | int index = 0; |
| | | _donaterule.id = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _donaterule.ranklevle = GameUtils.GetIntList(item[index++]); |
| | | _donaterule.canreward = GameUtils.GetStringList(item[index++]); |
| | | _donaterule.candonate = GameUtils.GetStringList(item[index++]); |
| | | |
| | | return _donaterule; |
| | | } |
| | | |
| | | } |
| | | |
| | | //! 生成文件 G_公会积分商店.xlsx |
| | | public class scoreshop : tabledata { |
| | | public int getid(){ |
| | | return id; |
| | | } |
| | | |
| | | // 标识符 |
| | | public int id; |
| | | |
| | | // 道具名称 |
| | | public string name; |
| | | |
| | | // 效果描述 |
| | | public string description; |
| | | |
| | | // 有效时间s |
| | | public int time; |
| | | |
| | | // 效果类型 |
| | | public int buff; |
| | | |
| | | // 效果数值 |
| | | public float buffnum; |
| | | |
| | | // 价格 |
| | | public int price; |
| | | |
| | | // 奖励上限 |
| | | public int rewardlimit; |
| | | |
| | | // 限购次数 |
| | | public int purchaselimit; |
| | | |
| | | |
| | | |
| | | public static scoreshop CreateFromJson(JsonData item) |
| | | { |
| | | scoreshop _scoreshop = new scoreshop(); |
| | | |
| | | int index = 0; |
| | | _scoreshop.id = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _scoreshop.name = GameUtils.GetString(item[index++].ToString()); |
| | | _scoreshop.description = GameUtils.GetString(item[index++].ToString()); |
| | | _scoreshop.time = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _scoreshop.buff = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _scoreshop.buffnum = float.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _scoreshop.price = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _scoreshop.rewardlimit = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _scoreshop.purchaselimit = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | |
| | | return _scoreshop; |
| | | } |
| | | |
| | | } |
| | | |
| | | //! 生成文件 G_工会捐赠商店.xlsx |
| | | public class donateshop : tabledata { |
| | | public int getid(){ |
| | | return id; |
| | | } |
| | | |
| | | // 标识符 |
| | | public int id; |
| | | |
| | | // 道具名称 |
| | | public string name; |
| | | |
| | | // 道具奖励数量 |
| | | public List<reward> reward; |
| | | |
| | | // 价格 |
| | | public int price; |
| | | |
| | | // 限购次数 |
| | | public int purchaselimit; |
| | | |
| | | |
| | | |
| | | public static donateshop CreateFromJson(JsonData item) |
| | | { |
| | | donateshop _donateshop = new donateshop(); |
| | | |
| | | int index = 0; |
| | | _donateshop.id = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _donateshop.name = GameUtils.GetString(item[index++].ToString()); |
| | | _donateshop.reward = GameUtils.GetRewardList(item[index++]); |
| | | _donateshop.price = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _donateshop.purchaselimit = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | |
| | | return _donateshop; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | //! 生成文件 N_通知消息字符串(notice).xlsx |
| | | public class notice : tabledata { |
| | | public int getid(){ |
| | | return id; |
| | | } |
| | | |
| | | // id |
| | | public int id; |
| | | |
| | | // 键 |
| | | public string key; |
| | | |
| | | // 说明 |
| | | public string dec; |
| | | |
| | | |
| | | |
| | | public static notice CreateFromJson(JsonData item) |
| | | { |
| | | notice _notice = new notice(); |
| | | |
| | | int index = 0; |
| | | _notice.id = int.Parse(GameUtils.GetString(item[index++].ToString())); |
| | | _notice.key = GameUtils.GetString(item[index++].ToString()); |
| | | _notice.dec = GameUtils.GetString(item[index++].ToString()); |
| | | |
| | | return _notice; |
| | | } |
| | | |
| | | } |
| | | |
| | | //! 生成文件 S_商店分区表 .xlsx |
| | | public class storearea : tabledata { |
| | | public int getid(){ |