示例#1
0
    public void Load()
    {
        CVSReader reader = new CVSReader();

        reader.LoadText("Data/Config/Skill_skill.txt", 1);
        int rows = reader.GetRowCount();

        for (int r = 0; r < rows; ++r)
        {
            string[]         row = reader.GetRow(r);
            SkillSkillConfig ac  = ConfigProcess(row) as SkillSkillConfig;
            configs.Add(ac.skillID, ac);
        }
    }
示例#2
0
    public object ConfigProcess(string[] row)
    {
        if (row.Length < 68)
        {
            return(null);
        }
        RowHelper        rh  = new RowHelper(row);
        SkillSkillConfig rec = new SkillSkillConfig();

        rec.skillID = Utility.ToInt(rh.Read());           //技能id

        rec.name = rh.Read();                             //名称

        rec.profession = Utility.ToInt(rh.Read());        //职业限制

        rec.skillType = Utility.ToInt(rh.Read());         //技能类型

        rec.Relation = Utility.ToInt(rh.Read());          //关联技能

        rec.minLevel = rh.Read();                         //学习等级

        rec.skillMaxLevel = Utility.ToInt(rh.Read());     //等级上限

        rec.type = Utility.ToInt(rh.Read());              //种类

        rec.cd = Utility.ToInt(rh.Read());                //cd

        rec.cost = Utility.ToInt(rh.Read());              //消耗类型

        rec.costValue = rh.Read();                        //消耗数据

        rec.upgradeCost = rh.Read();                      //升级消耗

        rec.threat = Utility.ToInt(rh.Read());            //仇恨值

        rec.moveCast = Utility.ToInt(rh.Read());          //是否移动施法动作

        rec.releaseType = Utility.ToInt(rh.Read());       //释放类型

        rec.processTypes = Utility.ToInt(rh.Read());      //过程类型

        rec.flySpeed = Utility.ToInt(rh.Read());          //飞行速度

        rec.warn = Utility.ToInt(rh.Read());              //是否预警

        rec.readyTime = Utility.ToInt(rh.Read());         //准备时间

        rec.attackTime = Utility.ToInt(rh.Read());        //攻击总时间

        rec.damageTime = rh.Read();                       //伤害生效时间点

        rec.displaceTime = rh.Read();                     //位移生效时间点

        rec.displaceDistance = rh.Read();                 //位移距离

        rec.move = Utility.ToInt(rh.Read());              //技能释放能否产生位移

        rec.towards = Utility.ToInt(rh.Read());           //是否可改变朝向

        rec.breakTime = Utility.ToInt(rh.Read());         //被打断时机

        rec.breakType = Utility.ToInt(rh.Read());         //被打断类型

        rec.breakParameter = rh.Read();                   //被打断参数

        rec.attackDistance = Utility.ToInt(rh.Read());    //攻击距离

        rec.rangeType = Utility.ToInt(rh.Read());         //范围类型

        rec.rangeTypeValue = rh.Read();                   //范围类型值

        rec.attackMinDistance = Utility.ToInt(rh.Read()); //攻击最小距离

        rec.goalMaxNum = Utility.ToInt(rh.Read());        //目标最大数量

        rec.damageType = Utility.ToInt(rh.Read());        //伤害类型

        rec.attackValue = rh.Read();                      //附加攻击力固定值

        rec.attackRate = rh.Read();                       //附加攻击力倍率

        rec.damageValue = rh.Read();                      //附加伤害固定值

        rec.damageRate = rh.Read();                       //附加伤害倍率

        rec.stateBag = new SkillSkillStateBagConfig[5];

        for (int i = 0; i < 5; i++)
        {
            rec.stateBag[i] = new SkillSkillStateBagConfig();
        }

        rec.stateBag[0].Target = Utility.ToInt(rh.Read()); //归属

        rec.stateBag[0].Rate = Utility.ToInt(rh.Read());   //成功几率

        rec.stateBag[0].Parameter = rh.Read();             //参数

        rec.stateBag[0].Time = rh.Read();                  //持续时间

        rec.stateBag[0].Point = Utility.ToInt(rh.Read());  //生效点

        rec.stateBag[0].ID = Utility.ToInt(rh.Read());     //id

        rec.stateBag[1].Target = Utility.ToInt(rh.Read()); //归属

        rec.stateBag[1].Rate = Utility.ToInt(rh.Read());   //成功几率

        rec.stateBag[1].Parameter = rh.Read();             //参数

        rec.stateBag[1].Time = rh.Read();                  //持续时间

        rec.stateBag[1].Point = Utility.ToInt(rh.Read());  //生效点

        rec.stateBag[1].ID = Utility.ToInt(rh.Read());     //id

        rec.stateBag[2].Target = Utility.ToInt(rh.Read()); //归属

        rec.stateBag[2].Rate = Utility.ToInt(rh.Read());   //成功几率

        rec.stateBag[2].Parameter = rh.Read();             //参数

        rec.stateBag[2].Time = rh.Read();                  //持续时间

        rec.stateBag[2].Point = Utility.ToInt(rh.Read());  //生效点

        rec.stateBag[2].ID = Utility.ToInt(rh.Read());     //id

        rec.stateBag[3].Target = Utility.ToInt(rh.Read()); //归属

        rec.stateBag[3].Rate = Utility.ToInt(rh.Read());   //成功几率

        rec.stateBag[3].Parameter = rh.Read();             //参数

        rec.stateBag[3].Time = rh.Read();                  //持续时间

        rec.stateBag[3].Point = Utility.ToInt(rh.Read());  //生效点

        rec.stateBag[3].ID = Utility.ToInt(rh.Read());     //id

        rec.stateBag[4].Target = Utility.ToInt(rh.Read()); //归属

        rec.stateBag[4].Rate = Utility.ToInt(rh.Read());   //成功几率

        rec.stateBag[4].Parameter = rh.Read();             //参数

        rec.stateBag[4].Time = rh.Read();                  //持续时间

        rec.stateBag[4].Point = Utility.ToInt(rh.Read());  //生效点

        rec.stateBag[4].ID = Utility.ToInt(rh.Read());     //id


        return(rec);
    }