River Jiang
2020-10-27 24f59b89e9eabcfe948fc0ba304a8dbec2deda14
Assets/Scripts/Net/NetExtends/Table.cs
@@ -42,11 +42,16 @@
            "endless_buff.json",
            "endless_enemy.json",
            "endless_port.json",
            "endless_teachport.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",
@@ -200,6 +205,50 @@
                    break;
               
            
                case "endless_teachport":
                    //allData.Clear();
                    foreach (JsonData item in data)
                    {
                        endless_teachport tmp = endless_teachport.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);
                    break;
                case "gemcost":
                    //allData.Clear();
                    foreach (JsonData item in data)
@@ -249,6 +298,17 @@
                    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);
@@ -805,6 +865,12 @@
        // 出现关卡上限
        public int upper_level;
        
        // 对应资源
        public int image;
        // 品质
        public int rare;
        public static endless_buff CreateFromJson(JsonData item)
@@ -820,6 +886,8 @@
            _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;
        }
@@ -842,7 +910,7 @@
        public int type;
        
        // 血量增幅
        public int hp_rate;
        public float hp_rate;
        
        // 速度增幅
        public float speed_rate;
@@ -863,7 +931,7 @@
            _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())); 
@@ -884,6 +952,9 @@
        
        // 关卡等级
        public int level;
        // Boss名称
        public string boss_name;
        
        // Boss资源id
        public int resource;
@@ -916,10 +987,13 @@
        public int cooldown;
        
        // 怪物掉落
        public reward drop;
        public List<reward> drop;
        
        // 掉落概率
        public int drop_rate;
        public List<int> drop_rate;
        // 法阵图片
        public int tunel_bg;
        
@@ -930,6 +1004,7 @@
            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())); 
@@ -940,10 +1015,223 @@
            _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;
        }
    }
    //! 生成文件 endless_teachport(无尽模式新手引导关卡).xlsx
    public class endless_teachport : tabledata {
        public int getid(){
            return id;
        }
        // id
        public int id;
        // 关卡等级
        public int level;
        // Boss名称
        public string boss_name;
        // Boss资源id
        public int resource;
        // 波次
        public int wave;
        // 赛道
        public int tunel;
        // 敌人id
        public int enemy_id;
        // 本波次敌人数量
        public int amount;
        // 本赛道出怪间隔
        public int interval;
        // 怪物基础血量
        public int b_hp;
        // 怪物基础速度
        public float b_speed;
        // 掉落基础金币
        public int b_coin;
        // 波次间隔
        public int cooldown;
        // 怪物掉落
        public List<reward> drop;
        // 掉落概率
        public List<int> drop_rate;
        // 法阵图片
        public int tunel_bg;
        public static endless_teachport CreateFromJson(JsonData item)
        {
            endless_teachport _endless_teachport = new endless_teachport();
            int index = 0;
            _endless_teachport.id = int.Parse(GameUtils.GetString(item[index++].ToString()));
            _endless_teachport.level = int.Parse(GameUtils.GetString(item[index++].ToString()));
            _endless_teachport.boss_name = GameUtils.GetString(item[index++].ToString());
            _endless_teachport.resource = int.Parse(GameUtils.GetString(item[index++].ToString()));
            _endless_teachport.wave = int.Parse(GameUtils.GetString(item[index++].ToString()));
            _endless_teachport.tunel = int.Parse(GameUtils.GetString(item[index++].ToString()));
            _endless_teachport.enemy_id = int.Parse(GameUtils.GetString(item[index++].ToString()));
            _endless_teachport.amount = int.Parse(GameUtils.GetString(item[index++].ToString()));
            _endless_teachport.interval = int.Parse(GameUtils.GetString(item[index++].ToString()));
            _endless_teachport.b_hp = int.Parse(GameUtils.GetString(item[index++].ToString()));
            _endless_teachport.b_speed = float.Parse(GameUtils.GetString(item[index++].ToString()));
            _endless_teachport.b_coin = int.Parse(GameUtils.GetString(item[index++].ToString()));
            _endless_teachport.cooldown = int.Parse(GameUtils.GetString(item[index++].ToString()));
            _endless_teachport.drop = GameUtils.GetRewardList(item[index++]);
            _endless_teachport.drop_rate = GameUtils.GetIntList(item[index++]);
            _endless_teachport.tunel_bg = int.Parse(GameUtils.GetString(item[index++].ToString()));
            return _endless_teachport;
        }
    }
    //! 生成文件 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;
        }
    }
@@ -1127,6 +1415,37 @@
    }
    //! 生成文件 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(){